implemented first escape sequences

This commit is contained in:
FeralChild64 authored and FeralChild64 committed 2021-01-26 00:03:07 +01:00
1 parent 2f98f2b2a4
commit 0c6e8bc68c
2 files changed
+38 -8

No files matched your search

@@ -9,13 +9,47 @@ m65_chrout_screen_escmode:
lda #$00
sta M65_ESCMODE
; XXX
; Select subroutine
m65_chrout_screen_escmode_end:
txa
; XXX cmp #$BD ; SHIFT + '@'
; XXX beq m65_chrout_esc_AT
sec
sbc #$30 ; '0'
cmp #$2E
bcs m65_chrout_esc_done
; XXX add workaround for SHIFT+key
asl
tax
jmp (m65_chrout_screen_jumptable_escape, x)
m65_chrout_esc_J: ; move cursor to the beginning of the line
lda #$00
sta M65__TXTCOL
bra m65_chrout_esc_done
m65_chrout_esc_O: ; cancel quote, reverse, underline, flash, etc
lda COLOR
and #$0F
sta COLOR
lda #$00
sta QTSW
sta INSRT
sta RVS
; FALLTROUGH
m65_chrout_esc_done:
jmp m65_chrout_screen_done
; XXX: implement screen routines below:
m65_chrout_esc_0:
@@ -58,8 +92,6 @@ m65_chrout_esc_H:
+nop
m65_chrout_esc_I:
+nop
m65_chrout_esc_J:
+nop
m65_chrout_esc_K:
+nop
m65_chrout_esc_L:
@@ -68,8 +100,6 @@ m65_chrout_esc_M:
+nop
m65_chrout_esc_N:
+nop
m65_chrout_esc_O:
+nop
m65_chrout_esc_P:
+nop
m65_chrout_esc_Q:
@@ -123,8 +123,8 @@ m65_chrout_screen_jumptable_escape:
!word m65_chrout_esc_7
!word m65_chrout_esc_8
!word m65_chrout_esc_9
!word m65_chrout_screen_done ; ':'
!word m65_chrout_screen_done ; ';'
!word m65_chrout_esc_LBR ; ':'
!word m65_chrout_esc_RBR ; ';'
!word m65_chrout_screen_done ; '<'
!word m65_chrout_screen_done ; '='
!word m65_chrout_screen_done ; '>'