mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 22:38:06 +11:00
zasm: make DE indicate the last line to be read
Facilitates debugging
This commit is contained in:
parent
dd6fa5d38b
commit
1e3982d3ab
@ -88,10 +88,14 @@ incOutputOffset:
|
|||||||
pop de
|
pop de
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
; Repeatedly reads lines from IO, assemble them and spit the binary code in
|
||||||
|
; IO. Z is set on success, unset on error. DE contains the last line number to
|
||||||
|
; be read (first line is 1).
|
||||||
zasmParseFile:
|
zasmParseFile:
|
||||||
ld hl, 0
|
ld de, 0
|
||||||
ld (curOutputOffset), hl
|
ld (curOutputOffset), de
|
||||||
.loop:
|
.loop:
|
||||||
|
inc de
|
||||||
call ioReadLine
|
call ioReadLine
|
||||||
or a ; is A 0?
|
or a ; is A 0?
|
||||||
ret z ; We have EOF
|
ret z ; We have EOF
|
||||||
|
@ -119,6 +119,7 @@ int main()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
fprintf(stderr, "Ended with A=%d DE=%d\n", cpu.R1.br.A, cpu.R1.wr.DE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user