FUNCTION 13: Reset Disk System      
FUNCTION 14: Select Disk            
FUNCTION 24: Return Login Vector    
FUNCTION 25: Return Current Disk    
FUNCTION 27: Get Address(Alloc)     
FUNCTION 28: Write Protect Disk     
FUNCTION 29: Get Read Only Vector   
FUNCTION 31: Get Address(Disk Parms)
FUNCTION 32: Set/Get User Code      
FUNCTION 37: Reset Drive            
:FUNCTION 13:  RESET DISK SYSTEM

-----------------------------------------------------------------
|       Entry Parameters       |         Returned Value         |
|------------------------------|--------------------------------|
| Register  (C): 0DH           | Register  (A): 0FFH if the     |
|                              | current default drive contains |
|                              | a file name beginning with a $ |
|                              | 00H if not.                    |
-----------------------------------------------------------------

     Function  to reset the disk system.  All active  drives  are 
reset to an unknown condition. Drive A is relogged in and the DMA 
address  is reset to 80H.  Unlike CP/M ZRDOS does not  reset  the 
read only vector of drives that have been set to read only status 
but  instead resets the ZRDOS disk changed vector for any  drives 
that are marked as changed.                                
:FUNCTION 14:  SELECT DISK

-----------------------------------------------------------------
|       Entry Parameters       |         Returned Value         |
|------------------------------|--------------------------------|
| Register  (C): 0EH           |              None              | 
| Register  (E): Selected Disk |                                |
-----------------------------------------------------------------

     Function  to  set  the  active  disk  number.  Register  (E) 
contains  a  number in the range 0 - 15,  signifying disk  A  - P 
respectively.  If  the selected drive is not the current  default 
drive,  it is made the default drive. If it has not been selected 
since the last warm start or disk reset, its directory is scanned 
and new allocation and check vectors are built.
:FUNCTION 24:  RETURN LOGIN VECTOR

-----------------------------------------------------------------
|       Entry Parameters         |       Returned Value         |
|--------------------------------|------------------------------|
| Register  (C): 18H             | Register (HL): Login Vector  |
-----------------------------------------------------------------

     Function to return the login vector. A bit map of the drives 
that  are currently active is returned in the (HL).  The bits  of 
the map stand for drives as follows:
                 
                         Register (H)      Register (L)
                              |                 |
                      ----------------- ----------------- 
        Bit numbers:   7 6 5 4 3 2 1 0   7 6 5 4 3 2 1 0  
                       | | | | | | | |   | | | | | | | |        
           Drive ID:   P O N M L K J I   H G F E D C B A  

                      Login Vector Bit Map
:FUNCTION 25:  RETURN CURRENT DISK

-----------------------------------------------------------------
|       Entry Parameters       |         Returned Value         |
|------------------------------|--------------------------------|
| Register  (C): 19H           | Register  (A): Current Disk    |
-----------------------------------------------------------------

     Function  to  return the current disk assignment.  The  disk 
number  of the currently logged in drive is returned in  register 
(A).  The number returned ranges from 0 to 15 and corresponds to 
drives A through P respectively.  
:FUNCTION 27:  GET ADDR(ALLOC)

-----------------------------------------------------------------
|       Entry Parameters         |       Returned Value         |
|--------------------------------|------------------------------|
| Register  (C): 1BH             | Register (HL): ALLOC Address |
-----------------------------------------------------------------

     Function to return the allocation vector. The address of the 
allocation  vector for the currently logged in drive is  returned 
in the register pair (HL). 
:FUNCTION 28:  WRITE PROTECT DISK

-----------------------------------------------------------------
|       Entry Parameters         |       Returned Value         |
|--------------------------------|------------------------------|
| Register  (C): 1CH             |            None              |
-----------------------------------------------------------------

     Function  to  write protect the current  disk.  The  default 
drive  is set to read-only status.  Under ZRDOS1 unlike CP/M  the 
protected  drive will retain this status until it is reset with a 
function call 37 or cold boot.
:FUNCTION 29:  GET READ ONLY VECTOR

-----------------------------------------------------------------
|       Entry Parameters      |         Returned Value          |
|-----------------------------|---------------------------------|
| Register  (C): 1DH          | Register (HL): R/O Vector Value |
-----------------------------------------------------------------

     Function to return the read-only status vector. A bit map of 
the drives that are currently marked read-only is returned in the 
(HL). The bits of the map stand for drives as follows:
                 
                         Register (H)      Register (L)
                              |                 |
                      ----------------- ----------------- 
        Bit numbers:   7 6 5 4 3 2 1 0   7 6 5 4 3 2 1 0  
                       | | | | | | | |   | | | | | | | |        
           Drive ID:   P O N M L K J I   H G F E D C B A  

                     Read Only Vector Bit Map
:FUNCTION 31:  GET ADDR(DISK PARMS)

-----------------------------------------------------------------
|       Entry Parameters         |       Returned Value         |
|--------------------------------|------------------------------|
| Register  (C): 1FH             | Register (HL): DPB Address   |
-----------------------------------------------------------------

     Function  to return the address of the disk parameter  block 
for the current drive. The address of the Disk Parameter Block is 
returned in the register pair (HL).
:FUNCTION 32:  SET/GET USER CODE

-----------------------------------------------------------------
|       Entry Parameters         |       Returned Value         |
|--------------------------------|------------------------------|
| Register  (C): 20H             | Register (A): Current Code   |
| Register (DE): 0FFH (get) or   |               or no value    |
|                User Code (set) |                              |
-----------------------------------------------------------------

     Function to get or set the user number. If (E) was 0FFH then 
this is a request to return the current user number. Else set the 
user number from (E).
:FUNCTION 37:  RESET DRIVE

-----------------------------------------------------------------
|       Entry Parameters         |       Returned Value         |
|--------------------------------|------------------------------|
| Register  (C): 25H             | Register (A): 00H            |
| Register (DE): Drive Vector    |                              |
-----------------------------------------------------------------

     Function to allow a program to log off any drives. On entry, 
set  (DE)  to contain a word with bits set for those drives  that 
are  to be logged off.  The log-in vector and the  write  protect 
vector  will be updated.  Drives to be reset are specified in the 
register pair (DE) as follows:
                 
                         Register (D)      Register (E)
                              |                 |
                      ----------------- ----------------- 
        Bit numbers:   7 6 5 4 3 2 1 0   7 6 5 4 3 2 1 0  
                       | | | | | | | |   | | | | | | | |        
           Drive ID:   P O N M L K J I   H G F E D C B A  




NOTE:     This  function  differs  from CP/M in that  only  those 
          drives  specified in the (DE) will be  unprotected  and 
          not drives which are not currently active as is done in 
          CP/M.
