command keys:

* command 1 - command 4 equivalent to PF1 - PF4
* command-delete = backspace (0x7f)
* command-return = linefeed (0x0a)
This commit is contained in:
Kelvin Sherlock 2022-01-28 22:25:33 -05:00
parent 9cf52cb34e
commit acfe94a4c7
1 changed files with 40 additions and 3 deletions

View File

@ -38,7 +38,7 @@ keypress ent
sta mod
sta KEYSTROBE
bit #kmOption!kmCommand
bne :command
bne command
bit #kmKeypad
bne keypad
@ -68,8 +68,45 @@ keypress ent
lda #$08
:send jmp dispatch
:command ; or option
rts
command ; or option
* apple-return -> linefeed
* apple-backspace -> delete
lda key
cmp #$7f
beq :bs
cmp #$0d
beq :lf
cmp #:MIN
blt :rts
cmp #:MAX+1
bcs :rts
sec
sbc #:MIN
asl
tax
jmp (:table,x)
:rts rts
:MIN equ 49
:MAX equ 52
:bs jmp dispatch ;
:lf lda #$0a
jmp dispatch
:table
dw pf1 ; 1
dw pf2 ; 2
dw pf3 ; 3
dw pf4 ; 4
keypad