' Check for available drives. ' (c) 1996 Eternity Software ' Code by Michael Hemmelder ' Last modification : 15 - 02 - 1996 ' Status: Public Domain cls Print "Available drives:" print Drives$(0) ' print available drives without dd's Print Drives$(1) ' print available drives with dd's FUNCTION drives$(dd) ' returns a string containing the available drives ' dd - 0 = String does not contain available disk drives ' 1 = String contains available disk drives ' if dd = 1 then ' Check parameter start = 0 ' Include disk drives else start = 2 ' Do not include disk drives end if od = GetCurDrive ' Save current drive for t=start to 25 ' Loop until drive = z changedrive(t) ' Change to drive tu = getcurdrive ' What is the current drive? if t = tu then ' Is it the same as the counter? dri$ = dri$ + chr$(t + 65) ' Yes, this drive is available end if next t ChangeDrive od ' Restore current drive drives$ = dri$ ' result of function END FUNCTION FUNCTION GetCurDrive ' Returns the current drive ' REG 1,&H1900 CALL INTERRUPT &H21 GetCurDrive = VAL(RIGHT$(STR$(REG(1)),2)) END FUNCTION SUB ChangeDrive(dr) ' Changes current drive ' dr = drive no. to change to (a=0 b=1 c=2 ...) ' de$ = hex$(dr) REG 1,&H0E00 REG 4,dr CALL INTERRUPT &H21 END SUB