summaryrefslogtreecommitdiff
path: root/programs/sub-suite
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-05-08 13:16:32 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-05-08 13:16:32 -0400
commit875dff40ad71847d59c272491e516e4b1f01058c (patch)
tree652db53edbdfff5c1f7f6be95b8b1ddb63a9faa2 /programs/sub-suite
parenta9671258f0df7892135797443c9dd9839be80a11 (diff)
Get the pointer from the control code handler table
using SIB, rather than with lsl. This doesn't increase, or decrease the code size, but does make it both more compact, and easier to read.
Diffstat (limited to 'programs/sub-suite')
-rw-r--r--programs/sub-suite/subeditor.s4
1 files changed, 2 insertions, 2 deletions
diff --git a/programs/sub-suite/subeditor.s b/programs/sub-suite/subeditor.s
index aa9482a..800d565 100644
--- a/programs/sub-suite/subeditor.s
+++ b/programs/sub-suite/subeditor.s
@@ -412,8 +412,8 @@ print_char:
; inc step ;
lda rega ; Get the character back.
jsr get_ctrlidx ; Get the control code jump table index.
- lsl #1 ; Multiply the return value by two, to get the index.
- lea.w e, (ct_jtb+a); Get the address of the control code handler.
+ 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.
tba ; Reset A.
jsr (e) ; Jump to the handler for that control code.