From 01c8e7399cc940d2d5d0540593e16724948bd6e3 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sat, 8 May 2021 14:58:44 -0400 Subject: Replace get_ctrlidx with get_index in print_char. This helps reduce code duplication, and makes it easier to both read, and add new handlers. --- programs/sub-suite/declare.s | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'programs/sub-suite/declare.s') diff --git a/programs/sub-suite/declare.s b/programs/sub-suite/declare.s index 36a4f15..f61b3a2 100644 --- a/programs/sub-suite/declare.s +++ b/programs/sub-suite/declare.s @@ -881,13 +881,13 @@ ct_rtb: ; Jump table for print_char's control codes. ct_jtb: - .word printc ; Everything else (print it). .word nl ; Newline. .word bs ; Backspace. .word clr_scr ; Ctrl+L. .word en_step ; Ctrl+S. .word dis_step ; Ctrl+R. .word esc ; Escape. + .word printc ; Everything else (print it). ; Jump table for parsing pre-tokens. swtab: @@ -932,3 +932,6 @@ dtab: ; Compare, and return table for isdelm2. dtab2: .byte "),.+<|>-=;\n" +; Control code table for print_char. +ctrl_codes: + .byte "\n\b\x0C\x13\x12\e" -- cgit v1.2.3-13-gbd6f