home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / various / diskinfo.amos / diskinfo.amosSourceCode
AMOS Source Code  |  1993-01-08  |  901b  |  52 lines

  1. '
  2. '                ***   DISKINFO by Volker Stepprath 9/7/92   *** 
  3. '
  4. '                  
  5. Do 
  6.   Input "Device.....: ";DEV$
  7.   If DEV$="" Then End 
  8.   Dir$=DEV$ : DEV$=Dir$
  9.   INFO$=Space$(40)
  10. '
  11.   DEV=Varptr(DEV$)
  12.   IN=Varptr(INFO$)
  13. '  
  14.   Dreg(1)=DEV
  15.   Dreg(2)=-2
  16.   LOCK=Doscall(-84)
  17. '
  18.   Dreg(1)=LOCK
  19.   Dreg(2)=IN
  20.   D=Doscall(-114)
  21. '
  22.   UNLOCK=Doscall(-90)
  23. '
  24. '
  25.   Print "Name.......: ";DEV$
  26. '
  27.   Print "Errors.....:";Leek(IN)
  28. '
  29.   Print "Drive......:";Leek(IN+4)
  30. '
  31.   N=Leek(IN+8)
  32.   If N=80 Then N$="Read only"
  33.   If N=81 Then N$="Validating"
  34.   If N=82 Then N$="Read/Write"
  35.   Print "Status.....:";N;" ( "+N$+" )"
  36. '
  37.   Print "Blocks.....:";Leek(IN+12)
  38. '
  39.   Print "Blocks used:";Leek(IN+16)
  40. '
  41.   Print "Bytes/Block:";Leek(IN+20)
  42. '
  43.   Print "Disktype...: ";
  44.   For I=24 To 27
  45.     If Peek(IN+I)<>0 : Print Chr$(Peek(IN+I)); : End If 
  46.   Next I
  47. '
  48.   Print : Print "Disknode...:";Leek(IN+28)
  49. '
  50.   Print String$("-",30)
  51. '
  52. Loop