Re: A85: routine help(nevermind)
[Prev][Next][Index][Thread]
Re: A85: routine help(nevermind)
IntCounter: ;wait for 2 seconds to pass
ld b,2
ld a,(IntValue)
inc a
ld (IntValue),a ;waits for 1 second to pass
cp 200
jr nz, IntCounter
ld (IntValue),a;resets (IntValue) because when you cp 200, a = 0 = reset
djnz IntCounter
ret
I made a dumb mistake... I put "ld b,2" in the loop, so b will alway be 2 and
therefore it will never return from here...duh...mannnnnnn...the easiest
mistakes in asm can sometimes be the hardest to find!
Follow-Ups: