 Function 13: Reset Disk System  -- Miscellaneous Disk Functions --
 Function 14: Select Disk
 Function 24: Return Login Vector
 Function 25: Return Current Disk
 Function 27: Get Allocation Vector Address
 Function 28: Write Protect Disk
 Function 29: Get Write Protect (Read Only) Vector
 Function 31: Get DPB Address
 Function 32: Set/Get User Number
 Function 37: Reset Multiple Drives
 Function 39: Get Fixed Disk Login Vector
 Function 45: Set BDOS Error Mode
:

     +---------------------------------------------------------------+
     |               FUNCTION 13 -- RESET DISK SYSTEM                |
     +--------------------------------+------------------------------+
     | Entry:  C = 13 (0Dh)           | Exit:  A = 0 if no $*.* file |
     |                                |        A = FFh if $*.* file  |
     |                                |                              |
     +--------------------------------+------------------------------+

Logs out all current drives and resets the DMA buffer to 80h.  Drive A 
becomes the default; the user area is not changed.  All files open for 
writing should be closed before calling this function.

On return A acts as a submit file flag for the command processor.

This function is less efficient than function 37, which resets only 
specified drives.  Since changed disks are automatically logged, functions 
13 and 37 are rarely needed.

The value returned in A is a clue to the CCP that a SUB does or does not 
exist on the current drive.
:

     +---------------------------------------------------------------+
     |                  FUNCTION 14 -- SELECT DISK                   |
     +--------------------------------+------------------------------+
     | Entry:  C = 14 (0Eh)           | Exit:  A = 0 if no $*.* file |
     |         E = drive (0=A, etc.)  |        A = FFh if $*.* file  |
     |                                |        H <> 0 if error       |
     +--------------------------------+------------------------------+

Selects the default disk drive, which is used for all file operation unless 
it is overridden by drive specification in the file control block.  The 
drive will also be logged in, if it has not been already.

If 0FFh is returned in the A register, check the H register for an error.  
If the H register is zero, no error exists; if it is non-zero, then the 
requested drive is invalid.
:

     +---------------------------------------------------------------+
     |              FUNCTION 24 -- RETURN LOGIN VECTOR               |
     +--------------------------------+------------------------------+
     | Entry:  C = 24 (18h)           | Exit: HL = Login vector      |
     |                                |                              |
     |                                |                              |
     +--------------------------------+------------------------------+

Returns a bit map of the drives that are currently logged in:

                           Register H        Register L
                         ---------------   --------------- 
                Bits:    7 6 5 4 3 2 1 0   7 6 5 4 3 2 1 0  
                Drives:  P O N M L K J I   H G F E D C B A
:

     +---------------------------------------------------------------+
     |              FUNCTION 25 -- RETURN CURRENT DISK               |
     +--------------------------------+------------------------------+
     | Entry:  C = 25 (19h)           | Exit:  A = Current disk      |
     |                                |        (0=A, 1=B, etc.)      |
     |                                |                              |
     +--------------------------------+------------------------------+

Returns current default disk drive, from 0 (A) to 15 (P).
:

     +---------------------------------------------------------------+
     |         FUNCTION 27 -- GET ALLOCATION VECTOR ADDRESS          |
     +--------------------------------+------------------------------+
     | Entry:  C = 27 (1Bh)           | Exit: HL = Allocation vector |
     |                                |            address           |
     |                                |                              |
     +--------------------------------+------------------------------+

Returns the address of the allocation vector for the current default drive.
:

     +---------------------------------------------------------------+
     |               FUNCTION 28 -- WRITE PROTECT DISK               |
     +--------------------------------+------------------------------+
     | Entry:  C = 28 (1Ch)           | Exit:  None                  |
     |        DE = Read-only vector   |                              |
     |                                |                              |
     +--------------------------------+------------------------------+

Prevents writes, renames, deletions, etc., to drives specified in the bit 
map passed in DE.  The ability to return a write-protected drive to 
read/write status depends on the ZSDOS configuration flags.

Before calling this function, registers DE should be set to a bit map of 
the drives to be made read-only:

                           Register D        Register E
                         ---------------   --------------- 
                Bits:    7 6 5 4 3 2 1 0   7 6 5 4 3 2 1 0  
                Drives:  P O N M L K J I   H G F E D C B A
