Tech Help!
An electronic reference book for DOS programming — covering assembly language instructions, BIOS services, DOS functions, and low-memory data structures.
Explore TopicsAbout the Reference
Tech Help! is a comprehensive electronic reference for assembly language programmers working in DOS environments. It documents the instruction set, addressing modes, effective address calculations, and clock-cycle tables for the 8088 processor. The reference also covers MASM pseudo-ops, operator precedence, and reserved words.
Beyond assembly, the reference catalogs DOS functions and interrupts, BIOS extensions, error codes, file attributes, and standard handles. Detailed data-structure documentation includes the Program Segment Prefix (PSP), FCB fields, the Disk Transfer Address (DTA), and swappable data areas.
Assembly Ref
Essential Tables & Charts for DOS Development
Stay Referenced
Bookmark this resource for quick access to DOS function indexes, interrupt vectors, and data-structure layouts.
Quick Reference Lookup
Browse the full index via the Topics page.
Understanding the 8088 instruction set is fundamental for anyone writing assembly code under DOS. Each instruction performs a specific operation directly on the processor, manipulating registers, memory locations, or flags. The reference covers the full range of instructions, from basic data movement and arithmetic to logical comparisons and string operations. Knowing which instructions are available and how they affect the carry, zero, sign, and overflow flags is essential for writing efficient, bug-free routines. The instruction set forms the vocabulary of low-level programming, and familiarity with it allows developers to translate complex algorithms into tight, performant machine code that runs directly on the hardware without any intermediate layers of abstraction.
The BIOS provides a standardized layer of services that abstract the underlying hardware, allowing programs to interact with the keyboard, display, disk drives, and serial ports without needing to know the specifics of each device. These services are invoked through software interrupts, with parameters passed in processor registers. The reference documents the full range of BIOS interrupt calls, including video services for setting display modes and writing characters, disk services for reading and writing sectors, and system services for querying memory size and equipment status. Understanding these interfaces is crucial for any program that needs to perform input and output operations in a DOS environment.
DOS functions extend the capabilities available to programs beyond what the BIOS offers, providing higher-level services for file management, memory allocation, and process control. Invoked primarily through interrupt 21h, these functions allow programs to create, open, read, and write files using either file control blocks or standard file handles. The reference catalogs each function number along with its expected register parameters and possible error return codes. Memory management functions enable programs to allocate, resize, and free blocks of conventional memory, while process control functions support loading and executing child programs, terminating processes, and retrieving the program segment prefix.
Addressing modes determine how the processor calculates the effective address of an operand in memory. The 8088 supports several modes, including register indirect, based, indexed, and based-indexed addressing, each combining segment registers and offset components in specific ways. Understanding these modes is critical for accessing data structures, arrays, and tables efficiently. The reference explains how the processor computes the final 20-bit physical address from a segment base and an offset, and it details the default segment register assignments for each addressing mode. Mastery of effective address calculation allows programmers to navigate memory with precision and write code that is both compact and fast.
MASM pseudo-ops are directives that control the assembly process rather than generating machine instructions directly. They define segments, declare variables, reserve memory, set symbol values, and manage listing output. The reference documents the syntax and purpose of each pseudo-op, from basic data definition directives like DB, DW, and DD to segment ordering controls and conditional assembly blocks. Understanding pseudo-ops is just as important as knowing the instruction set because they shape the structure of the final executable. Proper use of these directives ensures that code is organized, relocatable, and correctly linked with other modules.
Operator precedence in MASM expressions determines the order in which terms are evaluated, much like in high-level languages. The reference outlines the hierarchy of arithmetic, logical, and relational operators used in operand expressions. Knowing whether addition is evaluated before shifting, or how segment override operators bind, prevents subtle bugs in address calculations. The precedence rules also govern how the assembler resolves forward references and computes constant expressions at assembly time. A clear understanding of these rules helps programmers write unambiguous expressions and avoid the need for excessive parentheses, leading to cleaner, more readable source code that assembles exactly as intended.
The program segment prefix is a 256-byte data structure that DOS creates when loading an executable program. It contains critical information such as the command-line tail, the default disk transfer area, and pointers to the environment block and file control blocks. The reference details the layout of the PSP, including the offset of each field and its purpose. Programs can inspect the PSP to retrieve command-line arguments, determine available memory, or locate the environment strings. For terminate-and-stay-resident utilities in particular, understanding the PSP structure is essential for managing memory and interacting correctly with the operating system after the initial program exits.
ASCII character codes form the basis of text representation in DOS, mapping numeric values to letters, digits, punctuation marks, and control characters. The reference includes the standard ASCII chart along with the extended codes used for line-drawing characters and special symbols on IBM-compatible displays. Knowing these codes is necessary for direct screen output, keyboard input processing, and data conversion routines. The line-drawing characters in particular allow text-mode programs to create boxes, borders, and simple user interface elements without any graphics mode support, giving even the most basic applications a structured and professional appearance.
The color attributes used in text-mode video operations control both the foreground and background colors of displayed characters. Each attribute byte encodes a four-bit foreground color, a three-bit background color, and a blink or intensity bit. The reference documents the standard palette of sixteen colors and the attribute combinations that produce normal, bright, blinking, and reversed text. Understanding these attribute values allows programs to highlight important information, create visual hierarchy, and improve readability. Direct manipulation of video memory at segment B800h, combined with proper attribute selection, enables fast and flicker-free screen updates for interactive applications.
The keyboard services provided by the BIOS translate raw scan codes into meaningful character data, handling shift states, typematic repeat, and special key combinations. The reference documents the keyboard interrupt service and the status bytes stored in the BIOS data area that track modifier keys and toggle states. Programs can read the keyboard buffer directly or use BIOS calls to check for pending keystrokes and retrieve characters. This low-level access enables developers to implement custom key handling, detect simultaneous key presses, and respond to extended keys that are not available through higher-level input functions.
Dive Into DOS
From INT 22H terminate vectors to the swappable data area, every detail is catalogued for the systems programmer.
Covers DOS 1.0+ through extended functions.
Services Index