Use 8-bit accumulator to read softswitches

This commit is contained in:
Lucas Scharenbroich 2021-08-15 09:25:42 -05:00
parent 2540359f60
commit 5ad95f4609
1 changed files with 7 additions and 4 deletions

View File

@ -1115,8 +1115,9 @@ ClearKeyboardStrobe sep #$20
ReadControl
pea $0000 ; low byte = key code, high byte = %------AB
sep #$20
ldal OPTION_KEY_REG ; 'B' button
and #$0080
and #$80
beq :BNotDown
lda #1
@ -1125,7 +1126,7 @@ ReadControl
:BNotDown
ldal COMMAND_KEY_REG
and #$0080
and #$80
beq :ANotDown
lda #2
@ -1134,13 +1135,14 @@ ReadControl
:ANotDown
ldal KBD_STROBE_REG ; read the keyboard
bit #$0080
bit #$80
beq :KbdNotDwn ; check the key-down status
and #$007f
and #$7f
ora 1,s
sta 1,s
:KbdNotDwn
rep #$20
pla
rts
@ -1293,3 +1295,4 @@ qtRec adrl $0000