:

     +---------------------------------------------------------------+
     |            FUNCTION 29 -- GET WRITE PROTECT VECTOR            |
     +--------------------------------+------------------------------+
     | Entry:  C = 29 (1Dh)           | Exit: HL = Read-only vector  |
     |                                |                              |
     |                                |                              |
     +--------------------------------+------------------------------+

Returns a map of drives made read-only (write protected) by Function 28.

Drives are not automatically set read-only when a disk is changed.  The 
ability to reset drives to read/write status is dependant on the ZSDOS 
configuration flags.

The bits of the returned map stand for drives as follows:
                 
                           Register H        Register L
                         ---------------   --------------- 
                Bits:    7 6 5 4 3 2 1 0   7 6 5 4 3 2 1 0  
                Drives:  P O N M L K J I   H G F E D C B A
:

     +---------------------------------------------------------------+
     |                FUNCTION 31 -- GET DPB ADDRESS                 |
     +--------------------------------+------------------------------+
     | Entry:  C = 31 (1Fh)           | Exit: HL = Address of DPB    |
     |                                |                              |
     |                                |                              |
     +--------------------------------+------------------------------+

Returns the address of the disk parameter block (DPB) for the current 
default drive.  The DPB contains such information as the capacity of the 
drive, the number of directory entries, to number of logical tracks, etc.
:

     +---------------------------------------------------------------+
     |              FUNCTION 32 -- SET/GET USER NUMBER               |
     +--------------------------------+------------------------------+
     | Entry:  C = 32 (20h)           | Exit:  A = User number (get) |
     |         E = FFh (get)          |        A = 0 (set)           |
     |         E = 0-31 (set)         |                              |
     +--------------------------------+------------------------------+

Gets or sets the default user number.  If E is set to FFh, the current user 
number is returned (0-31).  Otherwise, the user number is set for the 
number passed in E.

This default is used for all file operations unless it is overridden by a 
user specification in the file control block.
:

     +---------------------------------------------------------------+
     |             FUNCTION 37 -- RESET MULTIPLE DRIVES              |
     +--------------------------------+------------------------------+
     | Entry:  C = 37 (25h)           | Exit:  A = 0                 |
     |        DE = Reset vector       |        A = FFh if default    |
     |                                |            and $*.* exists   |
     +--------------------------------+------------------------------+

Logs out drives specified in a bit map passed in DE:

                           Register D        Register E
                         ---------------   --------------- 
                Bits:    7 6 5 4 3 2 1 0   7 6 5 4 3 2 1 0  
                Drives:  P O N M L K J I   H G F E D C B A

Files open for writing on a disk to be reset must first be closed.  A 
program requesting a media change should call Function 37 only after the 
change is completed.  Under fast fixed disk relogging, only Function 37 
will relog fixed media.  It must be used after any BIOS calls that affect 
the directory of a hard or RAM disk.
:

     +---------------------------------------------------------------+
     |         FUNCTION 39 -- RETURN FIXED DISK LOGIN VECTOR         |
     +--------------------------------+------------------------------+
     | Entry:  C = 39 (27h)           | Exit: HL = Fixed disk login  |
     |                                |            vector            |
     |                                |                              |
     +--------------------------------+------------------------------+

Returns a bit map of the drives logged as fixed disks if the fast fixed 
disk relog feature is enabled:

                           Register H        Register L
                         ---------------   --------------- 
                Bits:    7 6 5 4 3 2 1 0   7 6 5 4 3 2 1 0  
                Drives:  P O N M L K J I   H G F E D C B A
:

     +---------------------------------------------------------------+
     |              FUNCTION 45 -- SET BDOS ERROR MODE               |
     +-------------------------------+-------------------------------+
     | Entry:  C = 45 (2Dh)          | Exit:  A = 00h                |
     |         E = Mode flag         |                               |
     |                               |                               |
     +-------------------------------+-------------------------------+

Allows application programs to take over error handling, returning all disk 
errors, including physical, select, and write protect errors, by passing a 
mode flag in E:

     00h = default CP/M error mode.
     80h = default ZSDOS error mode, allows use of user area in FCB.
     FEh = display error message and return extended error code to program.
     FFh = return extended error code to program.

Programs using extended error modes should reset the error mode to 00h 
before exiting.  Although this function may seem similar to the same 
function in CP/M Plus, the extended error codes returned are not the same.
