From c96ba2b2678e4b92e7969c683d4cb3f1648af813 Mon Sep 17 00:00:00 2001 From: Jacques Comeaux Date: Sun, 19 May 2024 13:52:10 -0500 Subject: Rework assembler for simplified instruction set - Remove commas and brackets from syntax - Rename opcodes for unambiguous instruction encodings - Redesign parse instruction encoding - Implement opcode parser - Add bit-width restriction to octal parser --- assembler/notes | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 assembler/notes (limited to 'assembler/notes') diff --git a/assembler/notes b/assembler/notes deleted file mode 100644 index 6206eff..0000000 --- a/assembler/notes +++ /dev/null @@ -1,35 +0,0 @@ -Clobber -R0: arg1, uart result -R1: arg2 -R2: -R3: shift_amount -------------- -Save -R4: octal result, register result -R5: word under construction -R6: parse instructions -R8: -R9: end_char - -1yyyxxxx Imm yyy = shift amount xxxx = bit-width -00000001 Brackets -0011yyyy Reg yyyy = shift amount -0100yyyy Reg - -MOVS 0x 00 00 88 38 -ADDS 0x 00 00 88 38 -SUBS 0x 00 00 88 38 -CMP 0x 00 00 33 30 -ANDS 0x 00 00 33 30 -ORRS 0x 00 00 33 30 -TST 0x 00 00 33 30 -LSLS 0x 00 E5 33 30 -LSRS 0x 00 E5 33 30 -RORS 0x 00 00 33 30 -LDR 0x E5 33 01 30 -LDRB 0x 36 33 01 30 -STR 0x E5 33 01 30 -STRB 0x 36 33 01 30 -B 0x 00 00 00 88 -B 0x 00 00 00 8B -BX 0x 00 00 00 43 -- cgit v1.2.3