home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / BASIC / POWBASIC / LIBRARY5 / GETCWD.ZIP / GETCWD.BAS next >
BASIC Source File  |  1990-09-07  |  1KB  |  40 lines

  1. REM If not useing PowerBasic Windows delete or change lines with ******
  2.  
  3. $Include "regnames.inc"
  4. $Include "Pbwindow.inc"     '******
  5. MAP DirString$$ * 50  'Allocate some space for string
  6. REG %AX , &H4700
  7. REG %DX , &H0000
  8. REG %DS , StrSeg(DirString$$)
  9. REG %SI , StrPtr(DirString$$)
  10. Call Interrupt &H21
  11. REG %AX , &H1900
  12. call interrupt 33
  13. drive% = (REG (1) and &H00FF)
  14. 'We have the info now process it and display it.
  15. cls
  16. DirString$ = rtrim$(Dirstring$$)    ' remove any extra spaces
  17. Call MakeBox(1,1,5,80,7,0,2,0,0,-1,-1)  '******
  18. Call Boxtitle(2,"Directory Info",7,-1)  '******
  19. select case drive%
  20. case 0
  21.     Prnt$ = "Current Drive is A:\ " + "The current directory is: " + DirString$
  22. case 1
  23.     Prnt$ = "Current Drive is B:\ " + "The current directory is: " + DirString$
  24. case 2
  25.     Prnt$ = "Current Drive is C:\ " + "The current directory is: " + Dirstring$
  26. case 3
  27.     Prnt$ = "Current Drive is D:\ " + "The current directory is: " + DirString$
  28. case 4
  29.     Prnt$ = "Current Drive is E:\ " + "The current directory is: " + DirString$
  30. case 5
  31.     Prnt$ = "Current Drive is F:\ " + "The current directory is: " + Dirstring$
  32. case else
  33.     Prnt$ = "Current Drive is greater than program parameters."
  34. end select
  35. ' This case statement can be expanded for more drives
  36. Call CtrBox(2,Prnt$)    '******Use a regular print statement
  37. delay 3
  38. call removebox  '*****
  39. end
  40.