diff --git a/assembler.js b/assembler.js index 9c6b8e8..ff9e116 100644 --- a/assembler.js +++ b/assembler.js @@ -20,7 +20,7 @@ exports.assemble = (str, debug = false) => { } // Configure pseudo-ops: -const POINTER_TO_CURRENT_ADDR_PSEUDO_OPERAND = '*addr'; +const POINTER_TO_CURRENT_ADDR_PSEUDO_OPERAND = '*'; const CONSTANT_PREFIX = '#'; const LABEL_PREFIX = '@'; diff --git a/notes/2023-08-21--dev-notes.md b/notes/2023-08-21--dev-notes.md index 5e109f4..0188043 100644 --- a/notes/2023-08-21--dev-notes.md +++ b/notes/2023-08-21--dev-notes.md @@ -3,7 +3,7 @@ ## Goals for today - graphic design - - [ ] graphics: 80 col card template + - [x] graphics: 80 col card template - see below - printing - [ ] print: paper tape template @@ -19,7 +19,7 @@ ### 2023-08-18 cardiograph loose thoughts -- use binary encodes punch cards for cardiog progs in machine code +- use binary encoded punch cards for cardiog progs in machine code - try making a microbit based emulator - (microbit + hex keypad) - (machine code monitor like VIP…) diff --git a/readme.md b/readme.md index 32c987a..58762ac 100644 --- a/readme.md +++ b/readme.md @@ -119,8 +119,8 @@ A 0 B F Z X C V ADD #foo ; use a constant as an operand - LDA *ADDR ; `*ADDR` is a magic value referencing the memory address - ; that the current line will store at after assembly + LDA * ; `*` is a special label referencing the memory address + ; where the current line will be stored after assembly - Hexadecimal numbers are preceded by a `$` - Whitespace is ignored \ No newline at end of file diff --git a/test-programs/referencing-addr-during-assembly.asm b/test-programs/referencing-program-counter-during-assembly.asm similarity index 83% rename from test-programs/referencing-addr-during-assembly.asm rename to test-programs/referencing-program-counter-during-assembly.asm index 77d5f37..2ab9518 100644 --- a/test-programs/referencing-addr-during-assembly.asm +++ b/test-programs/referencing-program-counter-during-assembly.asm @@ -1,9 +1,9 @@ ;; Test referencing address of line being assembled NOP ; Push the const below to a later address -#initAddr *ADDR +#initAddr * -LDA *ADDR +LDA * STO $25 FHP 0 ; hop if carry set JMP @setCarry