mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-24 14:38:05 +11:00
zasm: add ERR_BAD_FMT
This commit is contained in:
parent
412b3f374a
commit
e1e6d52fea
@ -6,3 +6,5 @@
|
||||
; contains references to undefined symbols.
|
||||
.equ ERR_BAD_ARG 0x02
|
||||
|
||||
; Code is badly formatted (comma without a following arg, unclosed quote, etc.)
|
||||
.equ ERR_BAD_FMT 0x03
|
||||
|
@ -791,7 +791,7 @@ parseInstruction:
|
||||
call readComma
|
||||
jr nz, .nomorearg
|
||||
call readWord
|
||||
jr nz, .error
|
||||
jr nz, .badfmt
|
||||
ld de, curArg2
|
||||
call processArg
|
||||
jr nz, .error ; A is set to error
|
||||
@ -824,6 +824,8 @@ parseInstruction:
|
||||
djnz .loopWrite
|
||||
cp a ; ensure Z
|
||||
jr .end
|
||||
.badfmt:
|
||||
ld a, ERR_BAD_FMT
|
||||
.error:
|
||||
; A is set to error already
|
||||
call unsetZ
|
||||
|
Binary file not shown.
@ -18,3 +18,5 @@ chkerr() {
|
||||
|
||||
chkerr "foo" 1
|
||||
chkerr "ld a, foo" 2
|
||||
chkerr "ld a," 3
|
||||
chkerr "ld a, 'A" 3
|
||||
|
Loading…
Reference in New Issue
Block a user