Re: A85: DJNZ...
[Prev][Next][Index][Thread]
Re: A85: DJNZ...
At 10:08 PM 1/7/98 -0600, you wrote:
>
>I'm making my first game now, and I'm using DJNZ to control a loop
>for projectiles.
> If B is set to 0 right before DJNZ is reached, will it loop back or
>quit?
> And if B is 1, will it loop back?
>
> It's used in a variation of a link-list, so when list elements are
>disposed of, I need to control when the loop ends.
>
> If DJNZ stops when B is 1 or less when you reach it, then I have
>some other problem I've been unable to find. If anyone wants to see
>the problem code, just say so, because there's a decent amount of
>it...
>
>-Thanks in advance..
>
>
if b is zero when it reaches djnz, it will keep looping. This is beacuse it
Decrements and Jumps if Not Zero. It decrements zero to -1, or 255. If b
is one at the djnz, it will decrement it to zero and then stop the loop
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Alan Bailey mailto:bailela@charlie.cns.iit.edu
IRC:Abalone Web:http://www.iit.edu/~bailela/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
References: