mirror of
https://github.com/hsoft/collapseos.git
synced 2025-04-02 09:18:40 +11:00
zasm: remove direcData buffer
This commit is contained in:
parent
ad7428e471
commit
26d6dd1912
@ -31,8 +31,7 @@ handleDB:
|
|||||||
ld hl, scratchpad
|
ld hl, scratchpad
|
||||||
call parseLiteral
|
call parseLiteral
|
||||||
ld a, ixl
|
ld a, ixl
|
||||||
ld (direcData), a
|
call ioPutC
|
||||||
ld a, 1
|
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -41,11 +40,11 @@ handleDW:
|
|||||||
call readWord
|
call readWord
|
||||||
ld hl, scratchpad
|
ld hl, scratchpad
|
||||||
call parseExpr
|
call parseExpr
|
||||||
ld a, ixl
|
push ix \ pop hl
|
||||||
ld (direcData), a
|
ld a, l
|
||||||
ld a, ixh
|
call ioPutC
|
||||||
ld (direcData+1), a
|
ld a, h
|
||||||
ld a, 2
|
call ioPutC
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -128,8 +127,7 @@ getDirectiveID:
|
|||||||
|
|
||||||
; Parse directive specified in A (D_* const) with args in I/O and act in
|
; Parse directive specified in A (D_* const) with args in I/O and act in
|
||||||
; an appropriate manner. If the directive results in writing data at its
|
; an appropriate manner. If the directive results in writing data at its
|
||||||
; current location, that data is in (direcData) and A is the number of bytes
|
; current location, that data is directly written through ioPutC.
|
||||||
; in it.
|
|
||||||
parseDirective:
|
parseDirective:
|
||||||
push de
|
push de
|
||||||
; double A to have a proper offset in directiveHandlers
|
; double A to have a proper offset in directiveHandlers
|
||||||
@ -141,7 +139,3 @@ parseDirective:
|
|||||||
ld ixl, e
|
ld ixl, e
|
||||||
pop de
|
pop de
|
||||||
jp (ix)
|
jp (ix)
|
||||||
|
|
||||||
; *** Variables ***
|
|
||||||
direcData:
|
|
||||||
.fill 2
|
|
||||||
|
@ -171,18 +171,7 @@ _parseInstr:
|
|||||||
_parseDirec:
|
_parseDirec:
|
||||||
ld a, c ; D_*
|
ld a, c ; D_*
|
||||||
call parseDirective
|
call parseDirective
|
||||||
or a ; cp 0
|
cp a ; ensure Z
|
||||||
jr z, .success ; if zero, shortcut through
|
|
||||||
ld b, a ; save output byte count
|
|
||||||
ld hl, direcData
|
|
||||||
.loopDirec:
|
|
||||||
ld a, (hl)
|
|
||||||
call ioPutC
|
|
||||||
inc hl
|
|
||||||
djnz .loopDirec
|
|
||||||
; continue to success
|
|
||||||
.success:
|
|
||||||
xor a ; ensure Z
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
_parseLabel:
|
_parseLabel:
|
||||||
|
Loading…
Reference in New Issue
Block a user