by Roody_Yogurt » Tue Mar 22, 2016 8:37 am
I'm sure you already know all this, but here's what the manual says about negative numbers:
VALUE (i.e., INTEGER CONSTANT):
<value> <2>
A value may range from -32768 to 32767; negative numbers follow signed-value
16-bit convention by being x + 65536 where x is a negative number.
For example, the values 10 ($0A), 16384 ($4000), and -2 would be written
as:
$4B 0A 00
$4B 00 40
$4B FE FF ($FFFE = 65534 = -2 + 65536)
Does writing to file use a different type of encoding so something is lost in translation?
(I have no idea how any of this works)
I'm sure you already know all this, but here's what the manual says about negative numbers:
[quote]VALUE (i.e., INTEGER CONSTANT):
<value> <2>
A value may range from -32768 to 32767; negative numbers follow signed-value
16-bit convention by being x + 65536 where x is a negative number.
For example, the values 10 ($0A), 16384 ($4000), and -2 would be written
as:
$4B 0A 00
$4B 00 40
$4B FE FF ($FFFE = 65534 = -2 + 65536)[/quote]
Does writing to file use a different type of encoding so something is lost in translation?
(I have no idea how any of this works)