Re: A83: djnz
[Prev][Next][Index][Thread]
Re: A83: djnz
In a message dated 98-06-06 20:13:33 EDT, you write:
<< djnz stands for decrement and jump if not 0 in other words
first you load how many times you want to loop for into b. ex. ld b,20
then you put in what you want it to do while it loops. ex. inc a
then you put djnz (lable goes here) for were you want it to go back to and
loop again.
after the djnz statment is where the rest of the prgram goes. Make sure to
state b, or else it may crash.
ex.
test:
ld b,22
loop:
ld a,(test)
inc a
ld (test),a
djnz loop
rest of program
Hope this helps
Michael
>>
so basically..its a for statement?