mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-25 05:08:05 +11:00
zasm: fix first pass inversion bug
Also, confirm in tests that we can refer to other symbols in `.equ`.
This commit is contained in:
parent
6aa53afabc
commit
d6f5cf5b90
@ -50,7 +50,7 @@ handleDW:
|
||||
|
||||
handleEQU:
|
||||
call zasmIsFirstPass
|
||||
jr z, .begin
|
||||
jr nz, .begin
|
||||
; first pass? .equ are noops
|
||||
xor a
|
||||
ret
|
||||
@ -74,7 +74,6 @@ handleEQU:
|
||||
call toWord
|
||||
call readWord
|
||||
ld hl, scratchpad
|
||||
ld a, (hl)
|
||||
call parseNumberOrSymbol
|
||||
jr nz, .error
|
||||
ld hl, DIREC_SCRATCHPAD
|
||||
|
@ -11,5 +11,6 @@ label2:
|
||||
.dw 3742
|
||||
.dw 0x3742
|
||||
ld a, (label1)
|
||||
.equ foobar 0x1234
|
||||
ld hl, foobar
|
||||
.equ foo 0x1234
|
||||
.equ bar foo
|
||||
ld hl, bar
|
||||
|
Loading…
Reference in New Issue
Block a user