From 04cc80c19d763f6de4ef5c3baac5026e5e6969b3 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sun, 4 Apr 2021 12:39:34 -0400 Subject: - Fixed a bug to do with how SIB operands were parsed in the assembler. - Rewrote more of the SuB Suite to use the new calling convention. - Fixed a bug to do with SIB operands in the emulator's disassembler. - Made the MMV instruction not require a loop prefix for copying data. --- programs/sub-suite/subasm.s | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'programs/sub-suite/subasm.s') 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. -- cgit v1.2.3-13-gbd6f