zasm: properly propagate error conditions
Gives clearer output on errors. Easier debugging...
This commit is contained in:
parent
86cad39de4
commit
dd6fa5d38b
@ -65,6 +65,7 @@ zasmMain:
|
|||||||
ld a, 1
|
ld a, 1
|
||||||
ld (ZASM_FIRST_PASS), a
|
ld (ZASM_FIRST_PASS), a
|
||||||
call zasmParseFile
|
call zasmParseFile
|
||||||
|
ret nz
|
||||||
; Second pass
|
; Second pass
|
||||||
call ioRewind
|
call ioRewind
|
||||||
xor a
|
xor a
|
||||||
@ -95,7 +96,7 @@ zasmParseFile:
|
|||||||
or a ; is A 0?
|
or a ; is A 0?
|
||||||
ret z ; We have EOF
|
ret z ; We have EOF
|
||||||
call parseLine
|
call parseLine
|
||||||
ret nz
|
ret nz ; error
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
; Parse line in (HL), write the resulting opcode(s) in (DE) and increases
|
; Parse line in (HL), write the resulting opcode(s) in (DE) and increases
|
||||||
|
Loading…
Reference in New Issue
Block a user