Re: A83: regarding jr nc, $+x


[Prev][Next][Index][Thread]

Re: A83: regarding jr nc, $+x



Nope, $ refers to the pc _before_ the current opcode.


 jr nc,$+4
 ld b,24


loopforever:
 jr $


What's particular confusing is that the byte value in the machine code is 0
for $+2.

xor a
ld (blah-1),a


jr $0000
blah:

Will jump to blah (go nowhere), even though the equivalent in-place code is
jr nc,$+2.


In a message dated 1/17/2001 6:40:21 PM Eastern Standard Time,
dwedit@hotmail.com writes:



Is this correct?

jr nc, $+2
ld b,24
;code proceeds here if no carry




----
Jonah Cohen
<ComAsYuAre@aol.com>
http://jonah.ticalc.org