'16 bit square roots and PICLite 2.01a'
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:
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
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
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
Thanx to Chris for putting in the algorithm.
PICLite has been upgraded! Check out version 2.00a at:
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,
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- New search...