Service Index Overview
This index covers DOS functions and BIOS extensions available to assembly language programmers. Each entry identifies the interrupt vector, function number, and key register parameters needed to invoke the service. Use this reference alongside the DOS & BIOS Data Structures documentation for full context on memory layouts and calling conventions.
DOS Functions
DOS functions are invoked through INT 21H with the function number placed in AH. The table below lists commonly referenced functions and their purposes.
| Function | AH Value | Description |
|---|---|---|
| Set DTA | 1AH |
Sets the Disk Transfer Address for FCB file operations. |
| Query DTA | 2FH |
Returns the current Disk Transfer Address in ES:BX. |
| Create PSP | 26H |
Creates a new Program Segment Prefix. |
| Ctrl-Break Check | 33H |
Gets or sets the Ctrl-Break sensing level. |
| Find First | 4EH |
Finds the first matching file using the DTA. |
| Find Next | 4FH |
Finds the next matching file after a Find First call. |
| EXEC | 4BH |
Loads and executes a child program. |
BIOS Extensions
BIOS services are accessed through various interrupt vectors, providing low-level hardware access and system routines. Key interrupt vectors include:
- INT 22H — Terminate address, stored in the PSP and restored on program exit.
- INT 23H — Ctrl-Break exit address, located at
0000:008C. See the INT 23H reference for full details on break handling. - INT 10H — Video BIOS services for screen output and mode control.
- INT 13H — Disk BIOS services for sector-level read and write operations.
- INT 16H — Keyboard BIOS services for reading keystrokes and checking buffer status.
Error Codes & File Attributes
DOS functions return error information through the carry flag and AX. Common error codes cover conditions such as file not found, access denied, and invalid function number. File attributes used in directory searches and file creation include read-only, hidden, system, volume label, directory, and archive bits.
Standard Handles
DOS predefines five standard handles for every process:
- STDIN (0) — Standard input, typically the keyboard.
- STDOUT (1) — Standard output, typically the display.
- STDERR (2) — Standard error output.
- STDAUX (3) — Standard auxiliary device.
- STDPRN (4) — Standard printer device.
The DOS function dispatcher, primarily accessed through interrupt 21H, serves as the gateway to operating system services for assembly language programmers. Each function is identified by a unique number placed in the AH register before invoking the interrupt. These functions cover a broad range of operations including file management, directory navigation, memory allocation, and process control. Understanding the register parameter requirements for each function is essential for correct invocation. The carry flag often indicates success or failure after a call returns, with AX frequently holding either returned data or an error code. Mastery of these function calls allows programmers to interact directly with the operating system without relying on higher-level language libraries.
BIOS interrupts provide a hardware-level interface that sits below the DOS function layer, giving programmers direct access to system hardware components. Interrupts such as INT 10H for video services, INT 13H for disk operations, and INT 16H for keyboard input allow fine-grained control over peripherals. These low-level calls are particularly valuable when DOS is not loaded or when maximum performance is required. The BIOS maintains a data area in low memory that stores system configuration information, which can be read directly by well-written assembly code. Programmers often combine BIOS calls with direct hardware port I/O to achieve results impossible through higher-level interfaces alone.
Assembly language programming on DOS systems demands a thorough understanding of processor addressing modes and effective address calculation. The 8086 architecture supports multiple addressing modes including register indirect, based, indexed, and based-indexed variations. These modes determine how the processor computes the memory address for data access operations. Segment registers combine with offset values to form the complete 20-bit address that the 8086 can access. Programmers must carefully manage segment register contents and understand how the processor resolves memory references. Proper use of addressing modes can significantly reduce instruction count and improve execution speed in performance-critical code sections.
The Program Segment Prefix is a critical data structure that DOS creates for every loaded program. Located at the beginning of a program's memory allocation, the PSP contains essential information including command-line parameters, environment block pointers, and file handle tables. Understanding the PSP layout allows assembly programmers to access command-line arguments directly and manage file handles efficiently. The PSP also contains pointers to the program's termination routine and the first byte of the program's code segment. Many DOS function calls require or return values that reference fields within this structure. Knowledge of the PSP is fundamental for any serious DOS assembly programming work.
Comprehensive reference tables for interrupt codes, function numbers, and register usage form an indispensable tool for assembly language developers working under DOS. These tables typically organize services by interrupt vector, with each entry detailing the required input registers, returned output values, and any flags affected by the call. Error codes are documented alongside each function to help programmers implement proper error handling. The ASCII character set, extended keyboard scan codes, and video display attributes are additional reference materials commonly needed during development. Having well-organized lookup tables readily available reduces development time and helps prevent common programming mistakes when working with low-level system interfaces.
Using the Service Index
When programming in assembly language under DOS, consult this index to identify the correct interrupt and function number for the operation you need. Pay close attention to register entry conditions — many functions require specific values in DS:DX, CX, or other registers before the interrupt is called.
For detailed information on the data areas these functions operate on, refer to the DOS & BIOS Data Structures section, which documents the Program Segment Prefix (PSP), FCB fields, and the Disk Transfer Address (DTA) in depth.
The Home page provides access to the full TECH Topics index, assembly instruction set reference, and character tables.