Negative arithmetic
I know that negative numbers cut the range of a variable, but is there a special way to do arithmetic? The following gives me an overflow value, rather than -30:
DEBUG DEC 20-50
DEBUG DEC 20-50
Comments
DEBUG SDEC 20-50 'should print 30
The SDEC tells the DEBUG command that your number is signed (-32768 - +32767) as opposed to unsigned (0-65535). 65506=65536-30