home *** CD-ROM | disk | FTP | other *** search
- REM If not useing PowerBasic Windows delete or change lines with ******
-
- $Include "regnames.inc"
- $Include "Pbwindow.inc" '******
- MAP DirString$$ * 50 'Allocate some space for string
- REG %AX , &H4700
- REG %DX , &H0000
- REG %DS , StrSeg(DirString$$)
- REG %SI , StrPtr(DirString$$)
- Call Interrupt &H21
- REG %AX , &H1900
- call interrupt 33
- drive% = (REG (1) and &H00FF)
- 'We have the info now process it and display it.
- cls
- DirString$ = rtrim$(Dirstring$$) ' remove any extra spaces
- Call MakeBox(1,1,5,80,7,0,2,0,0,-1,-1) '******
- Call Boxtitle(2,"Directory Info",7,-1) '******
- select case drive%
- case 0
- Prnt$ = "Current Drive is A:\ " + "The current directory is: " + DirString$
- case 1
- Prnt$ = "Current Drive is B:\ " + "The current directory is: " + DirString$
- case 2
- Prnt$ = "Current Drive is C:\ " + "The current directory is: " + Dirstring$
- case 3
- Prnt$ = "Current Drive is D:\ " + "The current directory is: " + DirString$
- case 4
- Prnt$ = "Current Drive is E:\ " + "The current directory is: " + DirString$
- case 5
- Prnt$ = "Current Drive is F:\ " + "The current directory is: " + Dirstring$
- case else
- Prnt$ = "Current Drive is greater than program parameters."
- end select
- ' This case statement can be expanded for more drives
- Call CtrBox(2,Prnt$) '******Use a regular print statement
- delay 3
- call removebox '*****
- end