INDEX

 DOS TECHNICAL INFORMATION
 Programming Technical Reference - IBM
 Copyright 1988, Dave Williams

CHAPTER 1.
 SOME HISTORY
 THE OPERATING SYSTEM HIERARCHY
 DOS STRUCTURE
 DOS Initialization

CHAPTER 2.
 SYSTEM MEMORY MAP - OVERALL
 PC Port Assignment, Intel 8088, 80C88, 8086, 80286, 80386 CPUs
 Reserved Memory Locations in the IBM PC
 At Absolute Addresses
 The IBM PC System Interrupts  (Overview)
 The IBM-PC System Interrupts  (in detail)
 Interrupt 00h Divide by Zero (processor error).
 Interrupt 01h Single step
 Interrupt 02h Non-maskable interrupt
 Interrupt 03h Breakpoint
 Interrupt 04h Divide overflow
 Interrupt 05h Print Screen
 Interrupt 06h Reserved by IBM
 Interrupt 07h Reserved by IBM
 Interrupt 08h Timer
 Interrupt 09h Keyboard
 Interrupt 0Ah EGA Vertical Retrace
 Interrupt 0Bh Communications Controller (serial port) hdw. entry
 Interrupt 0Ch Communications Controller (serial port) hdw. entry
 Interrupt 0Dh Alternate Printer, PC/AT 80287
 Interrupt 0Eh Diskette
 Interrupt 0Fh Reserved by IBM

CHAPTER 3. THE PC ROM BIOS
 Interrupt 10h Video I/O
  Function 00h Determine or Set Video State
           01h Set Cursor Type
           02h Set Cursor Position
           03h Read Cursor Position
           04h Read Light Pen
           05h Select Active Page
           06h Scroll Page Up
           07h Scroll Page Down
           08h Read Character Attribute
           09h Write Character and Attribute
           0Ah Write Character
           0Bh Set Color Palette
           0Ch Write Dot
           0Dh Read Dot
           0Eh Write TTY
           0Fh Return Current Video State
           10h Set Palette Registers
           11h Character Generator Routine (EGA and after)
           12h Alternate Select (EGA and after)
           13h Write String
           14h Load LCD Character Font
           15h Return Physical Display Parameters
           1Ah Display Combination Code
           1Bh Functionality/State Information
           1Ch Save/Restore Video State
           70h Get Video RAM Address
           71h Get INCRAM Addresses
           72h Scroll Screen Right
           73h Scroll Screen Left
           81h DESQview video - Get something?
           82h DESQview - Get Current Window Info
           F0h Microsoft Mouse driver EGA support - Read One Register
           F1h Microsoft Mouse driver EGA support - Write One Register
           F2h Microsoft Mouse driver EGA support - Read Register Range
           F3h Microsoft Mouse driver EGA support - Write Register Range
           F4h Microsoft Mouse driver EGA support - Read Register Set
           F5h Microsoft Mouse driver EGA support - Read Register Set
           F6h Microsoft Mouse driver EGA support
           F7h Microsoft Mouse driver EGA support
           FAh Microsoft Mouse driver EGA support - Interrogate Driver
           FEh Get Alternate Screen Buffer Address (text mode only)
           FFh Update Real Display (text mode only)
 Interrupt 11h Equipment Check
 Interrupt 12h Memory Size
 Interrupt 13h Disk I/O
  Function 00h Reset
           01h Get Status of disk system
           02h Read Sectors
           03h Write Sectors
           04h Verify
           05h Format Track
           06h Hard Disk
           07h Hard Disk
           08h Read Drive Parameters
           09h Initialize Two Fixed Disk Base Tables
           0Ah Read Long   (Hard disk)
           0Bh Write Long
           0Ch Seek To Cylinder
           0Dh Alternate Disk Reset
           0Eh Read Sector Buffer
           0Fh Write sector buffer
           10h Test For Drive Ready
           11h Recalibrate Drive
           12h Controller RAM Diagnostic
           13h Drive Diagnostic
           14h Controller Internal Diagnostic
           15h Get Disk Type
           16h Change of Disk Status (diskette)
           17h Set Disk Type for Format (diskette)
           18h Set Media Type For Format  (diskette)
           19h Park Hard Disk Heads
           1Ah ESDI Hard Disk - Format
 Interrupt 14h Initialize and Access Serial Port For Int 14
  Function 01h Send Character in AL to Comm Port DX (0 or 1)
           02h Wait For A Character From Comm Port DX
           03h Fetch the Status of Comm Port DX (0 or 1)
           04h Extended Initialize
           05h Extended Communication Port Control
 Interrupt 15h Cassette I/O
  Function 00h Turn Cassette Motor On
           01h Turn Cassette Motor Off
           02h Read Blocks From Cassette
           03h Write Data Blocks to Cassette
           0Fh ESDI Format Unit Periodic Interrupt
           10h TopView API Function Calls
           20h PRINT.COM  (DOS internal)
           21h Power-On Self Test (POST) Error Log
           40h Read/Modify Profiles
           41h Wait On External Event
           42h Request System Power Off
           43h Read System Status
           44h (De)activate Internal Modem Power
           4Fh Keyboard Intercept
           80h Device Open
           81h Device Close
           82h Program Termination
           83h Event Wait
           84h Read Joystick Input Settings
           85h System Request (SysReq) Key Pressed
           86h Elapsed Time Wait
           88h Extended Memory Size Determine
           89h Switch Processor to Protected Mode
           91h Set Flag and Complete Interrupt
           C0h Get System Configuration
           C1h System
           C2h Pointing Device BIOS Interface (DesQview 2.x)
           C3h Enable/Disable Watchdog Timeout
           C4h Programmable Option Select
           DEh DesQview Services
 Interrupt 16h Keyboard I/O
  Function 00h Get Keyboard Input
           01h Check Keystroke Buffer
           02h Shift Status
           03h Keyboard
           04h Keyboard Click Toggle
           05h Keyboard Buffer Write
           10h Get Enhanced Keystroke And Read
           11h Check Enhanced Keystroke
           12h Extended Get Shift Status
           F0h Set CPU speed (Compaq 386)
 Interrupt 17h Printer
  Function 00h Print Character/send AL to printer DX (0, 1, or 2)
           01h Initialize Printer
           02h Printer Status
 Interrupt 18h ROM BASIC
 Interrupt 19h Bootstrap Loader
 Interrupt 1Ah Time of Day
  Function 00h Read System Time Counter
           01h Set Clock
           02h Read Real Time Clock Time
           03h Set Real Time Clock Time
           04h Read Real Time Clock Date
           05h Set Real Time Clock Date
           06h Set Real Time Clock Alarm
           07h Reset Real Time Clock Alarm
           08h Set Real Time Clock Activated Power On Mode
           09h Read Real Time Clock Alarm Time and Status
           0Ah Read System-Timer Day Counter
           0Bh Set System-Timer Day Counter
           80h Set Up Sound Multiplexor
 Interrupt 1Bh Control-Break
 Interrupt 1Ch Timer Tick
 Interrupt 1Dh Vector of Video Initialization Parameters.
 Interrupt 1Eh Vector of Diskette Controller Parameters
 Interrupt 1Fh Pointer to Graphics Character Extensions (Graphics Set 2)
 Interrupt 20h PROGRAM TERMINATE
 Interrupt 20h DOS - Terminate Program
 Interrupt 20h Minix - Send/Receive Message

CHAPTER 4. DOS INTERRUPTS AND FUNCTION CALLS
 DOS Registers
 Interrupts
 Interrupt 21h Function Request (Overview)
 Calling the DOS Services
 Interrupt 21h Function Request (in detail)
  Function 00h Program Terminate
           01h Keyboard Input
           02h Display Output
           03h Auxiliary Input
           04h Auxiliary Output
           05h Printer Output
           06h Direct Console I/O
           07h Direct Console Input Without Echo
           08h Console Input Without Echo
           09h Print String
           0Ah Buffered Keyboard Input
           0Bh Check Standard Input Status
           0Ch Clear Keyboard Buffer and Invoke a Kbd Function
           0Dh Disk Reset
           0Eh Select Disk
           0Fh Open File
           10h Close File
           11h Search for First Entry
           12h Search for Next Entry
           13h Delete File
           14h Sequential Read
           15h Sequential Write
           16h Create File
           17h Rename File
           18h Unknown
           19h Current Disk
           1Ah Set Disk Transfer Address
           1Bh Allocation Table Information
           1Ch Allocation Table Information for Specific Device
           1Dh Unknown
           1Eh Unknown
           1Fh Read DOS Disk Block (default drive)
           20h Unknown
           21h Random Read
           22h Random Write
           23h File Size
           24h Set Relative Record Field
           25h Set Interrupt Vector
           26h Create New Program Segment
           27h Random Block Read
           28h Random Block Write
           29h Parse Filename
           2Ah Get Date
           2Bh Get Date
           2Ch Get Time
           2Dh Set Time
           2Eh Set/Reset Verify Switch
           2Fh Get Disk Transfer Address (DTA)
           30h Get DOS Version Number
           31h Terminate Process and Stay Resident
           32h Read DOS Disk Block
           33h Ctrl-Break Check
           34h Return INDOS Flag
           35h Get Vector
           36h Get Disk Free Space
           37h Get/Set Switch Character (SWITCHAR)
           38h Return Country Dependent Information
           39h Create Subdirectory (MKDIR)
           3Ah Remove Subdirectory (RMDIR)
           3Bh Change Durrent Directory (CHDIR)
           3Ch Create a File (CREAT)
           3Dh Open a File
           3Eh Close a File Handle
           3Fh Read From a File or Device
           40h Write to a File or Device
           41h Delete a File from a Specified Directory (UNLINK)
           42h Move File Read/Write Pointer (LSEEK)
           43h Change File Mode (CHMOD)
           44h I/O Control for Devices (IOCTL)
           45h Duplicate a File Handle (DUP)
           46h Force a Duplicate of a Handle (FORCDUP)
           47h Get Current Directory
           48h Allocate Memory
           49h Free Allocated Memory
           4Ah Modify Allocated Memory Blocks (SETBLOCK)
           4Bh Load or Execute a Program (EXEC)
           4Ch Terminate a Process (EXIT)
           4Dh Get Return Code of a Subprocess (WAIT)
           4Eh Find First Matching File (FIND FIRST)
           4Fh Find Next Matching File (FIND NEXT)
           50h Set PSP
           51h Get PSP
           52h IN-VARS
           53h Translate BPB
           54h Get Verify Setting
           55h Create Child PSP
           56h Rename a File
           57h Get or Set Timestamp of a File
           58h Get/Set Allocation Strategy (DOS 3.x)
           59h Get Extended Error Code
           5Ah Create Unique Filename
           5Bh Create a New File
           5Ch Lock/Unlock File Access
           5Dh Network - Partial
           5Eh Network Printer
           5Fh Network Redirection
           60h Parse Pathname
           61h Unknown
           62h Get Program Segment Prefix (PSP) Address
           63h Get Lead Byte Table (DOS 2.25)
           64h Unknown
           65h Get Extended Country Information (DOS 3.3)
           66h Get/Set Global Code Page Table (DOS 3.3)
           67h Set Handle Count (DOS 3.3)
           68h Commit File (DOS 3.3)
           69h     Disk Serial Number  DOS 4.0 (US)
           6Ah     unknown  (DOS 4.0?)
           6Bh     unknown  (DOS 4.0?)
           6Ch     Extended Open/Create  DOS 4.0 (US)
           89h  DOS_Sleep
 Aftermarket Application Installed Function Calls, Used by NetWare
  Function B6h-FFh   Novell NetWare

CHAPTER 5. Interrupts 22h Through 86h
 Interrupt 22h Terminate Address
 Interrupt 23h Ctrl-Break Exit Address
 Interrupt 24h Critical Error Handler
 Interrupt 25h Absolute Disk Read
 Interrupt 26h Absolute Disk Write
 Interrupt 27h Terminate And Stay Resident
 Interrupt 28h (not documented by Microsoft)
 Interrupt 29h (not documented by Microsoft)
 Interrupt 2Ah Microsoft Networks - Session Layer Interrupt
 Interrupt 2Bh (not documented by Microsoft)
 Interrupt 2Ch (not documented by Microsoft)
 Interrupt 2Dh (not documented by Microsoft)
 Interrupt 2Eh (undocumented by Microsoft)
 Interrupt 2Fh Multiplex Interrupt
 Interrupt 30h (not a vector!) far jump instruction for CP/M-style calls
 Interrupt 31h Unknown
 Interrupt 32h Unknown
 Interrupt 33h Used by Microsoft Mouse Driver
 Interrupt 34h Turbo C/Microsoft languages - Floating Point emulation
 Interrupt 35h Turbo C/Microsoft languages - Floating Point emulation
 Interrupt 36h Turbo C/Microsoft languages - Floating Point emulation
 Interrupt 37h Turbo C/Microsoft languages - Floating Point emulation
 Interrupt 38h Turbo C/Microsoft languages - Floating Point emulation
 Interrupt 39h Turbo C/Microsoft languages - Floating Point emulation
 Interrupt 3Ah Turbo C/Microsoft languages - Floating Point emulation
 Interrupt 3Bh Turbo C/Microsoft languages - Floating Point emulation
 Interrupt 3Ch Turbo C/Microsoft languages - Floating Point emulation
 Interrupt 3Dh Turbo C/Microsoft languages - Floating Point emulation
 Interrupt 3Eh Turbo C/Microsoft languages - Floating Point emulation
 Interrupt 3Fh Overlay manager interrupt (Microsoft LINK.EXE)
 Interrupt 40h Hard Disk BIOS
 Interrupt 41h Hard Disk Parameters
 Interrupt 42h Pointer to screen BIOS entry
 Interrupt 43h Pointer to EGA initialization parameter table
 Interrupt 44h Pointer to EGA graphics character table
 Interrupt 45h Reserved by IBM  (not initialized)
 Interrupt 46h Pointer to second hard disk, parameter block
 Interrupt 47h Reserved by IBM  (not initialized)
 Interrupt 48h Cordless Keyboard Translation
 Interrupt 49h Non-keyboard Scan Code Translation Table Address
 Interrupt 4Ah Real-Time Clock Alarm
 Interrupt 4Bh Reserved by IBM  (not initialized)
 Interrupt 4Ch Reserved by IBM  (not initialized)
 Interrupt 4Dh Reserved by IBM  (not initialized)
 Interrupt 4Eh Reserved by IBM  (not initialized)
 Interrupt 4Fh Reserved by IBM  (not initialized)
 Interrupt 50-57 IRQ0-IRQ7 relocated by DesQview
 Interrupt 58h Reserved by IBM  (not initialized)
 Interrupt 59h Reserved by IBM  (not initialized)
 Interrupt 5Ah Reserved by IBM  (not initialized)
 Interrupt 5Bh Reserved by IBM  (not initialized)
 Interrupt 5Ah Cluster Adapter BIOS entry address
 Interrupt 5Bh Reserved by IBM  (not initialized) (cluster adapter?)
 Interrupt 5Ch NETBIOS interface entry port
 Interrupt 5Dh Reserved by IBM  (not initialized)
 Interrupt 5Eh Reserved by IBM  (not initialized)
 Interrupt 5Fh Reserved by IBM  (not initialized)
 Interrupt 60h-67h User Program Interrupts (availible for general use)
 Interrupt 67h Used by Lotus-Intel-Microsoft Expanded Memory Specification
 Interrupt 68h Not Used  (not initialized)
 Interrupt 69h Not Used  (not initialized)
 Interrupt 6Ah Not Used  (not initialized)
 Interrupt 6Bh Not Used  (not initialized)
 Interrupt 6Ch System Resume Vector (Convertible) (not initialized on PC)
 Interrupt 6Dh Not Used  (not initialized)
 Interrupt 6Fh Not Used  (not initialized)
 Interrupt 70h IRQ 8, Real Time Clock Interrupt
 Interrupt 71h IRQ 9, Redirected to IRQ 8
 Interrupt 72h IRQ 10  (AT, XT/286, PS/2)  Reserved
 Interrupt 73h IRQ 11  (AT, XT/286, PS/2)  Reserved
 Interrupt 74h IRQ 12  Mouse Interrupt (AT, XT/286, PS/2)
 Interrupt 75h IRQ 13, Coprocessor Error, BIOS Redirect to int 2 (NMI) (AT)
 Interrupt 76h IRQ 14, Hard Disk Controller (AT, XT/286, PS/2)
 Interrupt 77h IRQ 15 (AT, XT/286, PS/2)  Reserved
 Interrupt 78h Not Used
 Interrupt 79h Not Used
 Interrupt 7Ah Novell NetWare - LOW-LEVEL API
 Interrupt 7Bh-7Fh  Not Used
 Interrupt 80h-85h Reserved by BASIC
 Interrupt 86h Relocated by NETBIOS int 18
 Interrupt 86h-F0h Used by BASIC when BASIC interpreter is running
 Interrupt E4h Logitech Modula-2 v2.0   MONITOR
 Interrupt F1h-FFh (absolute addresses 3C4-3FF)
 Interrupt F8h Set Shell Interrupt (OEM)
 Interrupt F9h First of 8 SHELL service codes, reserved for OEM shell (WINDOW);
 Interrupt FAh USART ready (RS-232C)
 Interrupt FBh USART RS ready (keyboard)
 Interrupt FCh Unknown
 Interrupt FDh reserved for user interrupt
 Interrupt FEh AT/XT286/PS50+ - destroyed by return from protected mode
 Interrupt FFh AT/XT286/PS50+ - destroyed by return from protected mode

