This the multi-page printable view of this section.Click here to print.

Return to the regular view of this page.

DOS_OPEN_DRIVE

Open drive as a single file

Table of Contents

Function AddressDescription
DOS_OPEN_DRIVE 014BOpen drive as a single file

Synopsys

Open the disk in this drive as a single file.

The whole disk is presented as a single file regardless of any real files on the disk. This routine can be used to examine/poke directories, files, etc. It should not be used by the uninitiated, the faint-hearted, or by anyone who values their files!

Sets file pointer to 0x000000 (0).

If there are any files open on this drive from other file numbers with shared-read access, then the disk can only be opened with shared-read access from this file number.

If there are any file open on this drive from other file numbers with exclusive access, then the disk cannot be opened from this file number.

Entry Parameters

Register Content
A Drive A…P
B File number 0…15
C Access mode required: Bits 0…2:
1 = exclusive read
2 = exclusive write
3 = exclusive read/write
5 = shared read
All other bits are reserved

Exit Parameters

If OK
Carry true
A corrupt
Otherwise:
Carry false
A = Error code
Always:
BC DE HL corrupt, all other registers preserved.