home *** CD-ROM | disk | FTP | other *** search
- {@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
- The purchaser of these procedures and functions may include them in COMPILED
- programs freely, but may not sell or give away the source text.
-
- INPUT : "Activity" is [G]et or [S]et default drive, "drive" is simply
- the drive letter.
-
- NOTE that any program that INCLUDEs this file MUST also include the
- type declarations contained in REGPACK.TYP
- }
-
- procedure GetSetDrive( activity :char; VAR drive : char);
- var
- drivenum : byte;
- registers : regpack;
-
- begin
- activity := UpCase(activity);
- case activity of
- 'G': registers.ax := $19 shl 8;
- 'S': begin
- registers.ax := $E shl 8;
- drive := UpCase(drive);
- registers.dx := ord(drive) - 65;
- end;
- end; {case}
- MSDOS(registers);
- if activity = 'G' then
- begin
- drivenum := registers.ax and $00FF;
- drive := chr(drivenum + 65);
- end;
- end;