[fpc-pascal]Drive detection (was: Intel ASM syntax problem)
    AITOR.SM 
    AITOR.SM at teleline.es
       
    Wed Jun 27 11:03:04 CEST 2001
    
    
  
Hi Marco (and the rest),
there seems to be a problem with EDOS' drive detection routine. I 
checked this program in several PCs:
====
program test;
uses EDOS;
var c,d: byte;
begin
        for c:=1 to 10 do  {no more than 10 drives!}
            begin
                 d := drivetype(c);
                 if d>0 then begin
                        write (chr(c+ord('A')-1),': is of type ');
                        case d of
                                 1: WriteLn ('remote');
                                 2: WriteLn ('fixed');
                                 3: WriteLn ('removable');
                                 4: WriteLn ('substed');
                                 5: WriteLn ('cdrom');
                        end
                 end
            end
end.
====
And in every cases:
Hard drives are DETECTED
Floppies and CD-ROMs are NOT detected. For example, I get:
C: is of type fixed
although I have also a floppy (A:) and a CD-ROM (D:). Same at home: I 
have several visible primary partitions, which are recognised, but I 
was unlucky with the floppy and cd-rom. In addition:
- I hear it is doing some noise in the floppy drive during the test (I 
hope it's not the case that it only works if a floppy is inserted)
- The CD-ROM is not detected, regardless of wether I use a CD-ROM 
driver+MSCDEX (in CONFIG and AUTOEXEC) or not.
I am interested in the DOS (Go32V2) case, not windows. Does any of you 
have an idea of what is wrong, or have some extra code to do this?
Aitor
----- Mensaje Original -----
De: marcov at stack.nl (Marco van de Voort)
Fecha: Lunes, Junio 25, 2001 11:48 pm
Asunto: Re: [fpc-pascal]Intel ASM syntax problem
> 
> > code, so I didn't write it myself. I simply tried to compile 
> under FPK, 
> > just forgetting that I am doing these seg:ofs calls and the like.
> > 
> > Well, I don't believe this will compile even if I change bx by 
> ebx. My 
> > solutions could be:
> > 
> > (a) any of you has a piece of code to detect fd/cd/hd/ram/net 
> disks 
> > under GO32V2
> 
> Www.stack.nl/~marcov/xtdfpc.htm
> 
> Download xtdfpc[xx].zip and check unit edos.
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 
 ___________________________________________________________________ 
Consigue tu e-mail gratuito TERRA.ES
 Haz clic en http://www.terra.es/correo/
    
    
More information about the fpc-pascal
mailing list