assembler - Change label for program counter from `*addr` to `*`
This commit is contained in:
parent
9fa1bf5392
commit
5e1cf9e413
|
|
@ -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 = '@';
|
||||
|
||||
|
|
|
|||
|
|
@ -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…)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
Loading…
Reference in New Issue