home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
451-475
/
apd453
/
device_info.amos
/
device_info.amosSourceCode
Wrap
AMOS Source Code
|
1993-01-08
|
908b
|
36 lines
Screen Open 0,640,200,2,Hires
Dreg(2)=-2
T$="dh0:"+Chr$(0)
A=Varptr(T$)
A=A+(A mod 4)
Dreg(1)=A
R=Doscall(-84)
Dreg(1)=R
D$=Space$(32)
DA=Varptr(D$)
DA=DA+(DA mod 4)
Dreg(2)=DA
RR=Doscall(-114)
WPS=Peek(DA+11)
TB=Leek(DA+12)
TBU=Leek(DA+16)
BPB=Leek(DA+20)
NSE=Leek(DA)
DN=Leek(DA+4)
VOLNODE=Leek(DA+28)*4
VOLNAME=Leek(VOLNODE+40)*4
For N=1 To Peek(VOLNAME)
VOLNAME$=VOLNAME$+Chr$(Peek(VOLNAME+N))
Next N
Print T$;
If WPS=80 Then Print " is write protected"
If WPS=81 Then Print " is being validated"
If WPS=82 Then Print " is write enabled"
Print T$;"Has the following stats"
Print "Total no. of soft errors is ";NSE
Print "Its logical device no. is ";DN
Print "Total capacity is ";TB;" blocks or ";BPB;"Bytes"
Print "totla blocks used=";TBU;"- total bytes used=";TBU*BPB
Print "total blocks free=";TB-TBU;"-total bytes free=";(TB*BPB)-(TBU*BPB)
Print "bytes per block=";BPB
Print "Volume name is ";VOLNAME$