mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 00:29:31 +00:00
New cgetc with apple2enh fix from Oliver Scmidt
git-svn-id: svn://svn.cc65.org/cc65/trunk@3454 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
1c5c974200
commit
b0117e1e22
@ -11,13 +11,15 @@
|
|||||||
.include "apple2.inc"
|
.include "apple2.inc"
|
||||||
|
|
||||||
_cgetc:
|
_cgetc:
|
||||||
lda KBD
|
lda KBD
|
||||||
bpl _cgetc ; if < 128, no key pressed
|
bpl _cgetc ; if < 128, no key pressed
|
||||||
|
|
||||||
; At this time, the high bit of the key pressed is set
|
; At this time, the high bit of the key pressed is set
|
||||||
bit KBDSTRB ; clear keyboard strobe
|
bit KBDSTRB ; clear keyboard strobe
|
||||||
bit BUTN0 ; check if OpenApple is down
|
.ifdef __APPLE2ENH__
|
||||||
bmi :+
|
bit BUTN0 ; check if OpenApple is down
|
||||||
and #$7F ; If not down, then clear high bit
|
bmi done
|
||||||
: ldx #$00
|
.endif
|
||||||
|
and #$7F ; If not down, then clear high bit
|
||||||
|
done: ldx #$00
|
||||||
rts
|
rts
|
||||||
|
Loading…
Reference in New Issue
Block a user