1. 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.....
2. Re: Jacques's Critical Error Handler
- Posted by Jacques Deschenes <desja at QUEBECTEL.COM>
May 20, 1997
-
Last edited May 21, 1997
At 09:50 97-05-21 +0900, you wrote:
>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.
I couldn't reproduce this bug on my computer but I have only one floppy.
>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?
I didn't use it in filelist.e because if there is no disk in a drive
the list will not change, stay to the previous path or a no files message
will appear
if there no previous path i.e first call of FileList.e
filelist.e simply ignore the error code. I Admit this is loosy
programming I will
change 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.
This piece of code is simple and work perfectly. But what append if the pc is
connected to a network? Will it detect network drives? If so is it possible
for a
euphoria program to access network drives without special programming?
(I'm ignorant of network)
>Jacques, Your critical error handler can be applied to this routine
>without fail? Your ChooseFile.e only detects drives upto D:.
I don't see any use of int24.e with this code. because this code produce
no error at
all it only query the dos to know whish drives are installed, no access is
made to the
drive itselve an it avoid any critical error.
Jacques Deschenes
Baie-Comeau, Quebec
Canada
desja at quebectel.com
3. Re: Jacques's Critical Error Handler
- Posted by "C. K. Lester" <cklester at FLASH.NET>
May 20, 1997
-
Last edited May 21, 1997
> This piece of code is simple and work perfectly. But what append if the pc
is
> connected to a network? Will it detect network drives? If so is it possible
> for a
> euphoria program to access network drives without special programming?
> (I'm ignorant of network)
I just realized that you guys are saying something about EUPHORIA vs.
network drives. Let me ask a question then:
Many of my clients install to network drives, and I don't have many
problems with detecting the network drives, nor copying files from a
floppy to the drives.
Should I be having problems? If so, what kinds? If not, then
super-dee-duper.
Later!
ck