Truncated match.
PICList
Thread
'16 bit square roots and PICLite 2.01a'
1998\07\28@195151
by
myke predko
|
Hi Folks,
When I saw Chip Weller's Square Root Routine, I wanted to try it out with
the PICList compiler to see what kind of code would be generated.
I got it to work, and it is a very efficient routine. I've added it to the
list of applications at:
http://www.myke.com/piclite/piclite3.htm
In getting the code to work, I discovered three problems with PICLite (one
of them in "structure.mac"). The structure.mac problem was that I
referenced an array variable without an index, which defaults always to the
first element.
The other two problems had to do with how the optimizer operates with
sixteen bit numbers. One problem was with bitwise AND, OR, XOR statments in
which "w" was previously loaded with one of the parameters (to save a cycle,
I deleted the *wrong* load) and the other was with a sixteen bit subtract,
the carry wasn't handled properly in operations that don't go over page
boundaries.
I've noticed that quite a few people have downloaded PICLite in the past
three days; I apologise for the problems but Version 2.01a does work better.
And I ask, if you find something that doesn't seem to be working right
please let me know. Adding the structured constructs is actually making the
code much more complex and I'm sure there are a few problems lurking with
the conversion and optimizer routines when there are more complex if/elses
nearby.
Thanx to Chris for putting in the algorithm.
myke
PICLite has been upgraded! Check out version 2.00a at:
http://www.myke.com/piclite
PICLite now includes a Macro Processor that allows structured programming
language constructs ("if/else/end", "while/end" and "for/end").
Look in on the life of the Rabitte family in Dublin; Roddy Doyle's
"Barrytown Trilogy" in the Book Room this week,
http://www.myke.com/Book_Room
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- Today
- New search...