> What is the correct way how to treat "device not present error" after OPEN
> routine calling on IDE64?
0 OPEN 15,12,15:CLOSE 15
5 IF ST THEN PRINT"DEVICE NOT PRESENT":END
Or the equivalent in assembly. This is what the "@#xx" command does:
jsr bas_open_common
jsr bas_close
lda #KERNAL.DEVICE_NOT_PRESENT
bit Status
bmi bas_ioerror
> I have a tool which requires IDE64 device. There is string "IDE" at $DE60.
> User types a device number and the tool sends command "UI" to this number.
> If the device is present, I will parse the string from error channel. How
> can I check, if there isn't any device?
Please note that some serial drives may crash if you don't leave enough time
between UI and reading the result. Also UI reverts to the "root" partition on
1581.
> I found Graham's DOS tutorial on Codebase, he uses "BCS error" after OPEN,
> but it works for numbers 8 or 9. E.g. number 18 isn't any device, but the
> OPEN returns C=0. I detected those values after OPEN:
He's not detecting device not present with that check.
> dev.num 8 (1541): A=$08, V=1, C=0 dev.num 9 (no device): A=$05, V=0, C=1
> dev.num 12 (IDE64 disk): A=$0C, V=1, C=0 dev.num 18 (no device): A=$12,
> V=0, C=0
>
> It looks like if the V=0 in status register is the right flag. Is it
> right?
No, don't do that, V is undefined. Open, close secondary address 15 without
file name. If ST=0 then open again for real.
--
-soci-