Jacques's Critical Error Handler
Hi everyone!
I have tested critical error handler made by Jacques Deschene, INT24.e,
which is packed in the SB.ZIP. (I downloaded it yesterday from EU. homepage).
Here go my questions on it.
1) It seems that a problem or bug exist in detecting critical error
for 3.25" floppy disk. When i changed into my b: drive (3.25") from
the Choose-File routine, the b: drive continued checking disks and
did not stop... making endless tu tu tu tu tu ... sound.
2) I could not find CheckIo() call in the ChooseFile.e, but it appears
that the ChooseFile routine can manage ctitical errors....
Could you (Mr. Jacques Deschene) explain on it?
3) I found a routine written in BASIC for getting drive lists exist,
and convert it into Euphoria as follows. This routine seems to be perfect!.
It detect ALL the drives in my machine including floppy, hard, cdrom,
Syquest, and even logical drive.
Jacques, Your critical error handler can be applied to this routine
without fail? Your ChooseFile.e only detects drives upto D:.
----- code starts here --------------------------------------
include machine.e
function current_drive()
sequence regs
regs=repeat(0,10)
regs[REG_AX]=#1900
regs=dos_interrupt(#21,regs)
return and_bits(regs[REG_AX],#FF)+'A'
end function
procedure change_drive(integer driveChar)
sequence regs
regs=repeat(0,10)
regs[REG_AX]=#E00
regs[REG_DX]=driveChar-'A'
regs=dos_interrupt(#21,regs)
end procedure
global function drive_list()
sequence driveList
integer homeDrive
homeDrive=current_drive()
driveList={}
for i='A' to 'Z' do
change_drive(i)
if current_drive()=i then
driveList=driveList&i
end if
end for
change_drive(homeDrive)
return driveList
end function
include file.e
sequence driveList
driveList=drive_list()
puts(1,driveList)
------------ code ends here ------------
from Lee, Woo seob.
ps. Sorry for my poor english.....
|
Not Categorized, Please Help
|
|