From: cpg Date: Wed, 7 Jun 2000 22:10:45 +0000 (+0000) Subject: fixed it and saved 1 byte X-Git-Tag: V2.12.0~3485 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=87fa3e147f1e2a626b21498e78782e5e685ece29;p=cc65 fixed it and saved 1 byte git-svn-id: svn://svn.cc65.org/cc65/trunk@27 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- 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