]> git.sur5r.net Git - cc65/blobdiff - libsrc/apple2/kbhit.s
fix comments
[cc65] / libsrc / apple2 / kbhit.s
index 8c6f021584e31d39b8670a7eb7acd2a2c27798b5..c4efb38d6491dbab3b248500118ef9044dd9347c 100644 (file)
@@ -1,18 +1,18 @@
-       ;;
-       ;; Kevin Ruland
-       ;;
-       ;; int kbhit (void);
-       ;;
+;
+; Kevin Ruland
+; Ullrich von Bassewitz, 2005-03-25
+;
+; unsigned char kbhit (void);
+;
 
-       .export _kbhit
+        .export _kbhit
 
-       .import return0, return1
-       
-       .include "apple2.inc"
+        .include "apple2.inc"
 
 _kbhit:
-       bit     KBD             ; Reading keyboard checks for keypress
-       bmi     L1              ; if KBD > 127 key was pressed
-       jmp     return0
-L1:
-       jmp     return1
+        lda     KBD             ; Reading KBD checks for keypress
+        rol                     ; if high bit is set, key was pressed
+        lda     #$00
+        tax
+        rol
+        rts