summaryrefslogtreecommitdiff
path: root/programs/sub-suite/subasm.s
diff options
context:
space:
mode:
Diffstat (limited to 'programs/sub-suite/subasm.s')
-rw-r--r--programs/sub-suite/subasm.s6
1 files changed, 4 insertions, 2 deletions
diff --git a/programs/sub-suite/subasm.s b/programs/sub-suite/subasm.s
index 56d13c2..ba8d2fb 100644
--- a/programs/sub-suite/subasm.s
+++ b/programs/sub-suite/subasm.s
@@ -139,8 +139,10 @@ subasm:
mov s, (s) ; Get the command ID.
cmp s, #7 ; Is the command ID greater than the command count?
bcs @end ; Yes, so we're done.
- lsl s, #1 ; No, so multiply the command ID by two.
- lea.w s, (cmd_srt+s) ; Get the pointer, from the command subroutine table.
+; lsl s, #1 ; No, so multiply the command ID by two.
+; lea.w s, (cmd_srt+s) ; Get the pointer, from the command subroutine table.
+ lea b, cmd_srt ; No, so get the address of the command subroutine table.
+ mov.w s, (b+2*s) ; Get the pointer, from the command subroutine table.
and #0 ; Reset A.
tab ; Reset B.
jsr s ; Run the command's subroutine.