mirror of
https://github.com/ksherlock/itty-bitty-vtty.git
synced 2024-11-21 20:30:56 +00:00
command keys:
* command 1 - command 4 equivalent to PF1 - PF4 * command-delete = backspace (0x7f) * command-return = linefeed (0x0a)
This commit is contained in:
parent
9cf52cb34e
commit
acfe94a4c7
43
vt100.key.S
43
vt100.key.S
@ -38,7 +38,7 @@ keypress ent
|
|||||||
sta mod
|
sta mod
|
||||||
sta KEYSTROBE
|
sta KEYSTROBE
|
||||||
bit #kmOption!kmCommand
|
bit #kmOption!kmCommand
|
||||||
bne :command
|
bne command
|
||||||
|
|
||||||
bit #kmKeypad
|
bit #kmKeypad
|
||||||
bne keypad
|
bne keypad
|
||||||
@ -68,8 +68,45 @@ keypress ent
|
|||||||
lda #$08
|
lda #$08
|
||||||
:send jmp dispatch
|
:send jmp dispatch
|
||||||
|
|
||||||
:command ; or option
|
command ; or option
|
||||||
rts
|
|
||||||
|
* 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
|
keypad
|
||||||
|
Loading…
Reference in New Issue
Block a user