mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 19:48:06 +11:00
zasm: support forward label references!
This commit is contained in:
parent
c239ec7dea
commit
c000d5cfb1
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user