CHAPTER 6. DOS CONTROL BLOCKS AND WORK AREAS
 The Disk Transfer Area (DTA)
 DOS Program Segment
 STANDRD FILE CONTROL BLOCK
 EXTENDED FILE CONTROL BLOCK
 MEMORY CONTROL BLOCKS
 CONTROL BLOCK
 MEMORY CONTROL BLOCKS

CHAPTER 7. DOS File Structure
 File Management Functions
 FCB FUNCTION CALLS
 HANDLE FUNCTION CALLS
 SPECIAL FILE HANDLES
 ASCII and BINARY MODE
 FILE I/O IN BINARY (RAW) MODE
 FILE I/O IN ASCII (COOKED) MODE
 NUMBER OF OPEN FILES ALLOWED
 RESTRICTIONS ON FCB USAGE
 RESTRICTIONS ON HANDLE USAGE
 ALLOCATING SPACE TO A FILE
 MSDOS / PCDOS DIFFERENCES
 .EXE FILE STRUCTURE
 THE RELOCATION TABLE
 "NEW" .EXE FORMAT (Microsoft Windows and OS/2)

CHAPTER 8. DOS DISK INFORMATION
 THE DOS AREA
 THE BOOT RECORD
 THE DOS FILE ALLOCATION TABLE (FAT)
 USE OF THE 12 BIT FILE ALLOCATION TABLE
 USE OF THE 16 BIT FILE ALLOCATION TABLE
 DOS DISK DIRECTORY
 DIRECTORY ENTRIES
 THE DATA AREA
 HArd DISK LAYOUT
 SYSTEM INITIALIZATION
 THE BOOT SEQUENCE
 BOOT RECORD/PARTITION TABLE
 HARD DISK TECHNICAL INFORMATION
 DETERMINING FIXED DISK ALLOCATION

CHAPTER 9. INSTALLABLE DEVICE DRIVERS
 DEVICE DRIVER FORMAT
 TYPES OF DEVICES
 DEVICE HEADER
 POINTER TO NEXT DEVICE HEADER FIELD
 ATTRIBUTE FIELD
 POINTER TO STRATEGY AND INTERRUPT ROUTINES
 NAME/UNIT FIELD
 CREATING A DEVICE DRIVER
 INSTALLING DEVICE DRIVERS
 INSTALLING CHARACTER DEVICES
 INSTALLING BLOCK DEVICES
 REQUEST HEADER
 UNIT CODE FIELD
 COMMAND CODE FIELD
 STATUS FIELD
 DEVICE DRIVER FUNCTIONS
 INIT
 MEDIA CHECK
 MEDIA DESCRIPTOR
 BUILD BPB (BIOS Parameter Block)
 INPUT / OUTPUT
 NONDESTRUCTIVE INPUT NO WAIT
 STATUS
 FLUSH
 OPEN or CLOSE (3.x)
 REMOVABLE MEDIA (DOS 3.x)
 THE CLOCK$ DEVICE

CHAPTER 10. LOTUS-INTEL-MICROSOFT  EXPANDED MEMORY SPECIFICATION
 The Expanded Memory Manager
  History
  Page Frames
 Expanded Memory Services
 AST/Quadram/Ashton-Tate Enhanced EMM
  Calling the Manager
  Common EMS         s (hex calls)
    1 (40h) Get Manager Status
    2 (41h) Get Page Frame Segment
    3 (42h) Get Number of Pages
    4 (43h) Get Handle and Allocate Memory
    5 (44h) Map Memory
    6 (45h) Release Handle and Memory
    7 (46h) Get EMM Version
    8 (47h) Save Mapping Context
    9 (48h) Restore Mapping Context
   10 (49h) Reserved
   11 (4Ah) Reserved
   12 (4Bh) Get Number of EMM Handles
   13 (4Ch) Get Pages Owned By Handle
   14 (4Dh) Get Pages for All Handles
   15 (4Eh) Get Or Set Page Map
  new LIM 4.0 specification:
   16 (4Fh) Get/Set Partial Page Map
   17 (50h) Map/Unmap Multiple Pages
   18 (51h) Reallocate Pages
   19 (52h) Handle Attribute Functions
   20 (53h) Get Handle Name
   21 (54h) Get Handle Directory
   22 (55h) Alter Page Map & Jump
   23 (56h) Alter Page Map & Call
   24 (57h) Move Memory Region
   25 (58h) Get Mappable Physical Address Array
   26 (59h) Get Expanded Memory Hardware
   27 (5Ah) Allocate Raw Pages
   28 (5Bh) Get Alternate Map Register Set
   29 (5Ch) Prepare Expanded Memory Hardware
   30 (5Dh) Enable OS/E Function Set
   31 (5Eh) Unknown
   32 (5Fh) Unknown
   33 (60h) Unknown
   34 (61h) AST Generic Accelerator Card Support
      (68h) EEMS - Get Addresses of All Page Frames in System
      (69h) EEMS - Map Page Into Frame
      (6Ah) EEMS - Page Mapping
 Expanded Memory Manager Error Codes
 LIM 4.0 extended error codes
