Quote Originally Posted by Darrel Taylor View Post
The carry bit is only valid after addition/subtraction with 8-bit values.
After math with WORD values, the carry bit cannot be used because not all of the math is done by the hardware.
OK, curiosity got me so I tried it with WORD values and it still seems to work...


x = 32768
Y = 32769
x = x + y
Result: X = 1, STATUS.0 = 1
'--------------------------------

x = 32768
Y = 32765
x = x + y
Result: X = 65533, STATUS.0 = 0
'-------------------------------------

x = 32768
Y = 32765
x = x - y
Result: X = 3, STATUS.0 = 1
'--------------------------------------

x = 32765
Y = 32771
x = x - y
Result: X = 65530, STATUS.0 = 0
'------------------------------------


I thought it was only 'sposed to work with 8 bit numbers?


Steve