Procházet zdrojové kódy

zasm: fix first pass inversion bug

Also, confirm in tests that we can refer to other symbols in `.equ`.
pull/10/head
Virgil Dupras před 5 roky
rodič
revize
d6f5cf5b90
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. +1
    -2
      apps/zasm/directive.asm
  2. +3
    -2
      apps/zasm/tests/test1.asm

+ 1
- 2
apps/zasm/directive.asm Zobrazit soubor

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


+ 3
- 2
apps/zasm/tests/test1.asm Zobrazit soubor

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

Načítá se…
Zrušit
Uložit