1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-28 19:29:53 +00:00

fixed it and saved 1 byte

git-svn-id: svn://svn.cc65.org/cc65/trunk@27 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cpg 2000-06-07 22:10:45 +00:00
parent 68cf78c01d
commit 87fa3e147f

View File

@ -1,5 +1,5 @@
; ;
; Ullrich von Bassewitz, 06.08.1998 ; Christian Groessler, 19-Feb-2000
; ;
; int kbhit (void); ; int kbhit (void);
; ;
@ -10,12 +10,8 @@
.include "atari.inc" .include "atari.inc"
_kbhit: _kbhit:
lda CH ; Get number of characters ldx CH ; last pressed key
cmp #$FF inx ; 255 means "no key"
bne L1 bne L1
jmp return1 jmp return0
L1: jmp return0 L1: jmp return1