[A83] Re: Conditional bcall()ing


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

[A83] Re: Conditional bcall()ing




At 14:05 2001-10-27, you wrote:
>If I remember correctly, jr $+0 jumps to the next instruction.
>Checked it by executing
>:AsmPrgm
>:1800C9
>(jr $+0 \ ret)
>
>it exits, so you only need 3 bytes.

The problem with that is that jr $+0 does _not_ assemble to 1800, but to 18FE.
the jr counts from the next instruction, but the $ operator has really 
nothing to do with z80 but is a feature in the assembler (which I'm sure 
you know supports many more processors then the z80)
the $ counts from the current instruction so you need 5. (or 2 in this 
example program)

///Olle





References: