mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 16:18:05 +11:00
zasm: properly raise error on bas ioPutC calls
This commit is contained in:
parent
7ba8e85a4a
commit
3e7d181d3c
@ -50,12 +50,16 @@ handleDB:
|
||||
jr nz, .overflow ; not zero? overflow
|
||||
ld a, l
|
||||
call ioPutC
|
||||
jr nz, .ioError
|
||||
.stopStrLit:
|
||||
call readComma
|
||||
jr z, .loop
|
||||
cp a ; ensure Z
|
||||
pop hl
|
||||
ret
|
||||
.ioError:
|
||||
ld a, SHELL_ERR_IO_ERROR
|
||||
jr .error
|
||||
.badfmt:
|
||||
ld a, ERR_BAD_FMT
|
||||
jr .error
|
||||
|
@ -823,10 +823,14 @@ parseInstruction:
|
||||
.loopWrite:
|
||||
ld a, (hl)
|
||||
call ioPutC
|
||||
jr nz, .ioError
|
||||
inc hl
|
||||
djnz .loopWrite
|
||||
cp a ; ensure Z
|
||||
jr .end
|
||||
.ioError:
|
||||
ld a, SHELL_ERR_IO_ERROR
|
||||
jr .error
|
||||
.overflow:
|
||||
ld a, ERR_OVFL
|
||||
jr .error
|
||||
|
@ -152,6 +152,7 @@ ioPutC:
|
||||
jp _blkPutC
|
||||
.skip:
|
||||
pop af
|
||||
cp a ; ensure Z
|
||||
ret
|
||||
|
||||
ioSavePos:
|
||||
|
@ -529,11 +529,13 @@ sdcSync:
|
||||
.buf1Ok:
|
||||
ld de, SDC_BUFSEC1
|
||||
ld (SDC_BUFPTR), de
|
||||
; Z already set
|
||||
jr .end
|
||||
|
||||
.buf2Ok:
|
||||
ld de, SDC_BUFSEC2
|
||||
ld (SDC_BUFPTR), de
|
||||
; Z already set
|
||||
; to .end
|
||||
.end:
|
||||
pop de
|
||||
|
@ -82,6 +82,7 @@ emulGetC:
|
||||
|
||||
emulPutC:
|
||||
out (STDIO_PORT), a
|
||||
cp a ; ensure Z
|
||||
ret
|
||||
|
||||
fsdevGetC:
|
||||
@ -111,6 +112,7 @@ fsdevPutC:
|
||||
jr nz, .error
|
||||
pop af
|
||||
out (FS_DATA_PORT), a
|
||||
cp a ; ensure Z
|
||||
ret
|
||||
.error:
|
||||
pop af
|
||||
|
Loading…
Reference in New Issue
Block a user