X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fapple2%2Fcgetc.s;h=511e434df089735e43d6e70d53d086be70318087;hb=7ebaec18024dc2a94de538637c20c5b4c65e530c;hp=d0695cdb5b3761a909de9012c19fcc0fca81af91;hpb=071c58bda25a3c02296c35652feddda27800ff35;p=cc65 diff --git a/libsrc/apple2/cgetc.s b/libsrc/apple2/cgetc.s index d0695cdb5..511e434df 100644 --- a/libsrc/apple2/cgetc.s +++ b/libsrc/apple2/cgetc.s @@ -11,13 +11,15 @@ .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