[A83] Re: Conditional bcall()ing


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

[A83] Re: Conditional bcall()ing





>From: Olle Hedman <alh@home.se>

>Yes, you are completly right. The argument to jr is relative the next
>instruction.
>BUT $ has nothing to do with this. And the construct "$+0" was what we was
>talking about and the whole point of the discussion was that "jr $+0" is
>NOT the same thing as  "jr 0", since $ is calculated from the _current_
>instruction and not the next.
>I hope everybody has this clear now :)
>
>(In the code we was discussing, you could write "jr 3" instead of "jr $+5",
>but not "jr $+3")
>
>///Olle
>

Yes, that's right, just a small correction:
You can't write "jr nz,3" nor "jr 3" if you are going to compile with TASM 
because TASM will then look for a label called "3".
That's why you must use operator $ ("jr nz,$+5" in our example) when 
assembling with TASM.
If you are going to assemble by hand then you could write hex: 2003)


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





Follow-Ups: