MS-DOS 6.22 Optical Media File Access Explained
This article examines how MS-DOS 6.22 handles file access on
read-only optical media such as CD-ROMs. Because the MS-DOS kernel
natively supports only FAT file systems on magnetic media, accessing
optical discs requires a specialized two-tier architecture: a low-level
hardware device driver loaded in CONFIG.SYS and the
Microsoft CD-ROM Extensions (MSCDEX.EXE) executed in
AUTOEXEC.BAT. Together, these components translate the ISO
9660 file system, hook into the DOS network redirector interface, assign
drive letters, and strictly enforce read-only access rules for user
applications.
The Two-Tier Driver Architecture
MS-DOS 6.22 cannot interface directly with optical disc hardware or parse optical disk formats out of the box. To achieve compatibility, the operating system divides optical media access into two distinct layers:
- The Low-Level Hardware Driver: Loaded at startup
via
CONFIG.SYS(for example,DEVICE=C:\DOS\OAKCDROM.SYS /D:MSCD001), this driver directly communicates with the optical drive controller via ATAPI or SCSI interfaces. It abstracts the physical hardware and provides raw sector-reading capabilities. - The High-Level File System Driver (MSCDEX): Loaded
via
AUTOEXEC.BAT(for example,C:\DOS\MSCDEX.EXE /D:MSCD001 /L:D), MSCDEX communicates with the low-level driver using a matching device identifier (/D:). MSCDEX acts as an interpreter, translating the optical disc’s data structures into a format compatible with MS-DOS.
The Network Redirector Interface (Interrupt 2Fh)
Rather than embedding optical disc support directly into the core FAT file system driver, MS-DOS 6.22 treats optical drives essentially as local network drives.
When MSCDEX.EXE initializes, it hooks into the MS-DOS
Network Redirector Interface using Interrupt 2Fh
(specifically function 11h). The DOS kernel utilizes this
redirector hook whenever a program requests file access on a drive
letter designated as remote or non-FAT. MS-DOS routes any file
operations targeted at the assigned CD-ROM drive letter directly to
MSCDEX rather than through standard FAT disk routines.
File System Translation: ISO 9660 to DOS
Optical discs typically employ the ISO 9660 format (or its
predecessor, High Sierra). When an application requests directory
information or file handles using standard DOS interrupts (such as
Interrupt 21h Function 3Dh for opening files),
MSCDEX processes the request by:
- Parsing ISO 9660 Tables: MSCDEX reads the Path Tables and Directory Records from the disc sectors.
- Normalizing File Names: It truncates or translates
standard ISO 9660 file identifiers (which often end in version numbers,
like
FILENAME.EXT;1) into standard 8.3 MS-DOS directory entries. - Mapping Dates and Attributes: File timestamps and flags stored in ISO 9660 metadata are translated into standard MS-DOS directory format structures.
Read Operations and Buffering
When an application reads from an optical disc:
- The program issues a standard DOS read request
(
INT 21h, Function3Fh). - The DOS kernel checks the drive letter, determines it is controlled
by the redirector, and passes the request to MSCDEX via
INT 2Fh. - MSCDEX calculates the required Logical Block Addresses (LBAs) of the data, taking into account the disc's standard 2,048-byte sector size.
- MSCDEX requests the raw 2,048-byte sectors from the low-level hardware driver.
- Optional sector buffers assigned to MSCDEX (configured via the
/M:switch) cache these sectors in conventional or expanded/upper memory to compensate for the slow seek times and low throughput of vintage optical drives. - The requested bytes are copied into the calling program's memory buffer.
Enforcement of Read-Only Status
MS-DOS 6.22 enforces the read-only constraint of optical media at multiple levels:
- Attribute Mapping: MSCDEX automatically presents
all files found on the optical disc with the MS-DOS Read-Only file
attribute (
01h) enabled in directory queries. - Direct Write Interception: If an application
attempts to create a file (
INT 21h, Function3Ch), delete a file (INT 21h, Function41h), or open an existing file in read/write or write-only mode (INT 21h, Function3Dhwith access modes01hor02h), the DOS kernel and MSCDEX intercept the call before issuing any hardware commands. - Error Handling: When a write attempt occurs, MS-DOS
generates a Critical Error (Interrupt
24h), triggering the standard prompt:Write protect error writing drive [X]: Abort, Retry, Fail?. If handled programmatically, the operating system returns MS-DOS Error Code13h(ERROR_WRITE_PROTECT) to the requesting process. Low-level write commands are never transmitted to the underlying optical drive controller.