1
0
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:
Virgil Dupras 2019-05-12 08:50:29 -04:00
parent 6aa53afabc
commit d6f5cf5b90
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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