X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fatari%2Fkbhit.s;h=e066aacd4ed899e0257b8ba010bcfaefee9d8847;hb=a63d35278cbfa7d3b1df34d2fb329e758e8cddc4;hp=25418c15d016c7c67e4054621c16859c1f1aa342;hpb=53dd513176425872128ef26031d00952ef7a0628;p=cc65 diff --git a/libsrc/atari/kbhit.s b/libsrc/atari/kbhit.s index 25418c15d..e066aacd4 100644 --- a/libsrc/atari/kbhit.s +++ b/libsrc/atari/kbhit.s @@ -1,5 +1,5 @@ ; -; Ullrich von Bassewitz, 06.08.1998 +; Christian Groessler, 19-Feb-2000 ; ; int kbhit (void); ; @@ -10,12 +10,8 @@ .include "atari.inc" _kbhit: - lda CH ; Get number of characters - cmp #$FF - bne L1 - jmp return1 -L1: jmp return0 - - - - + ldx CH ; last pressed key + inx ; 255 means "no key" + bne L1 + jmp return0 +L1: jmp return1