home *** CD-ROM | disk | FTP | other *** search
/ Sauce 'n' Code 2 / sauce-n-code-02.adf / ASCII_Source / Drive_Stats.asc < prev    next >
Text File  |  1995-07-02  |  1KB  |  49 lines

  1. '***************************************************************************** 
  2. '* 
  3. '*                        Check Drive Status Routine   
  4. '*                Written By Johnathan Parish & Steve Bennett      
  5. '* 
  6. '***************************************************************************** 
  7.  
  8. If Length(4)=0
  9.    Reserve As Work 4,36 : Rem       ****** bank for disk status check *****
  10. End If 
  11.  
  12. _CHECK_DRIVE["df0:"]
  13.  
  14. P=Param
  15.  
  16. If P=80 Then Print "Disk Is Write Protected"
  17. If P=81 Then Print "Validating Disk"
  18. If P=82 Then Print "Disk Is Ready To Save Onto"
  19.  
  20. Procedure _CHECK_DRIVE[DR$]
  21.    
  22.    ' 80=write protected 
  23.    ' 81=validating
  24.    ' 82=disk ok to save onto
  25.    
  26.    If Not Exist(DR$) Then STATUS=-1 : Goto FINALOUT
  27.    Dreg(1)=Varptr(DR$)
  28.    Dreg(2)=-2
  29.    LOCK=Doscall(-84)
  30.    Dreg(1)=LOCK
  31.    Dreg(2)=Start(4)
  32.    OK=Doscall(-114)
  33.    If Leek(Start(4)+24)=-1 Then STATUS=-1 : Goto OUT
  34.    STATUS=Leek(Start(4)+8)
  35.    OUT:
  36.    Dreg(1)=LOCK
  37.    DUMMY=Doscall(-90)
  38.    FINALOUT:
  39.    Wait Vbl 
  40.    
  41. End Proc[STATUS]
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.