summaryrefslogtreecommitdiff
path: root/programs/sub-suite/subeditor.s
diff options
context:
space:
mode:
Diffstat (limited to 'programs/sub-suite/subeditor.s')
-rw-r--r--programs/sub-suite/subeditor.s8
1 files changed, 5 insertions, 3 deletions
diff --git a/programs/sub-suite/subeditor.s b/programs/sub-suite/subeditor.s
index 800d565..4723b60 100644
--- a/programs/sub-suite/subeditor.s
+++ b/programs/sub-suite/subeditor.s
@@ -403,15 +403,17 @@ print_char:
phb.q ; Preserve B.
phx.q ; Preserve X.
phe.q ; Preserve E.
+ xor s, s ; Reset S.
sta rega ; Preserve the character.
ldb #2 ; Make sure that set_ptr sets the third pointer.
lda.q buffer ; Set the third pointer to the start of the screen buffer.
jsr set_ptr ;
deb ; Set B to one.
tba ; Reset A.
-; inc step ;
- lda rega ; Get the character back.
- jsr get_ctrlidx ; Get the control code jump table index.
+ lea d, ctrl_codes; Get the pointer to the control codes table.
+ mov s, rega ; Get the character back.
+ lea f, 0 ; Set the mode of get_index to increment mode.
+ jsr get_index ; Get the control code handler index.
lea ct_jtb ; Get the pointer to the jump table.
mov.w e, (e+2*a); Get the address of the control code handler.
deb ; Reset B.