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

  1. Screen Open 0,640,200,2,Hires
  2. Dreg(2)=-2
  3. T$="dh0:"+Chr$(0)
  4. A=Varptr(T$)
  5. A=A+(A mod 4)
  6. Dreg(1)=A
  7. R=Doscall(-84)
  8. Dreg(1)=R
  9. D$=Space$(32)
  10. DA=Varptr(D$)
  11. DA=DA+(DA mod 4)
  12. Dreg(2)=DA
  13. RR=Doscall(-114)
  14. WPS=Peek(DA+11)
  15. TB=Leek(DA+12)
  16. TBU=Leek(DA+16)
  17. BPB=Leek(DA+20)
  18. NSE=Leek(DA)
  19. DN=Leek(DA+4)
  20. VOLNODE=Leek(DA+28)*4
  21. VOLNAME=Leek(VOLNODE+40)*4
  22. For N=1 To Peek(VOLNAME)
  23. VOLNAME$=VOLNAME$+Chr$(Peek(VOLNAME+N))
  24. Next N
  25. Print T$;
  26. If WPS=80 Then Print " is write protected"
  27. If WPS=81 Then Print " is being validated"
  28. If WPS=82 Then Print " is write enabled"
  29. Print T$;"Has the following stats"
  30. Print "Total no. of soft errors is ";NSE
  31. Print "Its logical device no. is ";DN
  32. Print "Total capacity is ";TB;" blocks or ";BPB;"Bytes"
  33. Print "totla blocks used=";TBU;"- total bytes used=";TBU*BPB
  34. Print "total blocks free=";TB-TBU;"-total bytes free=";(TB*BPB)-(TBU*BPB)
  35. Print "bytes per block=";BPB
  36. Print "Volume name is ";VOLNAME$