Category : Pascal Source Code
Archive   : DISKLIST.ZIP
Filename : DISKLIST.PAS

 
Output of file : DISKLIST.PAS contained in archive : DISKLIST.ZIP
{

PROCEDURE TO DISPLAY ALL VALID DISK DRIVES

PAUL ROBINSON 11/02/1991

TANSIN A DARCOS & COMPANY
P O BOX 70970
WASHINGTON, DC 20024-0970

This module may be used by other people for any purpose
without payment of royalties or requiring permission be
requested.

}

uses dos;
const drive: string[26]='ABCDEFGHIJKLMNOPQRSTUVWXYZ';

B15= $F000;
B12= $1000;
B9= $0200;

var regs:registers;
I,
numdisks:byte;

begin
writeln;
regs.ah :=$19; {Get Current Default Disk in AH}
MSDos(Regs);
regs.dl := regs.al; {Set Default disk to current}
regs.ah :=$0E; {default; this will return the}
msdos(Regs); {number of disks in AL }
numdisks := regs.al;
IF NUMDISKS >26 THEN
BEGIN
WRITE('NOTICE: number of possible disks shown is ',NUMDISKS);
WRITE(' only first 26 will be scanned');
NUMDISKS := 26;
END
ELSE
WRITELN('You have ',numdisks,' possible disk drives');
for I := 1 to NUMDISKS do
begin
regs.ax := $4409;
regs.flags := 0;
regs.bl := I;
msdos(regs);
IF NOT ODD(REGS.FLAGS) THEN
BEGIN
write(DRIVE[I],': ');
IF (REGS.DX AND B15)<>0 THEN
WRITE(' SUBST ');
IF (REGS.DX AND B12)<>0 THEN
WRITE(' NET ');
IF (REGS.DX AND B9)=0 THEN
WRITE('[IO OK]')
ELSE
WRITE('[NO IO]');
WRITELN;
END;
end;
writeln;
end.

  3 Responses to “Category : Pascal Source Code
Archive   : DISKLIST.ZIP
Filename : DISKLIST.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/