[A83] Re: Quick quistion about djnz


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

[A83] Re: Quick quistion about djnz




At 02:04 2001-11-16, you wrote:
>about your original question, it does a jr.  Sometimes when you have too
>much code in the loop you have to replace the djnz with dec b \ jp nz,
>though.

To get technical, yes, it is a relative jump, _like_ jr. but it is not "a jr".
djnz is an instruction of its own with its own opcode, and not translated 
to anything else when compiled, which one can think you imply when you say 
it does "a jr".
And like all relative jumps, it has a range limit, and if the range is to 
long, you can't use it but have to use something other, like your example.

///Olle





References: