mirror of
https://github.com/irmen/prog8.git
synced 2025-02-24 13:29:10 +00:00
diskio.status(): remove unreliable device not present error detection
This commit is contained in:
parent
28cac291de
commit
8341f9c066
@ -531,12 +531,14 @@ no_mciout:
|
|||||||
|
|
||||||
sub status() -> uword {
|
sub status() -> uword {
|
||||||
; -- retrieve the disk drive's current status message
|
; -- retrieve the disk drive's current status message
|
||||||
str device_not_present_error = "device not present #xx"
|
|
||||||
if cbm.READST()==128 {
|
; TODO this doesn't seem to work reliably, sometimes READST returns 128 when the drive is just fine
|
||||||
device_not_present_error[len(device_not_present_error)-2] = 0
|
; str device_not_present_error = "device not present #xx"
|
||||||
void strings.copy(conv.str_ub(drivenumber), &device_not_present_error+len(device_not_present_error)-2)
|
; if cbm.READST()==128 {
|
||||||
return device_not_present_error
|
; device_not_present_error[len(device_not_present_error)-2] = 0
|
||||||
}
|
; void strings.copy(conv.str_ub(drivenumber), &device_not_present_error+len(device_not_present_error)-2)
|
||||||
|
; return device_not_present_error
|
||||||
|
; }
|
||||||
|
|
||||||
uword messageptr = &list_filename
|
uword messageptr = &list_filename
|
||||||
cbm.SETNAM(0, list_filename)
|
cbm.SETNAM(0, list_filename)
|
||||||
|
@ -456,12 +456,15 @@ _end jsr cbm.READST
|
|||||||
|
|
||||||
sub status() -> uword {
|
sub status() -> uword {
|
||||||
; -- retrieve the disk drive's current status message
|
; -- retrieve the disk drive's current status message
|
||||||
str device_not_present_error = "device not present #xx"
|
|
||||||
if cbm.READST()==128 {
|
; TODO this doesn't seem to work reliably, sometimes READST returns 128 when the drive is just fine
|
||||||
device_not_present_error[len(device_not_present_error)-2] = 0
|
; str device_not_present_error = "device not present #xx"
|
||||||
void strings.copy(conv.str_ub(drivenumber), &device_not_present_error+len(device_not_present_error)-2)
|
; if cbm.READST()==128 {
|
||||||
return device_not_present_error
|
; device_not_present_error[len(device_not_present_error)-2] = 0
|
||||||
}
|
; void strings.copy(conv.str_ub(drivenumber), &device_not_present_error+len(device_not_present_error)-2)
|
||||||
|
; return device_not_present_error
|
||||||
|
; }
|
||||||
|
|
||||||
uword messageptr = &list_filename
|
uword messageptr = &list_filename
|
||||||
cbm.SETNAM(0, list_filename)
|
cbm.SETNAM(0, list_filename)
|
||||||
cbm.SETLFS(15, drivenumber, 15)
|
cbm.SETLFS(15, drivenumber, 15)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user