mirror of
https://github.com/irmen/prog8.git
synced 2025-02-19 11:31:07 +00:00
add generic error in diskio.status() if drive status can't be read
This commit is contained in:
parent
7bac7bdc3e
commit
1a59019fc8
@ -353,11 +353,15 @@ _end rts
|
|||||||
messageptr++
|
messageptr++
|
||||||
}
|
}
|
||||||
|
|
||||||
io_error:
|
|
||||||
@(messageptr) = 0
|
@(messageptr) = 0
|
||||||
|
done:
|
||||||
c64.CLRCHN() ; restore default i/o devices
|
c64.CLRCHN() ; restore default i/o devices
|
||||||
c64.CLOSE(15)
|
c64.CLOSE(15)
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
|
io_error:
|
||||||
|
filename = "?disk error"
|
||||||
|
goto done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ internal class AsmGen(private val program: Program,
|
|||||||
out("* = ${program.actualLoadAddress.toHex()}")
|
out("* = ${program.actualLoadAddress.toHex()}")
|
||||||
val year = LocalDate.now().year
|
val year = LocalDate.now().year
|
||||||
out(" .word (+), $year")
|
out(" .word (+), $year")
|
||||||
out(" .null $9e, format(' %d ', _prog8_entrypoint), $3a, $8f, ' prog8 by idj'")
|
out(" .null $9e, format(' %d ', _prog8_entrypoint), $3a, $8f, ' prog8'")
|
||||||
out("+\t.word 0")
|
out("+\t.word 0")
|
||||||
out("_prog8_entrypoint\t; assembly code starts here\n")
|
out("_prog8_entrypoint\t; assembly code starts here\n")
|
||||||
if(!options.noSysInit)
|
if(!options.noSysInit)
|
||||||
|
@ -1,10 +1,20 @@
|
|||||||
%import textio
|
%import textio
|
||||||
|
%import diskio
|
||||||
%zeropage basicsafe
|
%zeropage basicsafe
|
||||||
|
|
||||||
main {
|
main {
|
||||||
|
|
||||||
sub start() {
|
sub start() {
|
||||||
|
|
||||||
|
txt.print(diskio.status(8))
|
||||||
|
txt.nl()
|
||||||
|
txt.print(diskio.status(9))
|
||||||
|
txt.nl()
|
||||||
|
; txt.print(diskio.status(10))
|
||||||
|
; txt.nl()
|
||||||
|
; txt.print(diskio.status(11))
|
||||||
|
; txt.nl()
|
||||||
|
|
||||||
uword x=22
|
uword x=22
|
||||||
x*=320
|
x*=320
|
||||||
txt.print_uw(x)
|
txt.print_uw(x)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user