A85: routine help
[Prev][Next][Index][Thread]
A85: routine help
I have installed an interrupt at this routine,and I want it to wait for 2
seconds to pass...I first did it with 1 second and it went way to fast(what i
am doing is displaying a sprite, wait 2 seconds, erase sprite, display sprite
over a few pixels, waiting 2 seconds, erase sprite, and go back to the
beginning...But I can't figure out what is going wrong here, it crashes my
calc but the only thing that is displayed is the prog description that is
usually displayed at the bottom of the usgard shell without the
shell(coolshell) appearing...that's odd, huh
please help...i am only a beginner trying to make a game...so no insults!
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
Follow-Ups: