PBP's shift algorithms dont work on negative numbers. You either have to divide instead, or do something like this:
lCTemp=(B5+8)>>4
IF lCTemp.27 THEN lCTemp=lCTemp&$F0000000
(Untested)
*edit* note that the division will always round down (towards negative infinity) when shifting no matter if the number if positive or negative. e.g. 5/2 = 2, but -5/2 = -3 (only for shifting - not division)
Last edited by Kamikaze47; - 27th May 2010 at 14:27.
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Bookmarks