Maybe it should be called out in the command description. It's a trivial point. I was just curious.
DIV32 requires certain system variables to have a 32-bit value in them.
They are initialized by a multiplication operation with at least 1 word (the second value can be a constant).
Then a library routine can be executed to do the multiplication.
Part of the optimization of PBP is called "Constant Folding"
If both values in the multiplication are constants ... the compiler multiplies them at "Compile-Time" and uses a single value (a constant).
No multiplication is performed at run-time, and the system variables are never loaded with the 32-bit value.
I've talked about DIV32 and the System vars it uses a few years ago ... http://www.picbasic.co.uk/forum/showthread.php?t=1942
Last edited by Darrel Taylor; - 19th January 2013 at 07:53.
DT
Thanks for the explanation Darrel. Exactly what I was looking for.
Buuuuut ...
The most charming girl this forum ever saw ( of course Melanie ! ) gave us long time ago the way to load those registers with a macro ... if my memory still works fine.AND ... I might still have a print of that ...
Here's Darrel's edition : http://www.picbasic.co.uk/forum/showthread.php?t=1942 ...
Alain
Last edited by Acetronics2; - 19th January 2013 at 21:51.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks