disabled function keys for non-direct mode and for MONITOR
This commit is contained in:
1 parent
d6f0495339
commit
a67b8fec1e
3 files changed
+20
-9
No files matched your search
@@ -13,33 +13,39 @@
|
|||||||
|
|
||||||
chrin_programmable_keys:
|
chrin_programmable_keys:
|
||||||
|
|
||||||
|
; Check if in direct mode
|
||||||
|
|
||||||
|
ldx CURLIN+1
|
||||||
|
inx
|
||||||
|
bne @2
|
||||||
|
|
||||||
; Check if the key is programmable
|
; Check if the key is programmable
|
||||||
|
|
||||||
ldx #(__programmable_keys_codes_end - programmable_keys_codes - 1)
|
ldx #(__programmable_keys_codes_end - programmable_keys_codes - 1)
|
||||||
@1:
|
@1:
|
||||||
cmp programmable_keys_codes, x
|
cmp programmable_keys_codes, x
|
||||||
beq @2
|
beq @3
|
||||||
dex
|
dex
|
||||||
bpl @1
|
bpl @1
|
||||||
|
|
||||||
; This is not a programmable key
|
; This is not a programmable key
|
||||||
|
@2:
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
@2:
|
@3:
|
||||||
; .X contains index of the key code, we need offset to key string instead
|
; .X contains index of the key code, we need offset to key string instead
|
||||||
|
|
||||||
lda programmable_keys_offsets, x
|
lda programmable_keys_offsets, x
|
||||||
tax
|
tax
|
||||||
|
|
||||||
; Print all the characters assigned to key
|
; Print all the characters assigned to key
|
||||||
@3:
|
@4:
|
||||||
lda programmable_keys_strings, x
|
lda programmable_keys_strings, x
|
||||||
beq @4
|
beq @5
|
||||||
jsr CHROUT ; our implementation preserves .X too
|
jsr CHROUT ; our implementation preserves .X too
|
||||||
inx
|
inx
|
||||||
bne @3 ; jumps always
|
bne @4 ; jumps always
|
||||||
@4:
|
@5:
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,11 @@
|
|||||||
!addr Op_Ix = $2E ; type of constant
|
!addr Op_Ix = $2E ; type of constant
|
||||||
!addr Op_Len = $2F ; length of operand
|
!addr Op_Len = $2F ; length of operand
|
||||||
|
|
||||||
; $30-$62 - free space, unused for now
|
; $30-$39 - free space, unused for now
|
||||||
|
|
||||||
|
!addr Key_Direct = $3A ; same as CURLIN+1
|
||||||
|
|
||||||
|
; $3B-$62 - free space, unused for now
|
||||||
|
|
||||||
!addr Byte_TMP = $63 ; temporary byte
|
!addr Byte_TMP = $63 ; temporary byte
|
||||||
!addr Long_TMP = $64 ; temporary pointer, for fetching/storing memory content; has to be the same as Long__TMP in Kernal
|
!addr Long_TMP = $64 ; temporary pointer, for fetching/storing memory content; has to be the same as Long__TMP in Kernal
|
||||||
|
|||||||
+2
-1
@@ -43,7 +43,8 @@ Mon_Start:
|
|||||||
TSX
|
TSX
|
||||||
STX SPL
|
STX SPL
|
||||||
STX SP_Storage
|
STX SP_Storage
|
||||||
LDA #$c0
|
LDA #$C0
|
||||||
|
STA Key_Direct ; to disable function keys
|
||||||
JSR SETMSG
|
JSR SETMSG
|
||||||
CLI
|
CLI
|
||||||
+NOP
|
+NOP
|
||||||
|
|||||||
Reference in new issue
Block a user