screen editor now supports tabulators

This commit is contained in:
FeralChild64 committed 2019-10-31 17:10:03 +01:00
1 parent 01024278f4
commit bdcebb554f
11 files changed
+84 -19

No files matched your search

+4 -1
View File
@@ -12,6 +12,7 @@ chrout_screen_CRSR_UP:
sta PNTR
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_DOWN:
lda PNTR
@@ -25,15 +26,17 @@ chrout_screen_CRSR_DOWN:
jsr screen_scroll_up_if_on_last_line
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_LEFT:
lda TBLX
ora PNTR
beq !+ // recalculating pointer is not really necessary, but this is a very rare case nevertheless
beq !+ // top-left corner, recalculating pointer is not necessary, but this is a very rare case nevertheless
dec PNTR
!:
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_RIGHT:
inc PNTR
@@ -24,6 +24,10 @@ __chrout_screen_jumptable_quote_guard:
#if CONFIG_EDIT_STOPQUOTE
.byte KEY_STOP
#endif
#if CONFIG_EDIT_TABULATORS
.byte KEY_TAB_BW
.byte KEY_TAB_FW
#endif
.byte KEY_INS
.byte KEY_DEL
@@ -48,6 +52,10 @@ chrout_screen_jumptable_lo:
.byte <(chrout_screen_CRSR_UP - 1)
#if CONFIG_EDIT_STOPQUOTE
.byte <(chrout_screen_STOP - 1)
#endif
#if CONFIG_EDIT_TABULATORS
.byte <(chrout_screen_TAB_BW - 1)
.byte <(chrout_screen_TAB_FW - 1)
#endif
.byte <(chrout_screen_INS - 1)
.byte <(chrout_screen_DEL - 1)
@@ -69,6 +77,10 @@ chrout_screen_jumptable_hi:
.byte >(chrout_screen_CRSR_UP - 1)
#if CONFIG_EDIT_STOPQUOTE
.byte >(chrout_screen_STOP - 1)
#endif
#if CONFIG_EDIT_TABULATORS
.byte >(chrout_screen_TAB_BW - 1)
.byte >(chrout_screen_TAB_FW - 1)
#endif
.byte >(chrout_screen_INS - 1)
.byte >(chrout_screen_DEL - 1)
+33
View File
@@ -0,0 +1,33 @@
//
// Tabulation keys handling within CHROUT
//
#if CONFIG_EDIT_TABULATORS
chrout_screen_TAB_FW:
lda PNTR
ora #%00000111
sta PNTR
inc PNTR
jmp chrout_screen_calc_lptr_done
chrout_screen_TAB_BW:
lda TBLX
ora PNTR
beq !+ // top-left corner, recalculating pointer is not necessary, but this is a very rare case nevertheless
dec PNTR
lda PNTR
and #%11111000
sta PNTR
!:
jmp chrout_screen_calc_lptr_done
#endif // CONFIG_EDIT_TABULATORS