diff --git a/apps/zasm/symbol.asm b/apps/zasm/symbol.asm index 881e2a4..9a4677d 100644 --- a/apps/zasm/symbol.asm +++ b/apps/zasm/symbol.asm @@ -169,6 +169,9 @@ symFind: ; Return value associated with symbol string in (HL) into DE. ; Sets Z on success, unset on error. symGetVal: + call zasmIsFirstPass + ret z ; first pass? we don't care about the value, + ; return success. call symFind ret nz ; not found ; our index is in A. Let's fetch the proper value diff --git a/apps/zasm/tests/test1.asm b/apps/zasm/tests/test1.asm index b746383..faa81a3 100644 --- a/apps/zasm/tests/test1.asm +++ b/apps/zasm/tests/test1.asm @@ -2,6 +2,7 @@ add a, b ; comment label1: inc a ; comment + ld hl, label2 ; comment .db 42 label2: @@ -9,4 +10,3 @@ label2: .dw 3742 .dw 0x3742 ld a, (label1) - ld hl, label2