mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-24 14:18:06 +11:00
zasm: support multiple elements in .dw and .db
This commit is contained in:
parent
b0318f4891
commit
16922da3d4
@ -27,16 +27,20 @@ directiveHandlers:
|
||||
|
||||
handleDB:
|
||||
push hl
|
||||
.loop:
|
||||
call readWord
|
||||
ld hl, scratchpad
|
||||
call parseLiteral
|
||||
ld a, ixl
|
||||
call ioPutC
|
||||
call readComma
|
||||
jr z, .loop
|
||||
pop hl
|
||||
ret
|
||||
|
||||
handleDW:
|
||||
push hl
|
||||
.loop:
|
||||
call readWord
|
||||
ld hl, scratchpad
|
||||
call parseExpr
|
||||
@ -45,6 +49,8 @@ handleDW:
|
||||
call ioPutC
|
||||
ld a, h
|
||||
call ioPutC
|
||||
call readComma
|
||||
jr z, .loop
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
@ -5,9 +5,9 @@ label1:
|
||||
ld hl, label2
|
||||
.dw label2
|
||||
; comment
|
||||
.db 42
|
||||
.db 42, 54
|
||||
label2: .dw 0x42
|
||||
.dw 3742
|
||||
.dw 3742, 0xffff
|
||||
.dw 0x3742
|
||||
ld a, (label1)
|
||||
rla \ rla
|
||||
|
Loading…
Reference in New Issue
Block a user