
Originally Posted by
precision
....
main: if B0 > 0 then ( B1 = B0 ) and ( B2 = 43 ) ' 43 is + sign
if B0 < 0 then B1 = ( 65535 - B0 ) and ( B2 = 45 ) '45 is - sign
...
Hi precision,
Your IF statements are not precise 
You should correct them as follows.
Code:
if B0 > 0 then
B1 = B0
B2 = 43
endif
if B0 < 0 then
B1 = 65535 - B0
B2 = 45
endif
B0 never equals to zero?
This is actually the idea of assigning a flag that will indicate negative status.
That is why I asked above, will you use this negative number in a math operation.
You can have a flag, like NegFlag=1 meaning you have the negative value, and NegFlag=0 meaning positive value.
If of course it can be useful in your case.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks