]> git.sur5r.net Git - cc65/commitdiff
New cgetc with apple2enh fix from Oliver Scmidt
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 8 Apr 2005 19:27:07 +0000 (19:27 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 8 Apr 2005 19:27:07 +0000 (19:27 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3454 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/apple2/cgetc.s

index d0695cdb5b3761a909de9012c19fcc0fca81af91..ddd463e437d41460ba6770540f3e1324efd8d90b 100644 (file)
         .include "apple2.inc"
 
 _cgetc:
-        lda    KBD
-        bpl    _cgetc          ; if < 128, no key pressed
+        lda     KBD
+        bpl     _cgetc         ; if < 128, no key pressed
 
         ; At this time, the high bit of the key pressed is set
-        bit    KBDSTRB         ; clear keyboard strobe
-        bit    BUTN0           ; check if OpenApple is down
-        bmi    :+
-        and    #$7F            ; If not down, then clear high bit
-:       ldx    #$00
+        bit     KBDSTRB        ; clear keyboard strobe
+        .ifdef __APPLE2ENH__
+        bit     BUTN0          ; check if OpenApple is down
+        bmi     done
+        .endif
+        and     #$7F           ; If not down, then clear high bit
+done:   ldx    #$00
         rts