home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
451-475
/
apd453
/
info.amos
/
info.amosSourceCode
Wrap
AMOS Source Code
|
1993-01-08
|
1KB
|
56 lines
'*****************************************
'* Info.AMOS *
'* �1992 by Volker Stepprath *
'* Shows informations about a DOS Disk *
'*****************************************
'
Do
'
'**** Define drive ****
'
Input "Device.....: ";DEV$
If DEV$="" Then Edit
If Not Exist(DEV$) Then Edit
Dir$=DEV$
DEV$=Dir$
DEV$=DEV$+Chr$(0)
INFO$=Space$(40)+Chr$(0)
IN=Varptr(INFO$)
'
'**** Get lock ( ACCESS_READ ) ****
'
Dreg(1)=Varptr(DEV$)
Dreg(2)=-2
XLOCK=Doscall(-84)
'
'**** Get informatios ****
'
Dreg(1)=XLOCK
Dreg(2)=IN
XINFO=Doscall(-114)
'
'**** Unlock ****
'
XUNLOCK=Doscall(-90)
'
'**** Show informations ****
'
Print "Name.......: ";DEV$;Chr$(13)
Print "Errors.....:";Leek(IN)
Print "Drive......:";Leek(IN+4)
N=Leek(IN+8)
If N=80 Then N$="Read only"
If N=81 Then N$="Validating"
If N=82 Then N$="Read/Write"
Print "Status.....:";N;" ( "+N$+" )"
Print "Blocks.....:";Leek(IN+12)
Print "Blocks used:";Leek(IN+16)
Print "Bytes/Block:";Leek(IN+20)
Print "Disktype...: ";
For I=24 To 27 : Print Chr$(Peek(IN+I)); : Next I
Print : Print "Disknode...:";Leek(IN+28)
Print "Bytes free.:";Dfree
Print "Full.......:";Int(100-(100.0/856928.0)*Dfree);"%"
Print String$("-",39)
'
Loop