[A83] Re: Conditional bcall()ing


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

[A83] Re: Conditional bcall()ing




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.

--Peter-Martijn

> At 08:20 2001-10-27, you wrote:
> > > Actually:
> > > #define       bcall_z(addr) jr nz,$+5 \ rst 28h \ .dw addr
> >
> >Sorry, but you're wrong:
> >
> >an RST command is 1 byte, a '.dw' is 2 bytes, 1+2=3...
> 
> Yes, but doesn't it point to the _current_ instruction, beeing executed. 
> that is, before the jr. then you need to jump 2 bytes extra for jr and its 
> argument.
> 
> ///Olle
> 
> 
> 





Follow-Ups: References: