From f16af793a58a9f398fc598a0c129e3bb90eb61f6 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sat, 8 Aug 2020 18:11:35 -0400 Subject: - Refactored the opcode table, in order to make the instruction formatting simpler. - Refactored the instruction table of the emulator's assembler, it now has two parts, the addressing mode bits, and the base value. The base value is what's used to generate the actual opcode, with the addressing mode bits telling the assembler what addressing modes this instruction supports. The reason for doing this was to use less space. For comparison, the previous version used 870 bytes for the instruction table, while the new version uses only 222 bytes. The new version is nearly 4 times smaller than the pervious version. - The B register based ALU instructions now use their own addressing mode, and are specified by using 'b' as the operand for those instructions. For example, to add the Accumulator with the B register, you now use "ADC B" instead of "AAB". --- test/ind-addr.s | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/ind-addr.s') diff --git a/test/ind-addr.s b/test/ind-addr.s index 005c016..aa4686b 100644 --- a/test/ind-addr.s +++ b/test/ind-addr.s @@ -14,11 +14,11 @@ main: jmp main rotate_left: - rlb + rol b rts rotate_right: - rrb + ror b rts .org $FFC0 @@ -26,4 +26,3 @@ rotate_right: a d - -- cgit v1.2.3-13-gbd6f