[A83] Re: Conditional bcall()ing


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

[A83] Re: Conditional bcall()ing




#define bcall_z(addr) jr nz,$+5 \ rst 28h \ .dw addr

don't be sorry because I am right!

$ points to the place before jr.

jr nz  = 1 byte
branch = 1 byte
rst    = 1 byte
addr   = 2 bytes
----------------
sum    = 5 bytes

If you still don't believe go test it.

>
> > Van: Emir Sakic <saka@hotmail.com>
> >
> > >So always take the opposite of the flag, and jump[-relative] over the
> > >bcall(), a macro would be like this:
> > >
> > >#define bcall_z(addr) jr nz,$+3 \ rst 28 \ .dw addr
> > >
> > >	Henk Poley <><
> >
> > 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...
>
>	Henk Poley <><
>
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp