All signed arithmetic on the 6502, including relative branch calculations, are Two's Complement.
I don't have an assembler handy to prove this, but
vaguely remember than an offset of 0 means the instruction following the end of the branch statement, because the PC has already incremented to point to the next instruction before the offset is added if branch is taken.... so something like:
HERE: BNE HERE THERE:NOP
the offset for HERE would be -2 (FE), and BNE THERE would be 0.
Hope this helps and isn't too wrong.
-- Ross
_________________ The economy isn't "Grapes of Wrath", but it is getting
to be "Raisins of Regret."
-- Ross
|