zasm: properly propagate error conditions

Gives clearer output on errors. Easier debugging...
This commit is contained in:
Virgil Dupras 2019-05-12 21:31:11 -04:00
parent 86cad39de4
commit dd6fa5d38b

View File

@ -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