[A83] Re: GetKey loops
[Prev][Next][Index][Thread]
[A83] Re: GetKey loops
I definitely don't reccomend using bcall(_getkey). Instead, put a label
somwehere in your program called waitkey:
WaitKey: ;this routine is much better than bcallgetkey
ei ;because it disaples APD(autopowerdown)
WaitKeyLoop: ;and allows use of 2nd and ALPHA
halt
bcall(_getcsc) ;calls getcsc
or a
jr z,WaitKeyLoop ;if nothing pressed, jp waitkey loop
ret
mainloop:
call waitkey
cp gEnter
jp z,EnterorLeft
cp gLeft
jp z,EnterorLeft
jp notenterorleft