Re: A86: Looping
[Prev][Next][Index][Thread]
Re: A86: Looping
In a message dated 97-10-04 00:18:39 EDT, you write:
>
> you have to push and pop another djnz loop right before then end of the
> first one to get a getkey do this:
>
> no_key:
> call _getkey ;result stored in a
> cp 0 ; no key pressed
> jr z,no_key ; no key was pressed so go back to no_key
> key_pressed:
> .
> .
> .
If you're using _getkey, you don't need to cp 0, because the zero flag is
automatically set when no key is pressed. Also, a quicker (and shorter) way
of doing cp 0 is or a.
~Steve