From 87fa3e147f1e2a626b21498e78782e5e685ece29 Mon Sep 17 00:00:00 2001 From: cpg Date: Wed, 7 Jun 2000 22:10:45 +0000 Subject: [PATCH] fixed it and saved 1 byte git-svn-id: svn://svn.cc65.org/cc65/trunk@27 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/atari/kbhit.s | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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 -- 2.39.5