mirror of
https://github.com/irmen/prog8.git
synced 2024-11-18 19:12:44 +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++
|
||||
}
|
||||
|
||||
io_error:
|
||||
@(messageptr) = 0
|
||||
done:
|
||||
c64.CLRCHN() ; restore default i/o devices
|
||||
c64.CLOSE(15)
|
||||
return filename
|
||||
|
||||
io_error:
|
||||
filename = "?disk error"
|
||||
goto done
|
||||
}
|
||||
|
||||
|
||||
|
@ -128,7 +128,7 @@ internal class AsmGen(private val program: Program,
|
||||
out("* = ${program.actualLoadAddress.toHex()}")
|
||||
val year = LocalDate.now().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("_prog8_entrypoint\t; assembly code starts here\n")
|
||||
if(!options.noSysInit)
|
||||
|
@ -1,10 +1,20 @@
|
||||
%import textio
|
||||
%import diskio
|
||||
%zeropage basicsafe
|
||||
|
||||
main {
|
||||
|
||||
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
|
||||
x*=320
|
||||
txt.print_uw(x)
|
||||
|
Loading…
Reference in New Issue
Block a user