Re: A86: Pause


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

Re: A86: Pause




> 2)  Do a little loop like this:
> 
>         ld a,1
> loop:
>         inc a
>         cp xxx
>         jr nz,loop
>         more code
> 

a little adjustment to the above code:

 ld b,$05 ;adjust this value to accomadate the pause you want
loop1:
 push bc
loop2:
 ld b,$ff
 call _getkey
 cp <whatever key you want to exit the loop with>
 jp z,outofloop
 djnz loop2
 pop bc
 djnz loop1

outofloop:


References: