Interrupt List Release 61 Last change 16jul00
Copyright (c) 1989-1999,2000 Ralf Brown
Index for category D - DOS kernel

Table of Contents by Order
20 - INT 20 - DOS 1+ - TERMINATE PROGRAM
2100 - INT 21 - DOS 1+ - TERMINATE PROGRAM
2101 - INT 21 - DOS 1+ - READ CHARACTER FROM STANDARD INPUT, WITH ECHO
2102 - INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
2103 - INT 21 - DOS 1+ - READ CHARACTER FROM STDAUX
2104 - INT 21 - DOS 1+ - WRITE CHARACTER TO STDAUX
2105 - INT 21 - DOS 1+ - WRITE CHARACTER TO PRINTER
2106 - INT 21 - DOS 1+ - DIRECT CONSOLE OUTPUT
2106--DLFF - INT 21 - DOS 1+ - DIRECT CONSOLE INPUT
2107 - INT 21 - DOS 1+ - DIRECT CHARACTER INPUT, WITHOUT ECHO
2108 - INT 21 - DOS 1+ - CHARACTER INPUT WITHOUT ECHO
2109 - INT 21 - DOS 1+ - WRITE STRING TO STANDARD OUTPUT
210A - INT 21 - DOS 1+ - BUFFERED INPUT
210B - INT 21 - DOS 1+ - GET STDIN STATUS
210C - INT 21 - DOS 1+ - FLUSH BUFFER AND READ STANDARD INPUT
210D - INT 21 - DOS 1+ - DISK RESET
210E - INT 21 - DOS 1+ - SELECT DEFAULT DRIVE
210F - INT 21 - DOS 1+ - OPEN FILE USING FCB
2110 - INT 21 - DOS 1+ - CLOSE FILE USING FCB
2111 - INT 21 - DOS 1+ - FIND FIRST MATCHING FILE USING FCB
2112 - INT 21 - DOS 1+ - FIND NEXT MATCHING FILE USING FCB
2113 - INT 21 - DOS 1+ - DELETE FILE USING FCB
2114 - INT 21 - DOS 1+ - SEQUENTIAL READ FROM FCB FILE
2115 - INT 21 - DOS 1+ - SEQUENTIAL WRITE TO FCB FILE
2116 - INT 21 - DOS 1+ - CREATE OR TRUNCATE FILE USING FCB
2117 - INT 21 - DOS 1+ - RENAME FILE USING FCB
2118 - INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
2119 - INT 21 - DOS 1+ - GET CURRENT DEFAULT DRIVE
211A - INT 21 - DOS 1+ - SET DISK TRANSFER AREA ADDRESS
211B - INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR DEFAULT DRIVE
211C - INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR SPECIFIC DRIVE
211D - INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
211E - INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
211F - INT 21 - DOS 1+ - GET DRIVE PARAMETER BLOCK FOR DEFAULT DRIVE
2120 - INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
2121 - INT 21 - DOS 1+ - READ RANDOM RECORD FROM FCB FILE
2122 - INT 21 - DOS 1+ - WRITE RANDOM RECORD TO FCB FILE
2123 - INT 21 - DOS 1+ - GET FILE SIZE FOR FCB
2124 - INT 21 - DOS 1+ - SET RANDOM RECORD NUMBER FOR FCB
2125 - INT 21 - DOS 1+ - SET INTERRUPT VECTOR
2126 - INT 21 - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX
2127 - INT 21 - DOS 1+ - RANDOM BLOCK READ FROM FCB FILE
2128 - INT 21 - DOS 1+ - RANDOM BLOCK WRITE TO FCB FILE
2129 - INT 21 - DOS 1+ - PARSE FILENAME INTO FCB
212A - INT 21 - DOS 1+ - GET SYSTEM DATE
212B - INT 21 - DOS 1+ - SET SYSTEM DATE
212C - INT 21 - DOS 1+ - GET SYSTEM TIME
212D - INT 21 - DOS 1+ - SET SYSTEM TIME
212E--DL00 - INT 21 - DOS 1+ - SET VERIFY FLAG
212F - INT 21 - DOS 2+ - GET DISK TRANSFER AREA ADDRESS
2130 - INT 21 - DOS 2+ - GET DOS VERSION
2131 - INT 21 - DOS 2+ - TERMINATE AND STAY RESIDENT
2132 - INT 21 - DOS 2+ - GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE
2133 - INT 21 - DOS 2+ - EXTENDED BREAK CHECKING
213302 - INT 21 - DOS 3.x+ internal - GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE
213303 - INT 21 - DOS 3.4/4.0 - GET CURRENT CPSW STATE
213304 - INT 21 - DOS 3.4/4.0 - SET CPSW STATE
213305 - INT 21 - DOS 4.0+ - GET BOOT DRIVE
213306 - INT 21 - DOS 5+ - GET TRUE VERSION NUMBER
213307 - INT 21 - Windows95 - SET/CLEAR DOS_FLAG
2134 - INT 21 - DOS 2+ - GET ADDRESS OF INDOS FLAG
2135 - INT 21 - DOS 2+ - GET INTERRUPT VECTOR
2136 - INT 21 - DOS 2+ - GET FREE DISK SPACE
213700 - INT 21 - DOS 2+ - "SWITCHAR" - GET SWITCH CHARACTER
213701 - INT 21 - DOS 2+ - "SWITCHAR" - SET SWITCH CHARACTER
2137 - INT 21 - DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
2138 - INT 21 - DOS 2+ - GET COUNTRY-SPECIFIC INFORMATION
2138--DXFFFF - INT 21 - DOS 3.0+ - SET COUNTRY CODE
2139 - INT 21 - DOS 2+ - "MKDIR" - CREATE SUBDIRECTORY
213A - INT 21 - DOS 2+ - "RMDIR" - REMOVE SUBDIRECTORY
213B - INT 21 - DOS 2+ - "CHDIR" - SET CURRENT DIRECTORY
213C - INT 21 - DOS 2+ - "CREAT" - CREATE OR TRUNCATE FILE
213D - INT 21 - DOS 2+ - "OPEN" - OPEN EXISTING FILE
213E - INT 21 - DOS 2+ - "CLOSE" - CLOSE FILE
213F - INT 21 - DOS 2+ - "READ" - READ FROM FILE OR DEVICE
2140 - INT 21 - DOS 2+ - "WRITE" - WRITE TO FILE OR DEVICE
2141 - INT 21 - DOS 2+ - "UNLINK" - DELETE FILE
2142 - INT 21 - DOS 2+ - "LSEEK" - SET CURRENT FILE POSITION
214300 - INT 21 - DOS 2+ - GET FILE ATTRIBUTES
214301 - INT 21 - DOS 2+ - "CHMOD" - SET FILE ATTRIBUTES
214302 - INT 21 - MS-DOS 7 - GET COMPRESSED FILE SIZE
2143FFBP5053 - INT 21 - MS-DOS 7.20 (Win98) - EXTENDED-LENGTH FILENAME OPERATIONS
214400 - INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
214401 - INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
214402 - INT 21 - DOS 2+ - IOCTL - READ FROM CHARACTER DEVICE CONTROL CHANNEL
214402 - INT 21 U - MS-DOS 7.0+ - CONFIG$ device - GET CONFIGURATION INFORMATION
214403 - INT 21 - DOS 2+ - IOCTL - WRITE TO CHARACTER DEVICE CONTROL CHANNEL
214403 - INT 21 U - MS-DOS 7.0+ - CONFIG$ device - SET??? CONFIGURATION INFORMATION
214404 - INT 21 - DOS 2+ - IOCTL - READ FROM BLOCK DEVICE CONTROL CHANNEL
214405 - INT 21 - DOS 2+ - IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL
214406 - INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
214407 - INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
214408 - INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
214409 - INT 21 - DOS 3.1+ - IOCTL - CHECK IF BLOCK DEVICE REMOTE
21440A - INT 21 - DOS 3.1+ - IOCTL - CHECK IF HANDLE IS REMOTE
21440B - INT 21 - DOS 3.1+ - IOCTL - SET SHARING RETRY COUNT
21440C - INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
21440D - INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
21440DCX084A - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - LOCK LOGICAL VOLUME
21440DCX084B - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - LOCK PHYSICAL VOLUME
21440DCX086A - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - UNLOCK LOGICAL VOLUME
21440DCX086B - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - UNLOCK PHYSICAL VOLUME
21440DCX086C - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - GET LOCK FLAG STATE
21440DCX086D - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - ENUMERATE OPEN FILES
21440DCX086E - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - FIND SWAP FILE
21440DCX0870 - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - GET CURRENT LOCK STATE
21440DCX0871 - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - GET FIRST CLUSTER
21440E - INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
21440F - INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
214410 - INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (HANDLE)
214411 - INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (DRIVE)
2145 - INT 21 - DOS 2+ - "DUP" - DUPLICATE FILE HANDLE
2146 - INT 21 - DOS 2+ - "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE
2147 - INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
2148 - INT 21 - DOS 2+ - ALLOCATE MEMORY
2149 - INT 21 - DOS 2+ - FREE MEMORY
214A - INT 21 - DOS 2+ - RESIZE MEMORY BLOCK
214B - INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
214B05 - INT 21 - DOS 5+ - SET EXECUTION STATE
214C - INT 21 - DOS 2+ - "EXIT" - TERMINATE WITH RETURN CODE
214D - INT 21 - DOS 2+ - GET RETURN CODE (ERRORLEVEL)
214E - INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE
214F - INT 21 - DOS 2+ - "FINDNEXT" - FIND NEXT MATCHING FILE
2150 - INT 21 - DOS 2+ internal - SET CURRENT PROCESS ID (SET PSP ADDRESS)
2151 - INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
2152 - INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
2153 - INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK TO DRIVE PARAM BLOCK
2154 - INT 21 - DOS 2+ - GET VERIFY FLAG
2155 - INT 21 - DOS 2+ internal - CREATE CHILD PSP
2156 - INT 21 - DOS 2+ - "RENAME" - RENAME FILE
215700 - INT 21 - DOS 2+ - GET FILE'S LAST-WRITTEN DATE AND TIME
215701 - INT 21 - DOS 2+ - SET FILE'S LAST-WRITTEN DATE AND TIME
215702 - INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTES FOR FILE
215703 - INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTE PROPERTIES
215704 - INT 21 - DOS 4.x only - SET EXTENDED ATTRIBUTES
215704 - INT 21 - MS-DOS 7/Windows95 - GET LAST ACCESS DATE AND TIME
215705 - INT 21 - MS-DOS 7/Windows95 - SET LAST ACCESS DATE AND TIME
215706 - INT 21 - MS-DOS 7/Windows95 - GET CREATION DATE AND TIME
215707 - INT 21 - MS-DOS 7/Windows95 - SET CREATION DATE AND TIME
2158 - INT 21 - DOS 2.11+ - GET OR SET MEMORY ALLOCATION STRATEGY
2158 - INT 21 - DOS 5+ - GET OR SET UMB LINK STATE
2159--BX0000 - INT 21 - DOS 3.0+ - GET EXTENDED ERROR INFORMATION
2159--BX0001 - INT 21 - European MS-DOS 4.0 - GET HARD ERROR INFORMATION
215A - INT 21 - DOS 3.0+ - CREATE TEMPORARY FILE
215B - INT 21 - DOS 3.0+ - CREATE NEW FILE
215C - INT 21 - DOS 3.0+ - "FLOCK" - RECORD LOCKING
215D00 - INT 21 U - DOS 3.1+ internal - SERVER FUNCTION CALL
215D01 - INT 21 U - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
215D02 - INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE FILE BY NAME
215D03 - INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN COMPUTER
215D04 - INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN PROCESS
215D05 - INT 21 U - DOS 3.1+ internal - SHARE.EXE - GET OPEN FILE LIST ENTRY
215D06 - INT 21 U - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
215D07 - INT 21 U - DOS 3.1+ network - GET REDIRECTED PRINTER MODE
215D08 - INT 21 U - DOS 3.1+ network - SET REDIRECTED PRINTER MODE
215D09 - INT 21 U - DOS 3.1+ network - FLUSH REDIRECTED PRINTER OUTPUT
215D0A - INT 21 - DOS 3.1+ - SET EXTENDED ERROR INFORMATION
215D0B - INT 21 OU - DOS 4.x only - internal - GET DOS SWAPPABLE DATA AREAS
215E00 - INT 21 - DOS 3.1+ network - GET MACHINE NAME
215E01CH00 - INT 21 - DOS 3.1+ network - SET MACHINE NAME
215E02 - INT 21 - DOS 3.1+ network - SET NETWORK PRINTER SETUP STRING
215E03 - INT 21 - DOS 3.1+ network - GET NETWORK PRINTER SETUP STRING
215E04 - INT 21 - DOS 3.1+ network - SET PRINTER MODE
215E05 - INT 21 - DOS 3.1+ network - GET PRINTER MODE
215F00 - INT 21 - DOS 3.1+ network - GET REDIRECTION MODE
215F01 - INT 21 - DOS 3.1+ network - SET REDIRECTION MODE
215F02 - INT 21 - DOS 3.1+ network - GET REDIRECTION LIST ENTRY
215F03 - INT 21 - DOS 3.1+ network - REDIRECT DEVICE
215F04 - INT 21 - DOS 3.1+ network - CANCEL REDIRECTION
215F05 - INT 21 - DOS 4.0+ network - GET EXTENDED REDIRECTION LIST ENTRY
215F07 - INT 21 - DOS 5+ - ENABLE DRIVE
215F08 - INT 21 - DOS 5+ - DISABLE DRIVE
2160 - INT 21 - DOS 3.0+ - "TRUENAME" - CANONICALIZE FILENAME OR PATH
2161 - INT 21 - DOS 3.0+ - UNUSED (RESERVED FOR NETWORK USE)
2162 - INT 21 - DOS 3.0+ - GET CURRENT PSP ADDRESS
216300 - INT 21 - DOS 2.25 only - GET LEAD BYTE TABLE ADDRESS
216300 - INT 21 - DOS 3.2+ - GET DOUBLE BYTE CHARACTER SET LEAD-BYTE TABLE
216301 - INT 21 - DOS 2.25, DOS 3.2+ - SET KOREAN (HANGEUL) INPUT MODE
216302 - INT 21 - DOS 2.25, DOS 3.2+ - GET KOREAN (HANGEUL) INPUT MODE
2164 - INT 21 - DOS 3.2+ internal - SET DEVICE DRIVER LOOKAHEAD FLAG
2165 - INT 21 - DOS 3.3+ - GET EXTENDED COUNTRY INFORMATION
2165 - INT 21 - DOS 4.0+ - COUNTRY-DEPENDENT CHARACTER CAPITALIZATION
216523 - INT 21 U - DOS 4.0+ - DETERMINE IF CHARACTER REPRESENTS YES/NO RESPONSE
2165 - INT 21 U - DOS 4.0+ internal - COUNTRY-DEPENDENT FILENAME CAPITALIZATION
216601 - INT 21 - DOS 3.3+ - GET GLOBAL CODE PAGE TABLE
216602 - INT 21 - DOS 3.3+ - SET GLOBAL CODE PAGE TABLE
2167 - INT 21 - DOS 3.3+ - SET HANDLE COUNT
2168 - INT 21 - DOS 3.3+ - "FFLUSH" - COMMIT FILE
2169 - INT 21 U - DOS 4.0+ internal - GET/SET DISK SERIAL NUMBER
216A - INT 21 U - DOS 4.0+ - COMMIT FILE
216B - INT 21 U - DOS 4.0 internal - IFS IOCTL
216B - INT 21 U - DOS 5+ - NULL FUNCTION
216C00 - INT 21 - DOS 4.0+ - EXTENDED OPEN/CREATE
216D - INT 21 U - DOS 5+ ROM - FIND FIRST ROM PROGRAM
216E - INT 21 U - DOS 5+ ROM - FIND NEXT ROM PROGRAM
216F00 - INT 21 U - DOS 5+ ROM - GET ROM SCAN START ADDRESS
216F01 - INT 21 U - DOS 5+ ROM - SET ROM SCAN START ADDRESS
216F02 - INT 21 U - DOS 5+ ROM - GET EXCLUSION REGION LIST
216F03 - INT 21 U - DOS 5+ ROM - SET EXCLUSION REGION LIST
2170 - INT 21 - MS-DOS 7 (Windows95) - GET/SET INTERNATIONALIZATION INFORMATION
2171 - INT 21 - Windows95 - LONG FILENAME FUNCTIONS
21710D - INT 21 - Windows95 - RESET DRIVE
217139 - INT 21 - Windows95 - LONG FILENAME - MAKE DIRECTORY
21713A - INT 21 - Windows95 - LONG FILENAME - REMOVE DIRECTORY
21713B - INT 21 - Windows95 - LONG FILENAME - CHANGE DIRECTORY
217141 - INT 21 - Windows95 - LONG FILENAME - DELETE FILE
217143 - INT 21 - Windows95 - LONG FILENAME - EXTENDED GET/SET FILE ATTRIBUTES
217147 - INT 21 - Windows95 - LONG FILENAME - GET CURRENT DIRECTORY
21714E - INT 21 - Windows95 - LONG FILENAME - FIND FIRST MATCHING FILE
21714F - INT 21 - Windows95 - LONG FILENAME - FIND NEXT MATCHING FILE
217156 - INT 21 - Windows95 - LONG FILENAME - RENAME FILE
217160CL00 - INT 21 - Windows95 - LONG FILENAME - "TRUENAME" - CANONICALIZE PATH
217160CL01 - INT 21 - Windows95 - LONG FILENAME - GET SHORT (8.3) FILENAME FOR FILE
217160CL02 - INT 21 - Windows95 - LONG FILENAME - GET CANONICAL LONG FILENAME OR PATH
21716C - INT 21 - Windows95 - LONG FILENAME - CREATE OR OPEN FILE
2171A0 - INT 21 - Windows95 - LONG FILENAME - GET VOLUME INFORMATION
2171A1 - INT 21 - Windows95 - LONG FILENAME - "FindClose" - TERMINATE DIRECTORY SEARCH
2171A2 - INT 21 U - Windows95 - internal - LONG FILENAME - FIND NEXT MATCHING FILE
2171A3 - INT 21 U - Windows95 - internal
2171A4 - INT 21 U - Windows95 - internal
2171A5 - INT 21 U - Windows95 - internal
2171A6 - INT 21 - Windows95 - LONG FILENAME - GET FILE INFO BY HANDLE
2171A7BL00 - INT 21 - Windows95 - LONG FILENAME - FILE TIME TO DOS TIME
2171A7BL01 - INT 21 - Windows95 - LONG FILENAME - DOS TIME TO FILE TIME
2171A8 - INT 21 - Windows95 - LONG FILENAME - GENERATE SHORT FILENAME
2171A9 - INT 21 - Windows95 - LONG FILENAME - SERVER CREATE OR OPEN FILE
2171AABH00 - INT 21 - Windows95 - LONG FILENAME - CREATE SUBST
2171AABH01 - INT 21 - Windows95 - LONG FILENAME - TERMINATE SUBST
2171AABH02 - INT 21 - Windows95 - LONG FILENAME - QUERY SUBST
2172 - INT 21 - Windows95 beta - LFN-FindClose
2173 - INT 21 - MS-DOS 7 - DRIVE LOCKING AND FLUSHING
217302 - INT 21 - Windows95 - FAT32 - "Get_ExtDPB" - GET EXTENDED DPB
217303 - INT 21 - Windows95 - FAT32 - GET EXTENDED FREE SPACE ON DRIVE
217304 - INT 21 - Windows95 - FAT32 - Set DPB TO USE FOR FORMATTING
217305CXFFFF - INT 21 - Windows95 - FAT32 - EXTENDED ABSOLUTE DISK READ/WRITE
2180 - INT 21 - European MS-DOS 4.0 - "AEXEC" - EXECUTE PROGRAM IN BACKGROUND
2181 - INT 21 - European MS-DOS 4.0 - "FREEZE" - STOP A PROCESS
2182 - INT 21 - European MS-DOS 4.0 - "RESUME" - RESTART A PROCESS
2183 - INT 21 - European MS-DOS 4.0 - "PARTITION" - GET/SET FOREGROUND PARTITION SIZE
218400 - INT 21 - European MS-DOS 4.0 - "CREATMEM" - CREATE A SHARED MEMORY AREA
218401 - INT 21 - European MS-DOS 4.0 - "GETMEM" - OBTAIN ACCESS TO SHARED MEMORY AREA
218402 - INT 21 - European MS-DOS 4.0 - "RELEASEMEM" - FREE SHARED MEMORY AREA
2185 - INT 21 U - European MS-DOS 4.0 - ???
2186 - INT 21 - European MS-DOS 4.0 - "SETFILETABLE" - INSTALL NEW FILE HANDLE TABLE
2187 - INT 21 - European MS-DOS 4.0 - "GETPID" - GET PROCESS IDENTIFIER
2188 - INT 21 U - European MS-DOS 4.0 - ???
2189 - INT 21 - European MS-DOS 4.0 - SLEEP
218A - INT 21 - European MS-DOS 4.0 - "CWAIT" - WAIT FOR CHILD TO TERMINATE
218B - INT 21 U - European MS-DOS 4.0 - ???
218C - INT 21 - European MS-DOS 4.0 - SET SIGNAL HANDLER
218D - INT 21 - European MS-DOS 4.0 - SEND SIGNAL
218E00BH00 - INT 21 - European MS-DOS 4.0 - "SETPRI" - GET/SET PROCESS PRIORITY
218F - INT 21 U - European MS-DOS 4.0 - ???
2190 - INT 21 U - European MS-DOS 4.0 - ???
2191 - INT 21 U - European MS-DOS 4.0 - ???
2192 - INT 21 U - European MS-DOS 4.0 - ???
2193 - INT 21 - European MS-DOS 4.0 - "PIPE" - CREATE A NEW PIPE
2194 - INT 21 U - European MS-DOS 4.0 - ???
2195 - INT 21 - European MS-DOS 4.0 - HARD ERROR PROCESSING
2196 - INT 21 U - European MS-DOS 4.0 - ???
2197 - INT 21 U - European MS-DOS 4.0 - ???
2198 - INT 21 U - European MS-DOS 4.0 - ???
2199 - INT 21 u - European MS-DOS 4.0 - "PBLOCK" - BLOCK A PROCESS
219A - INT 21 u - European MS-DOS 4.0 - "PRUN" - UNBLOCK A PROCESS
21F8 - INT 21 - DOS v2.11-2.13 - SET OEM INT 21 HANDLER
21F9 - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
21FA - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
21FB - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
21FC - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
21FD - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
21FE - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
21FF - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
22 - INT 22 - DOS 1+ - PROGRAM TERMINATION ADDRESS
23 - INT 23 - DOS 1+ - CONTROL-C/CONTROL-BREAK HANDLER
24 - INT 24 C - DOS 1+ - CRITICAL ERROR HANDLER
25 - INT 25 - DOS 1+ - ABSOLUTE DISK READ (except partitions > 32M)
25----CXFFFF - INT 25 - DOS 3.31+ - ABSOLUTE DISK READ (32M-2047M hard-disk partition)
26 - INT 26 - DOS 1+ - ABSOLUTE DISK WRITE (except partitions > 32M)
26----CXFFFF - INT 26 - DOS 3.31+ - ABSOLUTE DISK WRITE (32M-2047M hard-disk partition)
27 - INT 27 - DOS 1+ - TERMINATE AND STAY RESIDENT
28 - INT 28 C - DOS 2+ - DOS IDLE INTERRUPT
29 - INT 29 C - DOS 2+ - FAST CONSOLE OUTPUT
2A80 - INT 2A CU - NETWORK - BEGIN DOS CRITICAL SECTION
2A81 - INT 2A CU - NETWORK - END DOS CRITICAL SECTION
2A82 - INT 2A CU - NETWORK - END DOS CRITICAL SECTIONS 0 THROUGH 7
2B - INT 2B - DOS 2+ - RESERVED
2B - INT 2B - IBM ROM-DOS v4.0 - ???
2C - INT 2C - DOS 2+ - RESERVED
2D - INT 2D - DOS 2+ - RESERVED
2F0800 - INT 2F U - DRIVER.SYS support - INSTALLATION CHECK
2F0801 - INT 2F U - DRIVER.SYS support - ADD NEW BLOCK DEVICE
2F0802 - INT 2F U - DRIVER.SYS support - EXECUTE DEVICE DRIVER REQUEST
2F0803 - INT 2F U - DOS 4.0+ DRIVER.SYS support - GET DRIVE DATA TABLE LIST
2F1002CHFF - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - READ BUFFERS
2F1003 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - FLUSH BUFFERS
2F1004 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - FREE FAT CHAIN
2F1005 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - ALLOCATE CLUSTER
2F1006 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - NEXT CLUSTER / READ FAT???
2F1007 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - UPDATE FAT ENTRY / WRITE FAT???
2F1008 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - FIXUP CHECKSUMS / DIR UPDATE???
2F1009 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - DIRECTORY BUFFER INFO
2F1200 - INT 2F U - DOS 3.0+ internal - INSTALLATION CHECK
2F1201 - INT 2F U - DOS 3.0+ internal - CLOSE CURRENT FILE
2F1202 - INT 2F U - DOS 3.0+ internal - GET INTERRUPT ADDRESS
2F1203 - INT 2F U - DOS 3.0+ internal - GET DOS DATA SEGMENT
2F1204 - INT 2F U - DOS 3.0+ internal - NORMALIZE PATH SEPARATOR
2F1205 - INT 2F U - DOS 3.0+ internal - OUTPUT CHARACTER TO STANDARD OUTPUT
2F1206 - INT 2F U - DOS 3.0+ internal - INVOKE CRITICAL ERROR
2F1207 - INT 2F U - DOS 3.0+ internal - MAKE DISK BUFFER MOST-RECENTLY USED
2F1208 - INT 2F U - DOS 3.0+ internal - DECREMENT SFT REFERENCE COUNT
2F1209 - INT 2F U - DOS 3.0+ internal - FLUSH AND FREE DISK BUFFER
2F120A - INT 2F U - DOS 3.0+ internal - PERFORM CRITICAL ERROR INTERRUPT
2F120B - INT 2F U - DOS 3.0+ internal - SIGNAL SHARING VIOLATION TO USER
2F120C - INT 2F U - DOS 3.0+ internal - OPEN DEVICE AND SET SFT OWNER/MODE
2F120D - INT 2F U - DOS 3.0+ internal - GET DATE AND TIME
2F120E - INT 2F U - DOS 3.0+ internal - MARK ALL DISK BUFFERS UNREFERENCED
2F120F - INT 2F U - DOS 3.0+ internal - MAKE BUFFER MOST RECENTLY USED
2F1210 - INT 2F U - DOS 3.0+ internal - FIND UNREFERENCED DISK BUFFER
2F1211 - INT 2F U - DOS 3.0+ internal - NORMALIZE ASCIZ FILENAME
2F1212 - INT 2F U - DOS 3.0+ internal - GET LENGTH OF ASCIZ STRING
2F1213 - INT 2F U - DOS 3.0+ internal - UPPERCASE CHARACTER
2F1214 - INT 2F U - DOS 3.0+ internal - COMPARE FAR POINTERS
2F1215 - INT 2F U - DOS 3.0+ internal - FLUSH BUFFER
2F1216 - INT 2F U - DOS 3.0+ internal - GET ADDRESS OF SYSTEM FILE TABLE ENTRY
2F1217 - INT 2F U - DOS 3.0+ internal - GET CURRENT DIRECTORY STRUCTURE FOR DRIVE
2F1218 - INT 2F U - DOS 3.0+ internal - GET CALLER'S REGISTERS
2F1219 - INT 2F U - DOS 3.0+ internal - SET DRIVE???
2F121A - INT 2F U - DOS 3.0+ internal - GET FILE'S DRIVE
2F121B - INT 2F U - DOS 3.0+ internal - SET YEAR/LENGTH OF FEBRUARY
2F121C - INT 2F U - DOS 3.0+ internal - CHECKSUM MEMORY
2F121D - INT 2F U - DOS 3.0+ internal - SUM MEMORY
2F121E - INT 2F U - DOS 3.0+ internal - COMPARE FILENAMES
2F121F - INT 2F U - DOS 3.0+ internal - BUILD CURRENT DIRECTORY STRUCTURE
2F1220 - INT 2F U - DOS 3.0+ internal - GET JOB FILE TABLE ENTRY
2F1221 - INT 2F U - DOS 3.0+ internal - CANONICALIZE FILE NAME
2F1222 - INT 2F U - DOS 3.0+ internal - SET EXTENDED ERROR INFO
2F1223 - INT 2F U - DOS 3.0+ internal - CHECK IF CHARACTER DEVICE
2F1224 - INT 2F U - DOS 3.0+ internal - SHARING RETRY DELAY
2F1225 - INT 2F U - DOS 3.0+ internal - GET LENGTH OF ASCIZ STRING
2F1226 - INT 2F U - DOS 3.3+ internal - OPEN FILE
2F1227 - INT 2F U - DOS 3.3+ internal - CLOSE FILE
2F1228BP4200 - INT 2F U - DOS 3.3+ internal - MOVE FILE POINTER
2F1229 - INT 2F U - DOS 3.3+ internal - READ FROM FILE
2F122A - INT 2F U - DOS 3.3+ internal - SET FASTOPEN ENTRY POINT
2F122B - INT 2F U - DOS 3.3+ internal - IOCTL
2F122C - INT 2F U - DOS 3.3+ internal - GET DEVICE CHAIN
2F122D - INT 2F U - DOS 3.3+ internal - GET EXTENDED ERROR CODE
2F122E - INT 2F U - DOS 4.0+ internal - GET OR SET ERROR TABLE ADDRESSES
2F122F - INT 2F U - DOS 4.x internal - SET DOS VERSION NUMBER TO RETURN
2F13 - INT 2F U - DOS 3.2+ - SET DISK INTERRUPT HANDLER
2F1400 - INT 2F - European MS-DOS 4.0 POPUP - "CheckPu" - INSTALLATION CHECK
2F1401 - INT 2F - European MS-DOS 4.0 POPUP - "PostPu" - OPEN/CLOSE POPUP SCREEN
2F1402 - INT 2F - European MS-DOS 4.0 POPUP - "SavePu" - SAVE POPUP SCREEN
2F1403 - INT 2F - European MS-DOS 4.0 POPUP - "RestorePu" - RESTORE SCREEN
2F1607BX0015 - INT 2F C - MS Windows - "DOSMGR" VIRTUAL DEVICE API
2F160E - INT 2F U - MS-DOS 7 kernel - BOOT LOGO SUPPORT???
2F160F - INT 2F U - MS-DOS 7 kernel - GET/SET ??? HANDLER
2F1611 - INT 2F U - MS-DOS 7 kernel - GET SHELL PARAMETERS
2F1612 - INT 2F U - MS-DOS 7 kernel - GET ???
2F1613 - INT 2F - MS-DOS 7 kernel - GET SYSTEM.DAT (REGISTRY FILE) PATHNAME
2F1614 - INT 2F U - MS-DOS 7 kernel - SET SYSTEM.DAT (REGISTRY FILE) PATHNAME
2F1690 - INT 2F U - MS-DOS 7 kernel - GET/SET ???
2F4601 - INT 2F CU - MS Windows WINOLDAP - SWITCHING ???
2F4602 - INT 2F CU - MS Windows WINOLDAP - SWITCHING ???
2F4A00CX0000 - INT 2F CU - DOS 5+ - FLOPPY-DISK LOGICAL DRIVE CHANGE NOTIFICATION
2F4A01 - INT 2F - DOS 5+ - QUERY FREE HMA SPACE
2F4A02 - INT 2F - DOS 5+ - ALLOCATE HMA SPACE
2F4A03 - INT 2F U - Windows95 - DOS KERNEL - (DE)ALLOCATE HMA MEMORY BLOCK
2F4A04 - INT 2F U - Windows95 - DOS KERNEL - GET START OF HMA MEMORY CHAIN
2F4A06 - INT 2F CU - DOS 5+ - DOS SUPERVISOR "REBOOT PANEL" - ADJUST MEMORY SIZE
2F4A16 - INT 2F U - Windows95 - OPEN BOOT LOG
2F4A17 - INT 2F U - Windows95 - WRITE TO BOOT LOG
2F4A18 - INT 2F U - Windows95 - CLOSE BOOT LOG
2F4A21 - INT 2F U - Windows95 - ???
2F4A31 - INT 2F U - Windows95 - ???
2F4A32 - INT 2F U - Windows95 - PATCH ???
2F4A33 - INT 2F - Windows95 - CHECK MS-DOS VERSION 7
30 - INT 30 - (NOT A VECTOR!) - DOS 1+ - FAR JMP instruction for CP/M-style calls
31 - INT 31 - overwritten by CP/M jump instruction in INT 30


20 - INT 20 - DOS 1+ - TERMINATE PROGRAM
INT 20 - DOS 1+ - TERMINATE PROGRAM
	CS = PSP segment
Return: never
Notes:	(see INT 21/AH=00h)
	this function sets the program's return code (ERRORLEVEL) to 00h
SeeAlso: INT 21/AH=00h,INT 21/AH=4Ch

Top
2100 - INT 21 - DOS 1+ - TERMINATE PROGRAM
INT 21 - DOS 1+ - TERMINATE PROGRAM
	AH = 00h
	CS = PSP segment
Notes:	Microsoft recommends using INT 21/AH=4Ch for DOS 2+
	this function sets the program's return code (ERRORLEVEL) to 00h
	execution continues at the address stored in INT 22 after DOS performs
	  whatever cleanup it needs to do (restoring the INT 22,INT 23,INT 24
	  vectors from the PSP assumed to be located at offset 0000h in the
	  segment indicated by the stack copy of CS, etc.)
	if the PSP is its own parent, the process's memory is not freed; if
	  INT 22 additionally points into the terminating program, the
	  process is effectively NOT terminated
	not supported by MS Windows 3.0 DOSX.EXE DOS extender
SeeAlso: AH=26h,AH=31h,AH=4Ch,INT 20,INT 22

Top
2101 - INT 21 - DOS 1+ - READ CHARACTER FROM STANDARD INPUT, WITH ECHO
INT 21 - DOS 1+ - READ CHARACTER FROM STANDARD INPUT, WITH ECHO
	AH = 01h
Return: AL = character read
Notes:	^C/^Break are checked, and INT 23 executed if read
	^P toggles the DOS-internal echo-to-printer flag
	^Z is not interpreted, thus not causing an EOF if input is redirected
	character is echoed to standard output
	standard input is always the keyboard and standard output the screen
	  under DOS 1.x, but they may be redirected under DOS 2+
SeeAlso: AH=06h,AH=07h,AH=08h,AH=0Ah

Top
2102 - INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
	AH = 02h
	DL = character to write
Return: AL = last character output (despite the official docs which state
		nothing is returned) (at least DOS 2.1-7.0)
Notes:	^C/^Break are checked, and INT 23 executed if pressed
	standard output is always the screen under DOS 1.x, but may be
	  redirected under DOS 2+
	the last character output will be the character in DL unless DL=09h
	  on entry, in which case AL=20h as tabs are expanded to blanks
	if standard output is redirected to a file, no error checks (write-
	  protected, full media, etc.) are performed
SeeAlso: AH=06h,AH=09h

Top
2103 - INT 21 - DOS 1+ - READ CHARACTER FROM STDAUX
INT 21 - DOS 1+ - READ CHARACTER FROM STDAUX
	AH = 03h
Return: AL = character read
Notes:	keyboard checked for ^C/^Break, and INT 23 executed if detected
	STDAUX is usually the first serial port
SeeAlso: AH=04h,INT 14/AH=02h,INT E0/CL=03h

Top
2104 - INT 21 - DOS 1+ - WRITE CHARACTER TO STDAUX
INT 21 - DOS 1+ - WRITE CHARACTER TO STDAUX
	AH = 04h
	DL = character to write
Notes:	keyboard checked for ^C/^Break, and INT 23 executed if detected
	STDAUX is usually the first serial port
	if STDAUX is busy, this function will wait until it becomes free
SeeAlso: AH=03h,INT 14/AH=01h,INT E0/CL=04h

Top
2105 - INT 21 - DOS 1+ - WRITE CHARACTER TO PRINTER
INT 21 - DOS 1+ - WRITE CHARACTER TO PRINTER
	AH = 05h
	DL = character to print
Notes:	keyboard checked for ^C/^Break, and INT 23 executed if detected
	STDPRN is usually the first parallel port, but may be redirected under
	  DOS 2+
	if the printer is busy, this function will wait
SeeAlso: INT 17/AH=00h

Top
2106 - INT 21 - DOS 1+ - DIRECT CONSOLE OUTPUT
INT 21 - DOS 1+ - DIRECT CONSOLE OUTPUT
	AH = 06h
	DL = character (except FFh)
Return: AL = character output (despite official docs which state nothing is
		returned) (at least DOS 2.1-7.0)
Notes:	does not check ^C/^Break
	writes to standard output, which is always the screen under DOS 1.x,
	  but may be redirected under DOS 2+
SeeAlso: AH=02h,AH=09h

Top
2106--DLFF - INT 21 - DOS 1+ - DIRECT CONSOLE INPUT
INT 21 - DOS 1+ - DIRECT CONSOLE INPUT
	AH = 06h
	DL = FFh
Return: ZF set if no character available
	    AL = 00h
	ZF clear if character available
	    AL = character read
Notes:	^C/^Break are NOT checked
	if the returned character is 00h, the user pressed a key with an
	  extended keycode, which will be returned by the next call of this
	  function
	this function reads from standard input, which is always the keyboard
	  under DOS 1.x, but may be redirected under DOS 2+
	although the return of AL=00h when no characters are available is not
	  documented, some programs rely on this behavior
SeeAlso: AH=0Bh

Top
2107 - INT 21 - DOS 1+ - DIRECT CHARACTER INPUT, WITHOUT ECHO
INT 21 - DOS 1+ - DIRECT CHARACTER INPUT, WITHOUT ECHO
	AH = 07h
Return: AL = character read from standard input
Notes:	does not check ^C/^Break
	standard input is always the keyboard under DOS 1.x, but may be
	  redirected under DOS 2+
	if the interim console flag is set (see AX=6301h), partially-formed
	  double-byte characters may be returned
SeeAlso: AH=01h,AH=06h,AH=08h,AH=0Ah

Top
2108 - INT 21 - DOS 1+ - CHARACTER INPUT WITHOUT ECHO
INT 21 - DOS 1+ - CHARACTER INPUT WITHOUT ECHO
	AH = 08h
Return: AL = character read from standard input
Notes:	^C/^Break are checked, and INT 23 executed if detected
	standard input is always the keyboard under DOS 1.x, but may be
	  redirected under DOS 2+
	if the interim console flag is set (see AX=6301h), partially-formed
	  double-byte characters may be returned
SeeAlso: AH=01h,AH=06h,AH=07h,AH=0Ah,AH=64h"DOS 3.2+"

Top
2109 - INT 21 - DOS 1+ - WRITE STRING TO STANDARD OUTPUT
INT 21 - DOS 1+ - WRITE STRING TO STANDARD OUTPUT
	AH = 09h
	DS:DX -> '$'-terminated string
Return: AL = 24h (the '$' terminating the string, despite official docs which
		state that nothing is returned) (at least DOS 2.1-7.0 and
		NWDOS)
Notes:	^C/^Break are checked, and INT 23 is called if either pressed
	standard output is always the screen under DOS 1.x, but may be
	  redirected under DOS 2+
	under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
SeeAlso: AH=02h,AH=06h"OUTPUT"

Top
210A - INT 21 - DOS 1+ - BUFFERED INPUT
INT 21 - DOS 1+ - BUFFERED INPUT
	AH = 0Ah
	DS:DX -> buffer (see #01344)
Return: buffer filled with user input
Notes:	^C/^Break are checked, and INT 23 is called if either detected
	reads from standard input, which may be redirected under DOS 2+
	if the maximum buffer size (see #01344) is set to 00h, this call returns
	  immediately without reading any input
SeeAlso: AH=0Ch,INT 2F/AX=4810h

Format of DOS input buffer:
Offset	Size	Description	(Table 01344)
 00h	BYTE	maximum characters buffer can hold
 01h	BYTE	(call) number of chars from last input which may be recalled
		(ret) number of characters actually read, excluding CR
 02h  N BYTEs	actual characters read, including the final carriage return

Top
210B - INT 21 - DOS 1+ - GET STDIN STATUS
INT 21 - DOS 1+ - GET STDIN STATUS
	AH = 0Bh
Return: AL = status
	    00h if no character available
	    FFh if character is available
Notes:	^C/^Break are checked, and INT 23 is called if either pressed
	standard input is always the keyboard under DOS 1.x, but may be
	  redirected under DOS 2+
	if the interim console flag is set (see AX=6301h), this function
	  returns AL=FFh if a partially-formed double-byte character is
	  available
SeeAlso: AH=06h"INPUT",AX=4406h

Top
210C - INT 21 - DOS 1+ - FLUSH BUFFER AND READ STANDARD INPUT
INT 21 - DOS 1+ - FLUSH BUFFER AND READ STANDARD INPUT
	AH = 0Ch
	AL = STDIN input function to execute after flushing buffer
	other registers as appropriate for the input function
Return: as appropriate for the specified input function
Note:	if AL is not one of 01h,06h,07h,08h, or 0Ah, the buffer is flushed but
	  no input is attempted
SeeAlso: AH=01h,AH=06h"INPUT",AH=07h,AH=08h,AH=0Ah

Top
210D - INT 21 - DOS 1+ - DISK RESET
INT 21 - DOS 1+ - DISK RESET
	AH = 0Dh
Return: (DOS 6 only) CF clear (earlier versions preserve CF)
Notes:	This function writes all modified disk buffers to disk, but does not
	  update the directory information (that is only done when files are
	  closed or a SYNC call is issued)
SeeAlso: AX=5D01h,AX=710Dh,INT 13/AH=00h,INT 2F/AX=1120h

Top
210E - INT 21 - DOS 1+ - SELECT DEFAULT DRIVE
INT 21 - DOS 1+ - SELECT DEFAULT DRIVE
	AH = 0Eh
	DL = new default drive (00h = A:, 01h = B:, etc)
Return: AL = number of potentially valid drive letters
Notes:	under Novell NetWare, the return value is always 32, the number of
	  drives that NetWare supports
	under DOS 3.0+, the return value is the greatest of 5, the value of
	  LASTDRIVE= in CONFIG.SYS, and the number of drives actually present
	on a DOS 1.x/2.x single-floppy system, AL returns 2 since the floppy
	  may be accessed as either A: or B:
	otherwise, the return value is the highest drive actually present
	DOS 1.x supports a maximum of 16 drives, 2.x a maximum of 63 drives,
	  and 3+ a maximum of 26 drives
	under Novell DOS 7, this function returns the correct LASTDRIVE value
	  even when the undocumented LASTDRIVE=27..32 directive was used in
	  CONFIG.SYS
	"parse FCB" (see AH=29h) can be used to determine whether a drive
	  letter is valid
SeeAlso: AH=19h,AH=3Bh,AH=DBh

Top
210F - INT 21 - DOS 1+ - OPEN FILE USING FCB
INT 21 - DOS 1+ - OPEN FILE USING FCB
	AH = 0Fh
	DS:DX -> unopened File Control Block (see #01345,#01346)
Return: AL = status
	    00h successful
	    FFh file not found or access denied
Notes:	(DOS 3.1+) file opened for read/write in compatibility mode
	an unopened FCB has the drive, filename, and extension fields filled
	  in and all other bytes cleared
	not supported by MS Windows 3.0 DOSX.EXE DOS extender
	DR DOS checks password attached with AX=4303h
	(FAT32 drive) this function will only succeed for creating a volume
	  label; FAT32 does not support FCBs for file I/O
BUG:	APPEND for DOS 3.3+ corrupts DX if the file is not found
SeeAlso: AH=10h,AH=16h,AH=3Dh,AX=4303h

Format of File Control Block:
Offset	Size	Description	(Table 01345)
 00h	BYTE	drive number (0 = default, 1 = A, etc)
		FFh is not allowed (signals extended FCB, see #01346)
 01h  8 BYTEs	blank-padded file name
 09h  3 BYTEs	blank-padded file extension
 0Ch	WORD	current block number
 0Eh	WORD	logical record size
 10h	DWORD	file size
 14h	WORD	date of last write (see #01666 at AX=5700h)
 16h	WORD	time of last write (see #01665 at AX=5700h) (DOS 1.1+)
 18h  8 BYTEs	reserved (see #01347,#01348,#01349,#01350,#01351)
 20h	BYTE	record within current block
 21h	DWORD	random access record number (if record size is > 64 bytes, high
		  byte is omitted)
SeeAlso: #01346

Format of Extended File Control Block (XFCB):
Offset	Size	Description	(Table 01346)
 00h	BYTE	FFh signature for extended FCB
 01h  5 BYTEs	reserved
 06h	BYTE	file attribute if extended FCB
 07h 36 BYTEs	standard FCB (all offsets are shifted by seven bytes)
SeeAlso: #01246

Format of FCB reserved field for DOS 1.0:
Offset	Size	Description	(Table 01347)
 16h	WORD	location in directory (if high byte = FFh, low byte is device
		  ID)
 18h	WORD	number of first cluster in file
 1Ah	WORD	current absolute cluster number on disk
 1Ch	WORD	current relative cluster number within file
		(0 = first cluster of file, 1 = second cluster, etc.)
 1Eh	BYTE	dirty flag (00h = not dirty)
 1Fh	BYTE	unused

Format of FCB reserved field for DOS 1.10-1.25:
Offset	Size	Description	(Table 01348)
 18h	BYTE	bit 7: set if logical device
		bit 6: not dirty
		bits 5-0: disk number or logical device ID
 19h	WORD	starting cluster number on disk
 1Bh	WORD	current absolute cluster number on disk
 1Dh	WORD	current relative cluster number within file
 1Fh	BYTE	unused

Format of FCB reserved field for DOS 2.x:
Offset	Size	Description	(Table 01349)
 18h	BYTE	bit 7: set if logical device
		bit 6: set if open???
		bits 5-0: ???
 19h	WORD	starting cluster number on disk
 1Bh	WORD	???
 1Dh	BYTE	???
 1Eh	BYTE	???
 1Fh	BYTE	???

Format of FCB reserved field for DOS 3.x:
Offset	Size	Description	(Table 01350)
 18h	BYTE	number of system file table entry for file
 19h	BYTE	attributes
		bits 7,6: 00 = SHARE.EXE not loaded, disk file
			  01 = SHARE.EXE not loaded, character device
			  10 = SHARE.EXE loaded, remote file
			  11 = SHARE.EXE loaded, local file or device
		bits 5-0: low six bits of device attribute word
---SHARE.EXE loaded, local file---
 1Ah	WORD	starting cluster of file on disk
 1Ch	WORD	(DOS 3.x) offset within SHARE of sharing record
		  (see #01637 at AH=52h)
 1Eh	BYTE	file attribute
 1Fh	BYTE	???
---SHARE.EXE loaded, remote file---
 1Ah	WORD	number of sector containing directory entry (see #01352)
 1Ch	WORD	relative cluster within file of last cluster accessed
 1Eh	BYTE	absolute cluster number of last cluster accessed
 1Fh	BYTE	???
---SHARE.EXE not loaded---
 1Ah	BYTE	(low byte of device attribute word AND 0Ch) OR open mode
 1Bh	WORD	starting cluster of file
 1Dh	WORD	number of sector containing directory entry (see #01352)
 1Fh	BYTE	number of directory entry within sector
Note:	if FCB opened on character device, DWORD at 1Ah is set to the address
	  of the device driver header, then the BYTE at 1Ah is overwritten.
SeeAlso: #01646

Format of FCB reserved field for DOS 5.0:
Offset	Size	Description	(Table 01351)
 18h	BYTE	number of system file table entry for file
 19h	BYTE	attributes
		bits 7,6: 00 = SHARE.EXE not loaded, disk file
			  01 = SHARE.EXE not loaded, character device
			  10 = SHARE.EXE loaded, remote file
			  11 = SHARE.EXE loaded, local file or device
		bits 5-0: low six bits of device attribute word
---SHARE.EXE loaded, local file---
 1Ah	WORD	starting cluster of file on disk
 1Ch	WORD	unique sequence number of sharing record
 1Eh	BYTE	file attributes
 1Fh	BYTE	unused???
---SHARE.EXE loaded, remote file---
 1Ah	WORD	network handle
 1Ch	DWORD	network ID
---SHARE not loaded, local device---
 1Ah	DWORD	pointer to device driver header (see #01646)
 1Eh  2 BYTEs	unused???
---SHARE not loaded, local file---
 1Ah	BYTE	extra info
		bit 7: read-only attribute from SFT
		bit 6: archive attribute from SFT
		bits 5-0: high bits of sector number
 1Bh	WORD	starting cluster of file
 1Dh	WORD	low word of sector number containing directory entry
		(see #01352)
 1Fh	BYTE	number of directory entry within sector

Top
2110 - INT 21 - DOS 1+ - CLOSE FILE USING FCB
INT 21 - DOS 1+ - CLOSE FILE USING FCB
	AH = 10h
	DS:DX -> File Control Block (see #01345)
Return: AL = status
	    00h successful
	    FFh failed
Notes:	a successful close forces all disk buffers used by the file to be
	  written and the directory entry to be updated
	not supported by MS Windows 3.0 DOSX.EXE DOS extender
SeeAlso: AH=0Fh,AH=16h,AH=3Eh

Top
2111 - INT 21 - DOS 1+ - FIND FIRST MATCHING FILE USING FCB
INT 21 - DOS 1+ - FIND FIRST MATCHING FILE USING FCB
	AH = 11h
	DS:DX -> unopened FCB (see #01345), may contain '?' wildcards
Return: AL = status
	    00h successful
		[DTA] unopened FCB for first matching file
	    FFh no matching filename, or bad FCB
Notes:	the type of the returned FCB depends on whether the input FCB was a
	  normal or an extended FCB
	the data returned in the DTA (disk transfer area) is actually the
	  drive number (or extended FCB header and drive number) followed by
	  the file's directory entry (see #01352); this format happens to be
	  compatible with an unopened FCB
	for extended FCBs with search attribute 08h, the volume label (if any)
	  will be returned even if the current directory is not the root dir.
	DOS 3.0+ also allows the '*' wildcard
	the search FCB at DS:DX must not be modified if AH=12h will be used to
	  continue searching; DOS 3.3 has set the following parts of the FCB:
		 0Ch	BYTE	???
		 0Dh	WORD	directory entry number of matching file
		 0Fh	WORD	cluster number of current directory
		 11h  4 BYTEs	???
		 15h	BYTE	drive number (1=A:)
	this function is used by many copy protection schemes to obtain the
	  starting cluster of a file
BUG:	under Windows95, if a .EXE program ("MZ" header) rather than a true
	  .COM calls this function from a DOS box, the ten bytes of the
	  directory entry from 0Ch to 15h may be filled with zeros rather than
	  the additional file times
SeeAlso: AH=12h,AH=1Ah,AH=4Eh,INT 2F/AX=111Bh

Format of DOS directory entry:
Offset	Size	Description	(Table 01352)
 00h  8 BYTEs	blank-padded filename
		first character is set to E5h for deleted files (05h for
		  pending delete files under Novell DOS / OpenDOS)
 08h  3 BYTEs	blank-padded file extension
 0Bh	BYTE	attributes
 0Ch 10 BYTEs	(MS-DOS 1.0-6.22) reserved
		(DR DOS) used to store file password / owner (see #01354)
			(see also INT 21/AX=4302h)
		(Novell DOS 7) DELWATCH data (see #01354)
		(MS-DOS 7/Windows95) additional file times (see #01353)
 16h	WORD	time of creation or last update (see #01665 at AX=5700h)
 18h	WORD	date of creation or last update (see #01666 at AX=5700h)
 1Ah	WORD	starting cluster number (see also AX=440Dh/CX=0871h)
		(may not be set in INT 21/AH=11h return data for FAT32 drives)
 1Ch	DWORD	file size
SeeAlso: #01355,#02628,#02629

Format of MS-DOS 7/Windows95 additional file times:
Offset	Size	Description	(Table 01353)
 00h	BYTE	reserved
 01h	BYTE	10-millisecond units past creation time below
 02h	WORD	file creation time
 04h	WORD	file creation date
 06h	WORD	last-access date
 08h	WORD	(FAT32) high word of starting cluster number
Note:	this data is stored beginning at offset 0Ch in a standard directory
	  entry
SeeAlso: #01352

Format of DR DOS 6/Novell DOS 7 additional file information:
Offset	Size	Description	(Table 01354)
 0Ch	BYTE	reserved (00h)
		(DOSPLUS v1.2) user-defined attributes for CP/M compatibility
		  (bit 7 = F1,...,bit 4 = F4, bits 3-0 reserved (0))
 0Dh	BYTE	first character of original filename for deleted file
 0Eh	WORD	encrypted file/directory password
 10h	WORD	reserved (00h)
		(Novell DOS 7 DELWATCH) original file time
		    cleared when file is undeleted or purged
 12h	WORD	(DR DOS 6) file owner ID
		(Novell DOS 7 DELWATCH) original file date
		    cleared when file is undeleted or purged
 14h	WORD	single/multiuser file/directory access rights (see AX=4302h)
---deleted files---
 16h	WORD	(Novell DOS 7 DELWATCH) time of deletion
 18h	WORD	(Novell DOS 7 DELWATCH) date of deletion
Note:	offsets are within the full directory entry
SeeAlso: #01352

Format of MS-DOS 7/Windows95 long-filename directory entry:
Offset	Size	Description	(Table 01355)
 00h	BYTE	LFN record sequence and flags
		bits 5-0: sequence number
		bit 6: set if last long-filename record for file
		bit 7: set if file deleted
 01h 10 BYTEs	long filename, first part
 0Bh	BYTE	0Fh (otherwise impossible file attribute, used as signature)
 0Ch	BYTE	reserved??? (00h)
 0Dh	BYTE	checksum for short filename
 0Eh 12 BYTEs	long filename, second part
 1Ah	WORD	first cluster number (always 0000h for LFN records)
 1Ch  4 BYTEs	long filename, third part
Notes:	long-filename entries are always stored in the directory just prior
	  to the short-name entry for a file
	multiple LFN records are used if the long filename does not fit into
	  a single record
	the short-filename checksum byte is computed by adding up the
	  eleven bytes of the short filename, rotating the intermediate
	  sum right one bit before adding the next character
	the long filename is encoded as 16-bit Unicode characters; for most
	  filenames, this appears in the directory as the ASCII character
	  followed by 00h
SeeAlso: #01352,INT 21/AX=5704h,INT 21/AH=71h

Top
2112 - INT 21 - DOS 1+ - FIND NEXT MATCHING FILE USING FCB
INT 21 - DOS 1+ - FIND NEXT MATCHING FILE USING FCB
	AH = 12h
	DS:DX -> unopened FCB (see #01345)
Return: AL = status
	    00h successful
		Disk Transfer Area filled with unopened FCB
	    FFh no more matching filenames
Note:	(see AH=11h)
	assumes that successful FindFirst executed on search FCB before call
SeeAlso: AH=1Ah,AH=4Fh,INT 2F/AX=111Ch

Top
2113 - INT 21 - DOS 1+ - DELETE FILE USING FCB
INT 21 - DOS 1+ - DELETE FILE USING FCB
	AH = 13h
	DS:DX -> unopened FCB (see #01345), filename filled with template for
		deletion ('?' wildcards allowed)
Return: AL = status
	    00h one or more files successfully deleted
	    FFh no matching files or all were read-only or locked
Notes:	DOS 1.25+ deletes everything in the current directory (including
	  subdirectories) and sets the first byte of the name to 00h (entry
	  never used) instead of E5h if called on an extended FCB with
	  filename '???????????' and bits 0-4 of the attribute set (bits 1 and
	  2 for DOS 1.x).  This may have originally been an optimization to
	  minimize directory searching after a mass deletion (DOS 1.25+ stop
	  the directory search upon encountering a never-used entry), but can
	  corrupt the filesystem under DOS 2+ because subdirectories are
	  removed without deleting the files they contain.
	currently-open files should not be deleted
	MS-DOS allows deletion of read-only files with an extended FCB, whereas
	  Novell NetWare, DR DOS 6, and Novell DOS 7/OpenDOS 7.01 do not
	this function generates a trap "D" under OS/2 v4.x (Warp4) when called
	  on an HPFS partition with a wildcard in the filename; it operates
	  correctly on FAT partitions and when called without wildcards
SeeAlso: AH=41h,INT 2F/AX=1113h

Top
2114 - INT 21 - DOS 1+ - SEQUENTIAL READ FROM FCB FILE
INT 21 - DOS 1+ - SEQUENTIAL READ FROM FCB FILE
	AH = 14h
	DS:DX -> opened FCB (see #01345)
Return: AL = status
	    00h successful
	    01h end of file (no data)
	    02h segment wrap in DTA
	    03h end of file, partial record read
	Disk Tranfer Area filled with record read from file
Notes:	reads a record of the size specified in the FCB beginning at the
	  current file position, then updates the current block and current
	  record fields in the FCB
	if a partial record was read, it is zero-padded to the full size
	not supported by MS Windows 3.0 DOSX.EXE DOS extender
SeeAlso: AH=0Fh,AH=15h,AH=1Ah,AH=3Fh"DOS",INT 2F/AX=1108h

Top
2115 - INT 21 - DOS 1+ - SEQUENTIAL WRITE TO FCB FILE
INT 21 - DOS 1+ - SEQUENTIAL WRITE TO FCB FILE
	AH = 15h
	DS:DX -> opened FCB (see #01345)
	Disk Tranfer Area contains record to be written
Return: AL = status
	    00h successful
	    01h disk full
	    02h segment wrap in DTA
Notes:	writes a record of the size specified in the FCB beginning at the
	  current file position, then updates the current block and current
	  record fields in the FCB
	if less than a full sector is written, the data is placed in a DOS
	  buffer to be written out at a later time
	not supported by MS Windows 3.0 DOSX.EXE DOS extender
SeeAlso: AH=0Fh,AH=14h,AH=1Ah,AH=40h,INT 2F/AX=1109h

Top
2116 - INT 21 - DOS 1+ - CREATE OR TRUNCATE FILE USING FCB
INT 21 - DOS 1+ - CREATE OR TRUNCATE FILE USING FCB
	AH = 16h
	DS:DX -> unopened FCB (see #01345), wildcards not allowed
Return: AL = status
	    00h successful
	    FFh directory full or file exists and is read-only or locked
Notes:	if file already exists, it is truncated to zero length
	if an extended FCB is used, the file is given the attribute in the
	  FCB; this is how to create a volume label in the disk's root dir
	not supported by MS Windows 3.0 DOSX.EXE DOS extender
	(FAT32 drive) this function will only succeed for creating a volume
	  label; FAT32 does not support FCBs for file I/O
SeeAlso: AH=0Fh,AH=10h,AH=3Ch

Top
2117 - INT 21 - DOS 1+ - RENAME FILE USING FCB
INT 21 - DOS 1+ - RENAME FILE USING FCB
	AH = 17h
	DS:DX -> modified FCB (see also #01345)
		the old filename ('?' wildcards OK) is in the standard location
		while the new filename ('?' wildcards OK, no drive) is stored
		in the 11 bytes beginning at offset 11h
Return: AL = status
	    00h successfully renamed
	    FFh no matching files,file is read-only, or new name already exists
Notes:	subdirectories may be renamed using an extended FCB with the
	  appropriate attribute, as may volume labels
	DR DOS checks password attached with AX=4303h before permitting rename
SeeAlso: AH=0Fh,AH=13h,AX=4303h,AH=56h,INT 2F/AX=1111h

Top
2118 - INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
	AH = 18h
Return: AL = 00h
Note:	corresponds to the CP/M BDOS function "get bit map of logged drives",
	  which is meaningless under MS-DOS
SeeAlso: AH=1Dh,AH=1Eh,AH=20h,AX=4459h,INT 60/DI=0513h

Top
2119 - INT 21 - DOS 1+ - GET CURRENT DEFAULT DRIVE
INT 21 - DOS 1+ - GET CURRENT DEFAULT DRIVE
	AH = 19h
Return: AL = drive (00h = A:, 01h = B:, etc)
Note:	Novell NetWare uses the fact that DOS 2.x COMMAND.COM issues this call
	  from a particular location every time it starts a command to
	  determine when to issue an automatic EOJ
SeeAlso: AH=0Eh,AH=47h,AH=BBh

Top
211A - INT 21 - DOS 1+ - SET DISK TRANSFER AREA ADDRESS
INT 21 - DOS 1+ - SET DISK TRANSFER AREA ADDRESS
	AH = 1Ah
	DS:DX -> Disk Transfer Area (DTA)
Notes:	the DTA is set to PSP:0080h when a program is started
	under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
SeeAlso: AH=11h,AH=12h,AH=2Fh,AH=4Eh,AH=4Fh

Top
211B - INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR DEFAULT DRIVE
INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR DEFAULT DRIVE
	AH = 1Bh
Return: AL = sectors per cluster (allocation unit)
	CX = bytes per sector
	DX = total number of clusters
	DS:BX -> media ID byte (see #01356)
Notes:	under DOS 1.x, DS:BX points at an actual copy of the FAT; later
	  versions return a pointer to a copy of the FAT's ID byte
	this function may not be properly supported on CD-ROMs and other
	  installable file systems (use AX=4402h"CD-ROM" for CD-ROMs
	  instead)
BUG:	DOS 7.10 (Win95B/Win98) reportedly returns incorrect values in AL and
	  DX for FAT12/FAT16 drives, even though it manages correct results
	  for FAT32 drives (DOS windows are not affected, only real-mode
	  DOS)
SeeAlso: AH=1Ch,AH=36h

(Table 01356)
Values for media ID byte:
 FFh	floppy, double-sided, 8 sectors per track (320K)
 FEh	floppy, single-sided, 8 sectors per track (160K)
 FDh	floppy, double-sided, 9 sectors per track (360K)
 FCh	floppy, single-sided, 9 sectors per track (180K)
 FAh	HP 200LX D: ROM disk, 16 sectors per track (995K)
	HP 200LX E: (Stacker host drive ???)
 F9h	floppy, double-sided, 15 sectors per track (1.2M)
	floppy, double-sided, 9 sectors per track (720K,3.5")
 F8h	hard disk
 F0h	other media
	(e.g. floppy, double-sized, 18 sectors per track -- 1.44M,3.5")

Top
211C - INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR SPECIFIC DRIVE
INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR SPECIFIC DRIVE
	AH = 1Ch
	DL = drive (00h = default, 01h = A:, etc)
Return: AL = sectors per cluster (allocation unit), or FFh if invalid drive
	CX = bytes per sector
	DX = total number of clusters
	DS:BX -> media ID byte (see #01356)
Notes:	under DOS 1.x, DS:BX points at an actual copy of the FAT; later
	  versions return a pointer to a copy of the FAT's ID byte
	on a DBLSPACE drive, the total number of clusters is based on the
	  estimated compression ratio
	this function may not be properly supported on CD-ROMs and other
	  installable file systems (use AX=4402h"CD-ROM" for CD-ROMs
	  instead)
BUG:	DOS 7.10 (Win95B/Win98) reportedly returns incorrect values in AL and
	  DX for FAT12/FAT16 drives, even though it manages correct results
	  for FAT32 drives (DOS windows are not affected, only real-mode
	  DOS)
SeeAlso: AH=1Bh,AH=36h

Top
211D - INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
	AH = 1Dh
Return: AL = 00h
Note:	corresponds to the CP/M BDOS function "get bit map of read-only
	  drives", which is meaningless under MS-DOS
SeeAlso: AH=18h,AH=1Eh,AH=20h,AX=4459h

Top
211E - INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
	AH = 1Eh
Return: AL = 00h
Note:	corresponds to the CP/M BDOS function "set file attributes" which was
	 meaningless under MS-DOS 1.x
SeeAlso: AH=18h,AH=1Dh,AH=20h

Top
211F - INT 21 - DOS 1+ - GET DRIVE PARAMETER BLOCK FOR DEFAULT DRIVE
INT 21 - DOS 1+ - GET DRIVE PARAMETER BLOCK FOR DEFAULT DRIVE
	AH = 1Fh
Return: AL = status
	    00h successful
		DS:BX -> Drive Parameter Block (DPB) (see #01357 for DOS 1.x,
			AH=32h for DOS 2+)
	    FFh invalid drive
Note:	this call was undocumented prior to the release of DOS 5.0; however,
	  only the DOS 4.0+ version of the DPB has been documented
SeeAlso: AH=32h,AX=7302h

Format of DOS 1.1 and MS-DOS 1.25 drive parameter block:
Offset	Size	Description	(Table 01357)
 00h	BYTE	sequential device ID
 01h	BYTE	logical drive number (0=A:)
 02h	WORD	bytes per sector
 04h	BYTE	highest sector number within a cluster
 05h	BYTE	shift count to convert clusters into sectors
 06h	WORD	starting sector number of first FAT
 08h	BYTE	number of copies of FAT
 09h	WORD	number of directory entries
 0Bh	WORD	number of first data sector
 0Dh	WORD	highest cluster number (number of data clusters + 1)
 0Fh	BYTE	sectors per FAT
 10h	WORD	starting sector of directory
 12h	WORD	address of allocation table
Note:	the DOS 1.0 table is the same except that the first and last fields
	  are missing; see INT 21/AH=32h for the DOS 2+ version
SeeAlso: #01395,#04039

Top
2120 - INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
	AH = 20h
Return: AL = 00h
Note:	corresponds to the CP/M BDOS function "get/set default user
	  (sublibrary) number", which is meaningless under MS-DOS
SeeAlso: AH=18h,AH=1Dh,AH=1Eh,AX=4459h

Top
2121 - INT 21 - DOS 1+ - READ RANDOM RECORD FROM FCB FILE
INT 21 - DOS 1+ - READ RANDOM RECORD FROM FCB FILE
	AH = 21h
	DS:DX -> opened FCB (see #01345)
Return: AL = status
	    00h successful
	    01h end of file, no data read
	    02h segment wrap in DTA, no data read
	    03h end of file, partial record read
	Disk Tranfer Area filled with record read from file
Notes:	the record is read from the current file position as specified by the
	  random record and record size fields of the FCB
	the file position is not updated after reading the record
	if a partial record is read, it is zero-padded to the full size
	not supported by MS Windows 3.0 DOSX.EXE DOS extender
SeeAlso: AH=14h,AH=22h,AH=27h,AH=3Fh"DOS"

Top
2122 - INT 21 - DOS 1+ - WRITE RANDOM RECORD TO FCB FILE
INT 21 - DOS 1+ - WRITE RANDOM RECORD TO FCB FILE
	AH = 22h
	DS:DX -> opened FCB (see #01345)
	Disk Transfer Area contains record to be written
Return: AL = status
	    00h successful
	    01h disk full
	    02h segment wrap in DTA
Notes:	the record is written to the current file position as specified by the
	  random record and record size fields of the FCB
	the file position is not updated after writing the record
	if the record is located beyond the end of the file, the file is
	  extended but the intervening data remains uninitialized
	if the record only partially fills a disk sector, it is copied to a
	  DOS disk buffer to be written out to disk at a later time
	not supported by MS Windows 3.0 DOSX.EXE DOS extender
SeeAlso: AH=15h,AH=21h,AH=28h,AH=40h

Top
2123 - INT 21 - DOS 1+ - GET FILE SIZE FOR FCB
INT 21 - DOS 1+ - GET FILE SIZE FOR FCB
	AH = 23h
	DS:DX -> unopened FCB (see #01345), wildcards not allowed
Return: AL = status
	    00h successful (matching file found)
		FCB random record field filled with size in records, rounded up
		to next full record
	    FFh failed (no matching file found)
Notes:	not supported by MS Windows 3.0 DOSX.EXE DOS extender
	MS-DOS returns nonsense if the FCB record number field is set to a very
	  large positive number, and status FFh if negative; DR DOS returns the
	  correct file size in both cases
BUG:	APPEND for DOS 3.3+ corrupts DX if the file is not found
SeeAlso: AH=42h

Top
2124 - INT 21 - DOS 1+ - SET RANDOM RECORD NUMBER FOR FCB
INT 21 - DOS 1+ - SET RANDOM RECORD NUMBER FOR FCB
	AH = 24h
	DS:DX -> opened FCB (see #01345)
Notes:	computes the random record number corresponding to the current record
	  number and record size, then stores the result in the FCB
	normally used when switching from sequential to random access
	not supported by MS Windows 3.0 DOSX.EXE DOS extender
SeeAlso: AH=21h,AH=27h,AH=42h

Top
2125 - INT 21 - DOS 1+ - SET INTERRUPT VECTOR
INT 21 - DOS 1+ - SET INTERRUPT VECTOR
	AH = 25h
	AL = interrupt number
	DS:DX -> new interrupt handler
Notes:	this function is preferred over direct modification of the interrupt
	  vector table
	some DOS extenders place an API on this function, as it is not
	  directly meaningful in protected mode
	under DR DOS 5.0-6.0, this function does not use any of the
	  DOS-internal stacks and may thus be called at any time; however,
	  under Novell DOS 7.0 - DR-DOS 7.02, this function was not reentrant.
	  Since 1998/05/29, DR-DOS 7.03 no longer uses any internal stacks and
	  tests for this function much earlier, to allow a minimal stack usage
	  of just two words in addition to the IRET frame, allowing it to be
	  called from INT 21h functions, specificially device drivers.  This
	  fixes the MCS SMB client
	Novell NetWare (except the new DOS Requester) monitors the offset of
	  any INT 24 set, and if equal to the value at startup, substitutes
	  its own handler to allow handling of network errors; this introduces
	  the potential bug that any program whose INT 24 handler offset
	  happens to be the same as COMMAND.COM's will not have its INT 24
	  handler installed
SeeAlso: AX=2501h,AH=35h

Top
2126 - INT 21 - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX
INT 21 - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX
	AH = 26h
	DX = segment at which to create PSP (see #01378)
Return: AL destroyed
Notes:	new PSP is updated with memory size information; INTs 22h, 23h, 24h
	  taken from interrupt vector table; the parent PSP field is set to 0
	(DOS 2+) DOS assumes that the caller's CS is the segment of the PSP to
	  copy
BUG:	DR DOS 6.0 original releases 05/1991 & 08/1991 had a problem where the
	  segment from which the PSP was copied was incorrect so that the PSP
	  was not filled correctly and did not contain the command tail.  The
	  DR DOS 6.0 BDOS patch "PAT312" English (1992/01/07, XDIR /C: A0C6h)
	  and later "full" rebuilds fix this problem (see INT 21/AX=4452h).
SeeAlso: AH=4Bh,AH=50h,AH=51h,AH=55h,AH=62h,AH=67h

Format of Program Segment Prefix (PSP):
Offset	Size	Description	(Table 01378)
 00h  2 BYTEs	INT 20 instruction for CP/M CALL 0 program termination
		the CDh 20h here is often used as a signature for a valid PSP
 02h	WORD	segment of first byte beyond memory allocated to program
 04h	BYTE	(DOS) unused filler
		(OS/2) count of fake DOS version returns
 05h	BYTE	CP/M CALL 5 service request (FAR CALL to absolute 000C0h)
		BUG: (DOS 2+ DEBUG) PSPs created by DEBUG point at 000BEh
 06h	WORD	CP/M compatibility--size of first segment for .COM files
 08h  2 BYTEs	remainder of FAR JMP at 05h
 0Ah	DWORD	stored INT 22 termination address
 0Eh	DWORD	stored INT 23 control-Break handler address
 12h	DWORD	DOS 1.1+ stored INT 24 critical error handler address
 16h	WORD	segment of parent PSP
 18h 20 BYTEs	DOS 2+ Job File Table, one byte per file handle, FFh = closed
 2Ch	WORD	DOS 2+ segment of environment for process (see #01379)
 2Eh	DWORD	DOS 2+ process's SS:SP on entry to last INT 21 call
 32h	WORD	DOS 3+ number of entries in JFT (default 20)
 34h	DWORD	DOS 3+ pointer to JFT (default PSP:0018h)
 38h	DWORD	DOS 3+ pointer to previous PSP (default FFFFFFFFh in 3.x)
		used by SHARE in DOS 3.3
 3Ch	BYTE	DOS 4+ (DBCS) interim console flag (see AX=6301h)
		Novell DOS 7 DBCS interim flag as set with AX=6301h
		(possibly also used by Far East MS-DOS 3.2-3.3)
 3Dh	BYTE	(APPEND) TrueName flag (see INT 2F/AX=B711h)
 3Eh	BYTE	(Novell NetWare) flag: next byte initialized if CEh
		(OS/2) capabilities flag
 3Fh	BYTE	(Novell NetWare) Novell task number if previous byte is CEh
 40h  2 BYTEs	DOS 5+ version to return on INT 21/AH=30h
 42h	WORD	(MSWindows3) selector of next PSP (PDB) in linked list
		Windows keeps a linked list of Windows programs only
 44h	WORD	(MSWindows3) "PDB_Partition"
 46h	WORD	(MSWindows3) "PDB_NextPDB"
 48h	BYTE	(MSWindows3) bit 0 set if non-Windows application (WINOLDAP)
 49h	BYTE	unused by DOS versions <= 6.00
 4Ch	WORD	(MSWindows3) "PDB_EntryStack"
 4Eh  2 BYTEs	unused by DOS versions <= 6.00
 50h  3 BYTEs	DOS 2+ service request (INT 21/RETF instructions)
 53h  2 BYTEs	unused in DOS versions <= 6.00
 55h  7 BYTEs	unused in DOS versions <= 6.00; can be used to make first FCB
		  into an extended FCB
 5Ch 16 BYTEs	first default FCB, filled in from first commandline argument
		overwrites second FCB if opened
 6Ch 16 BYTEs	second default FCB, filled in from second commandline argument
		  overwrites beginning of commandline if opened
 7Ch  4 BYTEs	unused
 80h 128 BYTEs	commandline / default DTA
		command tail is BYTE for length of tail, N BYTEs for the tail,
		  followed by a BYTE containing 0Dh
Notes:	in DOS v3+, the limit on simultaneously open files may be increased by
	  allocating memory for a new open file table, filling it with FFh,
	  copying the first 20 bytes from the default table, and adjusting the
	  pointer and count at 34h and 32h.  However, DOS will only copy the
	  first 20 file handles into a child PSP (including the one created on
	  EXEC).
	in an OS/2 DOS box, values of D0h-FEh in the open file table indicate
	  device drivers
	network redirectors based on the original MS-Net implementation use
	  values of 80h-FEh in the open file table to indicate remote files;
	  Novell NetWare also uses values from FEh down to 80h or one more than
	  FILES= (whichever is greater) to indicate remote files (except on
	  OS/2, where is uses CFh down to 80h)
	MS-DOS 5.00 incorrectly fills the FCB fields when loading a program
	  high; the first FCB is empty and the second contains the first
	  parameter
	some DOS extenders place protected-mode values in various PSP fields
	  such as the "parent" field, which can confuse PSP walkers.  Always
	  check either for the CDh 20h signature or that the suspected PSP is
	  at the beginning of a memory block which owns itself (the preceding
	  paragraph should be a valid MCB with "owner" the same as the
	  suspected PSP).
	Novell NetWare updates the fields at offsets 3Eh and 3Fh without
	  checking that a legal PSP segment is current; see AH=50h for further
	  discussion
	for 4DOS and Windows95, the command tail may be more than 126
	  characters; in that case, the length byte will be set to 7Fh (with
	  an 0Dh in the	 127th position at offset FFh), and the first 126
	  characters will be stored in the PSP, with the entire command line
	  in the environment variable CMDLINE; under at least some versions
	  of 4DOS, the byte at offset FFh is *not* set to 0Dh, so there is no
	  terminating carriage return in the PSP's command tail.
BUG:	When shelling out from the Borland Pascal 7.00 IDE, overly-long
	  command lines will not be delimited by a 0Dh character, and the
	  length byte is set to 80h!  A workaround is to always patch in a
	  0Dh at the last position of the command line buffer before scanning
	  the command line.

Format of environment block:
Offset	Size	Description	(Table 01379)
 00h  N BYTEs	first environment variable, ASCIZ string of form "var=value"
      N BYTEs	second environment variable, ASCIZ string
	...
      N BYTEs	last environment variable, ASCIZ string of form "var=value"
	BYTE	00h
---DOS 3.0+ ---
	WORD	number of strings following environment (normally 1)
      N BYTEs	ASCIZ full pathname of program owning this environment
		other strings may follow

Top
2127 - INT 21 - DOS 1+ - RANDOM BLOCK READ FROM FCB FILE
INT 21 - DOS 1+ - RANDOM BLOCK READ FROM FCB FILE
	AH = 27h
	CX = number of records to read
	DS:DX -> opened FCB (see #01345)
Return: AL = status
	    00h successful, all records read
	    01h end of file, no data read
	    02h segment wrap in DTA, no data read
	    03h end of file, partial read
	Disk Transfer Area filled with records read from file
	CX = number of records read (return AL = 00h or 03h)
Notes:	read begins at current file position as specified in FCB; the file
	  position is updated after reading
	not supported by MS Windows 3.0 DOSX.EXE DOS extender
SeeAlso: AH=21h,AH=28h,AH=3Fh"DOS"

Top
2128 - INT 21 - DOS 1+ - RANDOM BLOCK WRITE TO FCB FILE
INT 21 - DOS 1+ - RANDOM BLOCK WRITE TO FCB FILE
	AH = 28h
	CX = number of records to write
	DS:DX -> opened FCB (see #01345)
	Disk Transfer Area contains records to be written
Return: AL = status
	    00h successful
	    01h disk full or file read-only
	    02h segment wrap in DTA
	CX = number of records written
Notes:	write begins at current file position as specified in FCB; the file
	  position is updated after writing
	if CX = 0000h on entry, no data is written; instead the file size is
	  adjusted to be the same as the file position specified by the random
	  record and record size fields of the FCB
	if the data to be written is less than a disk sector, it is copied into
	  a DOS disk buffer, to be written out to disk at a later time
	not supported by MS Windows 3.0 DOSX.EXE DOS extender
SeeAlso: AH=22h,AH=27h,AH=40h,AH=59h/BX=0000h

Top
2129 - INT 21 - DOS 1+ - PARSE FILENAME INTO FCB
INT 21 - DOS 1+ - PARSE FILENAME INTO FCB
	AH = 29h
	AL = parsing options (see #01380)
	DS:SI -> filename string (both '*' and '?' wildcards OK)
	ES:DI -> buffer for unopened FCB
Return: AL = result code
	    00h successful parse, no wildcards encountered
	    01h successful parse, wildcards present
	    FFh failed (invalid drive specifier)
	DS:SI -> first unparsed character
	ES:DI buffer filled with unopened FCB (see #01345)
Notes:	asterisks in the name are expanded to question marks in the FCB
	all processing stops when a filename terminator is encountered
	cannot be used with filespecs which include a path (DOS 2+)
	Novell NetWare monitors the result code since an 'invalid drive' may
	  signal an attempt to reconnect a network drive; if there are no
	  connections to the specified drive, NetWare attempts to build a
	  connection and map the drive to the SYS:LOGIN directory
SeeAlso: AH=0Fh,AH=16h,AH=26h

Bitfields for parsing options:
Bit(s)	Description	(Table 01380)
 0	skip leading separators
 1	use existing drive number in FCB if no drive is specified, instead of
	  setting field to zero
 2	use existing filename in FCB if no base name is specified, instead of
	  filling field with blanks
 3	use existing extension in FCB if no extension is specified, instead of
	  filling field with blanks
 4-7	reserved (0)

Top
212A - INT 21 - DOS 1+ - GET SYSTEM DATE
INT 21 - DOS 1+ - GET SYSTEM DATE
	AH = 2Ah
Return: CX = year (1980-2099)
	DH = month
	DL = day
---DOS 1.10+---
	AL = day of week (00h=Sunday)
SeeAlso: AH=2Bh"DOS",AH=2Ch,AH=E7h"Novell",INT 1A/AH=04h,INT 2F/AX=120Dh

Top
212B - INT 21 - DOS 1+ - SET SYSTEM DATE
INT 21 - DOS 1+ - SET SYSTEM DATE
	AH = 2Bh
	CX = year (1980-2099)
	DH = month (1-12)
	DL = day (1-31)
Return: AL = status
	    00h successful
	    FFh invalid date, system date unchanged
Note:	DOS 3.3+ also sets CMOS clock; due to the limitations of the CLOCK$
	  driver interface, the CMOS time is also updated to the current
	  DOS time (which is the BIOS time-of-day clock with the default
	  CLOCK$ driver)
SeeAlso: AH=2Ah,AH=2Dh,INT 1A/AH=05h

Top
212C - INT 21 - DOS 1+ - GET SYSTEM TIME
INT 21 - DOS 1+ - GET SYSTEM TIME
	AH = 2Ch
Return: CH = hour
	CL = minute
	DH = second
	DL = 1/100 seconds
Note:	on most systems, the resolution of the system clock is about 5/100sec,
	  so returned times generally do not increment by 1
	on some systems, DL may always return 00h
SeeAlso: AH=2Ah,AH=2Dh,AH=E7h"Novell",INT 1A/AH=00h,INT 1A/AH=02h,INT 1A/AH=FEh
SeeAlso: INT 2F/AX=120Dh

Top
212D - INT 21 - DOS 1+ - SET SYSTEM TIME
INT 21 - DOS 1+ - SET SYSTEM TIME
	AH = 2Dh
	CH = hour
	CL = minute
	DH = second
	DL = 1/100 seconds
Return: AL = result
	    00h successful
	    FFh invalid time, system time unchanged
Note:	DOS 3.3+ also sets CMOS clock; due to the limitations of the CLOCK$
	  driver interface, the CMOS date is also updated to the current
	  DOS date
SeeAlso: AH=2Bh"DOS",AH=2Ch,INT 1A/AH=01h,INT 1A/AH=03h,INT 1A/AH=FFh"AT&T"

Top
212E--DL00 - INT 21 - DOS 1+ - SET VERIFY FLAG
INT 21 - DOS 1+ - SET VERIFY FLAG
	AH = 2Eh
	DL = 00h (DOS 1.x/2.x only)
	AL = new state of verify flag
	    00h off
	    01h on
Notes:	default state at system boot is OFF
	when ON, all disk writes are verified provided the device driver
	  supports read-after-write verification
SeeAlso: AH=54h

Top
212F - INT 21 - DOS 2+ - GET DISK TRANSFER AREA ADDRESS
INT 21 - DOS 2+ - GET DISK TRANSFER AREA ADDRESS
	AH = 2Fh
Return: ES:BX -> current DTA
Note:	under the FlashTek X-32 DOS extender, the pointer is in ES:EBX
SeeAlso: AH=1Ah

Top
2130 - INT 21 - DOS 2+ - GET DOS VERSION
INT 21 - DOS 2+ - GET DOS VERSION
	AH = 30h
---DOS 5+ ---
	AL = what to return in BH
	    00h OEM number (see #01394)
	    01h version flag
Return: AL = major version number (00h if DOS 1.x)
	AH = minor version number
	BL:CX = 24-bit user serial number (most versions do not use this)
---if DOS <5 or AL=00h---
	BH = MS-DOS OEM number (see #01394)
---if DOS 5+ and AL=01h---
	BH = version flag
	    bit 3: DOS is in ROM
	    other: reserved (0)
Notes:	the OS/2 v1.x Compatibility Box returns major version 0Ah (10)
	the OS/2 v2.x Compatibility Box returns major version 14h (20)
	OS/2 Warp 3.0 Virtual DOS Machines report v20.30; Warp 4 VDMs report
	  v20.40.
	the Windows NT DOS box returns version 5.00, subject to SETVER
	DOS 4.01 and 4.02 identify themselves as version 4.00; use
	  INT 21/AH=87h to distinguish between the original European MS-DOS 4.0
	  and the later PC-DOS 4.0x and MS-DOS 4.0x
	IBM DOS 6.1 reports its version as 6.00; use the OEM number to
	  distinguish between MS-DOS 6.00 and IBM DOS 6.1 (there was never an
	  IBM DOS 6.0)
	IBM's PC DOS 7 and Y2K updates report themselves as IBM 7.0 to be
	  distinguished from the MS-DOS 7.0 portion of Windows 95.
	MS-DOS 6.21 reports its version as 6.20; version 6.22 returns the
	  correct value
	Windows95 returns version 7.00 (the underlying MS-DOS), as did the
	  "Chicago" beta (reported in _Microsoft_Systems_Journal_,August 1994);
	  Windows95 OSR2 and OSR2.5 (OPK3) return MS version 7.10
	DR DOS 5.0 and 6.0 report version 3.31; Novell DOS 7 reports IBM v6.00,
	  which some software displays as IBM DOS v6.10 (because of the version
	  mismatch in true IBM DOS, as mentioned above).  The Novell DOS 7
	  SETVER.EXE has an undocumented option /G x.y which sets the "global"
	  DOS version returned by this function for all executables not given
	  a specific version number in SETVER to major version x and minor
	  version y.
	Heiko Goeman's Advanced WinDOS 2.10/2.11/2.21 returns "IBM" DOS 5.00
	  (subject to SETVER) and serial number 0.
	All versions of CCI Multiuser DOS up to "CCI Multiuser DOS 7.22 Gold"
	  as of 1997-02-10 report DOS 3.31.
	DR DOS 3.31, 3.32, 3.33, 3.34, 3.35, 3.40, 3.41, 5.0, 6.0 and
	  DR PalmDOS/NetWare PalmDOS 1.0 report version 3.31;
	  DR DOS "Panther" BETA 1 and "StarTrek" report as 5.0.
	  Novell DOS 7, OpenDOS 7.01, DR-OpenDOS 7.02, DR-DOS 7.02, DR-DOS 7.03
	  all report themselves as IBM 6.00, which some software displays as
	  IBM DOS 6.10 (because of the version mismatch in true IBM DOS,
	  as mentioned above). Use INT 21/AX=4452h to distinguish the DR-DOS
	  family from PC DOS.
	The Novell DOS 7 and OpenDOS 7.01 SETVER.EXE has an undocumented
	  option /G x.y which sets the "global" DOS version returned by this
	  function for all executables not given a specific version number in
	  SETVER to major version x >= 5 and minor version y = 0..254,
	  y = 255 is used to disable the BDOS version check at INT 21/AX=4452h.
	A slightly modified option has been documented for DR-OpenDOS 7.02+:
	  in /X mode it now allows for x >= 1, while y >= 100 requires /X mode,
	  and y >= 128 is used to control advanced version control means now
	  (see below).
	DR-DOS 7.02+ IBMDOS.COM (since 1998-01-10) now recognizes optional
	  paths to filenames stored in the SETVER list. Previously such entries
	  were never found. This allows for a three staged model for SETVERed
	  versions:
	  highest priority = entry with path is matching.
	  middle priority = entry without path is matching.
	  lowest priority = use global version (SETVER /G).
	The DR-DOS 7.02+ SETVER 1.01+ (1998-01-12) has also been enhanced to
	  allow DOS *and* BDOS version faking (see INT 21/AX=4452h): In /X mode,
	  setting a sub-version of y = 128..255 will be reported as 0..127 DOS
	  sub-version, sub-versions of y = 100..127 will instead be used to
	  report this value as BDOS version (64h..7Fh) via INT 21/AX=4452h, and
	  the DOS revision stored in PCM_HEADER in the IBMDOS.COM file will
	  be used to report the DOS sub-version (usually this holds 0, but it
	  can be patched to other values, see INT 21/AX=4452h !!!).
	  Note, that DR-DOS SHARE 2.05+ (1998-01-05) has relaxed version
	  checking, and will install on any DOS revision 0..127, as long as
	  run on a DR-DOS 72h+ kernel (formerly it was bound to a revision
	  byte of 0 only).
	Under Novell DOS 7+, the SETVERing also affects the version number
	  WORD stored at offset +40h in each program's PSP (see #01378).
	  This holds true even for special sub-versions of 100..255
	  (see INT 21/AX=4452h).
	generic MS-DOS 3.30, Compaq MS-DOS 3.31, and others identify themselves
	  as PC-DOS by returning OEM number 00h
	the version returned under DOS 4.0x may be modified by entries in
	  the special program list (see #01662 at AH=52h); the version returned
	  under DOS 5+ may be modified by SETVER--use AX=3306h to get the true
	  version number
SeeAlso: AX=3000h/BX=3000h,AX=3306h,AX=4452h,AH=87h,INT 15/AX=4900h
SeeAlso: AH=20h"S/DOS",INT 2F/AX=122Fh,INT 2F/AX=4010h,INT 2F/AX=4A33h
SeeAlso: INT 2F/AX=E002h

(Table 01394)
Values for DOS OEM number:
 00h *	IBM
     -	(Novell DOS, Caldera OpenDOS, DR-OpenDOS, and DR-DOS 7.02+ report IBM
	  as their OEM)
 01h *	Compaq
 02h *	MS Packaged Product
 04h *	AT&T
 05h *	ZDS (Zenith Electronics, Zenith Electronics)
	Note:	Zenith DOS 3.30 supports >32MB hard disks; this OEM ID can be
		  used to detect that support
 06h *	Hewlett-Packard
 07h *	Zenith Data Systems (ZDS, Groupe Bull), for DOS 5.0+
 08h *	Tandon
 09h *	AST (AST Europe Ltd.)
 0Ah *	Asem
 0Bh *	Hantarex
 0Ch *	SystemsLine
 0Dh *	Packard-Bell
 0Eh *	Intercomp
 0Fh *	Unibit
 10h *	Unidata
 16h *	DEC
 17h *	Olivetti DOS
 23h *	Olivetti (may have been a typo, since 23 = 17h)
 28h *	Texas Instruments
 29h *	Toshiba
 33h -	Novell (Windows/386 device IDs only)
 34h *	MS Multimedia Systems (Windows/386 device IDs only)
 35h *	MS Multimedia Systems (Windows/386 device IDs only)
 4Dh *	Hewlett-Packard (HP)
 5Eh -	RxDOS (Api Software & Mike Podanoffsky)	 http://www.freedos.org/
 66h -	PhysTechSoft (PTS-DOS)	http://www.phystechsoft.com/
	probably Paragon Technology Systems Corporation PTS-DOS as well
 99h -	General Software's Embedded DOS
 CDh -	Paragon Technology Systems Corporation ("Source DOS" S/DOS 1.0+)
	(see also INT 21/AH=20h"S/DOS")
 EDh -	reserved for future OpenDOS/DR-DOS based projects  http://www.drdos.org
 EEh	DR DOS
 EFh	Novell DOS
	Note:	released versions of Novell DOS 7 use OEM ID 00h instead
 FDh	FreeDOS	 http://www.freedos.org/
 FFh *	Microsoft, Phoenix (listed as "undefined" by Microsoft)
Notes:	'*' indicates an OEM release of MS-DOS, while '-' indicates an OEM
	  number used by a non-Microsoft DOS
	known OEM releases of MS-DOS:
	    AT&T DOS 3.10 (uses DOS 2.x cluster sizes and FAT structures)
	    Commodore DOS 3
	    Compaq DOS 3.31 (>32MB partitions similar to MS-DOS 4+)
	    Computerland DOS 3.10 (mix of DOS 2.x and 3.x disk mechanisms)
	    Eagle MS-DOS 1.25 (DOS 1.x with some hard disk support and built-in
		  ANSI.SYS functionality)
	    Epson Equity III DOS 3.10 (different clustering)
	    Leading Edge
	    NEC DOS 3.3
	    Olivetti DOS 2.11
	    Phoenix DOS 3.3, 4.01
	    Sanyo DOS 3.2
	    Tandy
	    Toshiba DOS
	    Unisys
	    Wyse MS-DOS 3
	    Zenith DOS 2.x (uses Zenith disk mechanism, extra drives at G:)
	    Zenith DOS 3.x (can be configured for Zenith or MS-DOS mechanism)
	    Zenith DOS 3.3 PLUS (>32MB partitions similar to MS-DOS 4+)

Top
2131 - INT 21 - DOS 2+ - TERMINATE AND STAY RESIDENT
INT 21 - DOS 2+ - TERMINATE AND STAY RESIDENT
	AH = 31h
	AL = return code
	DX = number of paragraphs to keep resident
Return: never
Notes:	the value in DX only affects the memory block containing the PSP;
	  additional memory allocated via AH=48h is not affected
	the minimum number of paragraphs which will remain resident is 11h
	  for DOS 2.x and 06h for DOS 3.0+
	most TSRs can save some memory by releasing their environment block
	  before terminating (see #01378 at AH=26h,AH=49h)
	any open files remain open, so one should close any files which will
	  not be used before going resident; to access a file which is left
	  open from the TSR, one must switch PSP segments first (see AH=50h)
SeeAlso: AH=00h,AH=4Ch,AH=4Dh,INT 20,INT 22,INT 27

Top
2132 - INT 21 - DOS 2+ - GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE
INT 21 - DOS 2+ - GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE
	AH = 32h
	DL = drive number (00h = default, 01h = A:, etc)
Return: AL = status
	    00h successful
		DS:BX -> Drive Parameter Block (DPB) (see #01395) for specified
			  drive
	    FFh invalid or network drive
Notes:	the OS/2 compatibility box supports the DOS 3.3 version of this call
	  except for the DWORD at offset 12h
	this call updates the DPB by reading the disk; the DPB may be accessed
	  via the DOS list of lists (see #01627 at AH=52h) if disk access is not
	  desirable.
	undocumented prior to the release of DOS 5.0; only the DOS 4.0+
	  version of the DPB has been documented, however
	supported by DR DOS 3.41+; DR DOS 3.41-6.0 return the same data as
	  MS-DOS 3.31
	IBM ROM-DOS v4.0 also reports invalid/network (AL=FFh) on the ROM drive
SeeAlso: AH=1Fh,AH=52h,AX=7302h

Format of DOS Drive Parameter Block:
Offset	Size	Description	(Table 01395)
 00h	BYTE	drive number (00h = A:, 01h = B:, etc)
 01h	BYTE	unit number within device driver
 02h	WORD	bytes per sector
 04h	BYTE	highest sector number within a cluster
 05h	BYTE	shift count to convert clusters into sectors
 06h	WORD	number of reserved sectors at beginning of drive
 08h	BYTE	number of FATs
 09h	WORD	number of root directory entries
 0Bh	WORD	number of first sector containing user data
 0Dh	WORD	highest cluster number (number of data clusters + 1)
		16-bit FAT if greater than 0FF6h, else 12-bit FAT
 0Fh	BYTE	number of sectors per FAT
 10h	WORD	sector number of first directory sector
 12h	DWORD	address of device driver header (see #01646)
 16h	BYTE	media ID byte (see #01356)
 17h	BYTE	00h if disk accessed, FFh if not
 18h	DWORD	pointer to next DPB
---DOS 2.x---
 1Ch	WORD	cluster containing start of current directory, 0000h=root,
		FFFFh = unknown
 1Eh 64 BYTEs	ASCIZ pathname of current directory for drive
---DOS 3.x---
 1Ch	WORD	cluster at which to start search for free space when writing
 1Eh	WORD	number of free clusters on drive, FFFFh = unknown
---DOS 4.0-6.0---
 0Fh	WORD	number of sectors per FAT
 11h	WORD	sector number of first directory sector
 13h	DWORD	address of device driver header (see #01646)
 17h	BYTE	media ID byte (see #01356)
 18h	BYTE	00h if disk accessed, FFh if not
 19h	DWORD	pointer to next DPB
 1Dh	WORD	cluster at which to start search for free space when writing,
		usually the last cluster allocated
 1Fh	WORD	number of free clusters on drive, FFFFh = unknown
SeeAlso: #01357,#01663,#01787 at AX=7302h,#04039 at INT E0/CL=71h

Top
2133 - INT 21 - DOS 2+ - EXTENDED BREAK CHECKING
INT 21 - DOS 2+ - EXTENDED BREAK CHECKING
	AH = 33h
	AL = subfunction
	    00h get current extended break state
		Return: DL = current state, 00h = off, 01h = on
	    01h set state of extended ^C/^Break checking
		DL = new state
		    00h off, check only on character I/O functions
		    01h on, check on all DOS functions
		Return: (Novell DOS 7) DL = old state of extended Break checks
Note:	under DOS 3.1+ and DR DOS, this function does not use any of the
	  DOS-internal stacks and may thus be called at any time
SeeAlso: AX=3302h

Top
213302 - INT 21 - DOS 3.x+ internal - GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE
INT 21 - DOS 3.x+ internal - GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE
	AX = 3302h
	DL = new state (00h for OFF, 01h for ON)
Return: DL = old state of extended BREAK checking
Notes:	this function does not use any of the DOS-internal stacks and may thus
	  be called at any time; one possible use is modifying Control-Break
	  checking from within an interrupt handler or TSR
	not supported by DR DOS through version 6.0 (error code 01h);
	  newly-supported by Novell DOS 7
SeeAlso: AH=33h

Top
213303 - INT 21 - DOS 3.4/4.0 - GET CURRENT CPSW STATE
INT 21 - DOS 3.4/4.0 - GET CURRENT CPSW STATE
	AX = 3303h
Return: DL = current CPSW
Notes:	this function and AX=3304h were intended to support a proposed
	  code-page switching flag (using the WORD at offset 0Ch in the DOS
	  directory entry for codepage information); however, this function
	  has always been a NOP in public releases of DOS and OS/2.
	  See _DOS_Internals_ Chapter 2 for more information.
	the released MS-DOS 4.00 IO.SYS has an undocumented CONFIG.SYS
	  directive named CPSW= and that beside others the MS-DOS 4.00 ATTRIB
	  supported a number of undocumented special parameters for
	  "predefined" Extended Attributes (EAs) e.g.
	  ATTRIB filename [(CODEPAGE|CP)[=new_value]].
	this function does not use any of the DOS-internal stacks and may
	   thus be called at any time. It is directly dispatched from
	   the INT 21h entry point with interrupts disabled.
SeeAlso: AX=3304h

Top
213304 - INT 21 - DOS 3.4/4.0 - SET CPSW STATE
INT 21 - DOS 3.4/4.0 - SET CPSW STATE
	AX = 3304h
	DL = new CPSW state
Return: nothing
Notes:	this function and AX=3303h were intended to support a proposed
	  code-page switching flag (using the WORD at offset 0Ch in the DOS
	  directory entry for codepage information); however, this function
	  has always been a NOP in public releases of DOS and OS/2.
	  See _DOS_Internals_ Chapter 2 for more information.
	the released MS-DOS 4.00 IO.SYS has an undocumented CONFIG.SYS
	  directive named CPSW= and that beside others the MS-DOS 4.00 ATTRIB
	  supported a number of undocumented special parameters for
	  "predefined" Extended Attributes (EAs) e.g.
	  ATTRIB filename [(CODEPAGE|CP)[=new_value]].
	this function does not use any of the DOS-internal stacks and may
	   thus be called at any time. It is directly dispatched from
	   the INT 21h entry point with interrupts disabled.
SeeAlso: AX=3303h,AH=11h,AX=5702h

Top
213305 - INT 21 - DOS 4.0+ - GET BOOT DRIVE
INT 21 - DOS 4.0+ - GET BOOT DRIVE
	AX = 3305h
Return: DL = boot drive (1=A:,...)
Notes:	This function does not use any of the DOS-internal stacks and may
	   thus be called at any time.  It is directly dispatched from
	   the INT 21h entry point with interrupts disabled.
	NEC 9800-series PCs always call the boot drive A: and assign the other
	  drive letters sequentially to the other drives in the system
	this call is supported by OS/2 Warp 3.0, but not earlier versions of
	  OS/2; it is also supported by Novell DOS 7

Top
213306 - INT 21 - DOS 5+ - GET TRUE VERSION NUMBER
INT 21 - DOS 5+ - GET TRUE VERSION NUMBER
	AX = 3306h
Return: BL = major version
	BH = minor version
	DL = revision (bits 2-0, all others 0)
	DH = version flags
	    bit 3: DOS is in ROM
	    bit 4: DOS is in HMA
	AL = FFh if true DOS version < 5.0
Notes:	this function always returns the true version number, unlike AH=30h,
	  whose return value may be changed with SETVER
	because of the conflict from the CBIS redirector (see next
	  entry), programs should check whether BH is less than 100 (64h)
	  and BL is at least 5 before accepting the returned BX as the true
	  version number; however, even this is not entirely reliable when
	  that redirector is loaded
	Under MS-DOS/PC DOS, DR DOS, PTS-DOS, S/DOS this function does not
	  use any of the DOS internal stacks and thus is fully reentrant
	OS/2 v2.1 will return BX=0A14h (version 20.10)
	Windows 95 and Windows 95 SP1 return version 7.00; Windows 95 OSR2
	  and OPK3 (OSR2.5) return version MS 7.10.
	the Windows NT DOS box returns BX=3205h (version 5.50)
	Novell DOS 7 returns IBM v6.00, which some software displays as
	  IBM DOS v6.10 (because of the version mismatch in true IBM DOS
	  mentioned for INT 21/AH=30h); versions through Update 15 all
	  return revision code 00h
	Windows95 and Windows95 SP1 return version 7.00; Windows95 OSR2 returns
	  version 7.10
	Heiko Goeman's Advanced WinDOS 2.10/2.11/2.21 returns DOS 5.00, 
	  revision 0.
	Novell DOS 7, OpenDOS 7.01, DR-OpenDOS 7.02, DR-DOS 7.02, DR-DOS 7.03
	  all return IBM 6.00, which some software displays as IBM DOS 6.10
	  (because of the version mismatch in true IBM DOS mentioned for
	  INT 21/AH=30h); versions through Novell DOS 7 Update 15.2 (01/1996)
	  all return revision code 00h. The DOS revision is stored in bits 7-0
	  of the "patch_version" field in the PCM_HEADER structure in the
	  IBMDOS.COM file (see also INT 21/AX=4452h !!!). The version
	  flags (DH) are stored in bits 15-8 of "patch_version", but is updated
	  at runtime to reflect the actual status. "patch_version" is also
	  reported as DX in INT 21/AX=4452h.
	Unlike MS-DOS, under Novell DOS 7+ IBMDOS.COM will also allow to
	  SETVER the returned "true" DOS version same as with INT 21/AX=3000h
	  and INT 21/AX=3001h.
	DR-DOS 7.02+ IBMDOS.COM (since 1998-01-10) now recognizes optional
	  paths to filenames stored in the SETVER list. Previously such
	  entries were never found. This enables a three staged model of
	  SETVERed versions:
	  highest priority = entry with path is matching.
	  middle priority = entry without path is matching.
	  lowest priority = use global version (SETVER /G).
	The DR-DOS 7.02+ SETVER 1.01+ (1998-01-12) has also been enhanced to
	  allow BDOS and DOS version faking (see INT 21/AX=4452h). In /X mode,
	  a set sub-version of y = 128..255 will be reported as 0..127 DOS
	  sub-version, sub-versions of y = 100..127 will be used to report this
	  value as BDOS version (64h..7Fh) with INT 21/AX=4452h instead while
	  bits 6-0 of the DOS revision stored in PCM_HEADER in the IBMDOS.COM
	  file will be used to report the BH DOS sub-version 0..127 (usually
	  this holds 0, but it can be patched to other values).
	DR-DOS SHARE 2.05 (1998-01-05) has relaxed version checking now, and
	  will install on any DOS revision 0..127 (formerly it was bound to
	  DOS revision 0 only), as long as run on a DR-DOS 72h or 73h BDOS
	  kernel.  Hence, if there will be changes in the SHARE implementation
	  without changing the BDOS version, DR-DOS SHARE 2.05 can still be
	  stopped from installing by changing the DOS revision in PCM_HEADER
	  to something in the range 128..255.
	Under Novell DOS 7+, the version SETVERing also affects the version
	  number WORD stored at offset +40h in each program's PSP (see
	  Table xxxx at INT 21/AH=26h). This holds true even for special
	  sub-versions of 100..255 (see INT 21/AX=4452h).
	S/DOS 1.0 (1995) returns a DOS revision of 9, while its own PTS OEM
	  revision still defaults to 0 (see also INT 21/AH=20h"S/DOS").
BUG:	DR DOS 5.0 and 6.0 return CF set/AX=0001h for INT 21/AH=33h
	  subfunctions other than 00h-02h and 05h, while MS-DOS returns AL=FFh
	  for invalid subfunctions
SeeAlso: AH=30h,INT 2F/AX=122Fh,INT 2F/AX=E000h"SETDRVER"

Top
213307 - INT 21 - Windows95 - SET/CLEAR DOS_FLAG
INT 21 - Windows95 - SET/CLEAR DOS_FLAG
	AX = 3307h
	DL = subfunction
	    00h clear bit 5 of "DOS_FLAG"
	    01h set bit 5 of "DOS_FLAG"
Return: ???

Top
2134 - INT 21 - DOS 2+ - GET ADDRESS OF INDOS FLAG
INT 21 - DOS 2+ - GET ADDRESS OF INDOS FLAG
	AH = 34h
Return: ES:BX -> one-byte InDOS flag
Notes:	this function executes on the DOS stack, and thus cannot be called
	  while another DOS function is already executing; you should use
	  this function once at the beginning of the program and store the
	  returned pointer rather than calling it when requiring DOS access
	the value of InDOS is incremented whenever an INT 21 function begins
	  and decremented whenever one completes
	during an INT 28 call, it is safe to call some INT 21 functions even
	  though InDOS may be 01h instead of zero
	InDOS alone is not sufficient for determining when it is safe to
	  enter DOS, as the critical error handling decrements InDOS and
	  increments the critical error flag for the duration of the critical
	  error.  Thus, it is possible for InDOS to be zero even if DOS is
	  busy.
	SMARTDRV 4.0 sets the InDOS flag while flushing its buffers to disk,
	  then zeros it on completion
	the critical error flag is the byte immediately following InDOS in
	  DOS 2.x, and the byte BEFORE the InDOS flag in DOS 3.0+ and
	  DR DOS 3.41+ (except COMPAQ DOS 3.0, where the critical error flag
	  is located 1AAh bytes BEFORE the critical section flag)
	for DOS 3.1+, an undocumented call exists to get the address of the
	  critical error flag (see AX=5D06h)
	this function was undocumented prior to the release of DOS 5.0.
SeeAlso: AX=5D06h,AX=5D0Bh,INT 15/AX=DE1Fh,INT 28

Top
2135 - INT 21 - DOS 2+ - GET INTERRUPT VECTOR
INT 21 - DOS 2+ - GET INTERRUPT VECTOR
	AH = 35h
	AL = interrupt number
Return: ES:BX -> current interrupt handler
Note:	under DR DOS 5.0+, this function does not use any of the DOS-internal
	  stacks and may thus be called at any time
SeeAlso: AH=25h,AX=2503h

Top
2136 - INT 21 - DOS 2+ - GET FREE DISK SPACE
INT 21 - DOS 2+ - GET FREE DISK SPACE
	AH = 36h
	DL = drive number (00h = default, 01h = A:, etc)
Return: AX = FFFFh if invalid drive
	else
	    AX = sectors per cluster
	    BX = number of free clusters
	    CX = bytes per sector
	    DX = total clusters on drive
Notes:	free space on drive in bytes is AX * BX * CX
	total space on drive in bytes is AX * CX * DX
	"lost clusters" are considered to be in use
	according to Dave Williams' MS-DOS reference, the value in DX is
	  incorrect for non-default drives after ASSIGN is run
	this function does not return proper results on CD-ROMs;
	  use AX=4402h"CD-ROM" instead
	(FAT32 drive) the reported total and free space are limited to 2G-32K
	  should they exceed that value
SeeAlso: AH=1Bh,AH=1Ch,AX=4402h"CD-ROM",AX=7303h

Top
213700 - INT 21 - DOS 2+ - "SWITCHAR" - GET SWITCH CHARACTER
INT 21 - DOS 2+ - "SWITCHAR" - GET SWITCH CHARACTER
	AX = 3700h
Return: AL = status
	    00h successful
		DL = current switch character
	    FFh unsupported subfunction
Desc:	Determine the character which is used to introduce command switches.
	  This setting is ignored by MS-DOS commands in version 4.0 and higher,
	  but is honored by many third-party programs and by Novell DOS 7
	  external commands
BUG:	Novell DOS 7's COMMAND.COM (prior to Update 15) fails to honor the
	  SwitChar setting for internal commands even though COMMAND.COM
	  honors it in its own command tail (i.e. COMMAND /?); even in Update
	  15, internal commands fail to honor SwitChar for the /? help option
Notes:	documented in some OEM versions of some releases of DOS
	supported by OS/2 compatibility box
	always returns AL=00h/DL=2Fh for MS-DOS 5+ and DR DOS 3.41-6.0
	Novell DOS 7 COMMAND.COM indicates switch characters other than '/'
	  by changing the first backslash (and only the first one) in the
	  path it prints for PROMPT $p with a forward slash
SeeAlso: AX=3701h

Top
213701 - INT 21 - DOS 2+ - "SWITCHAR" - SET SWITCH CHARACTER
INT 21 - DOS 2+ - "SWITCHAR" - SET SWITCH CHARACTER
	AX = 3701h
	DL = new switch character
Return: AL = status
	    00h successful
	    FFh unsupported subfunction
Notes:	documented in some OEM versions of some releases of DOS; DOS 2.x had
	  a SWITCHAR=c setting in CONFIG.SYS
	supported by OS/2 compatibility box and Novell DOS 7
	ignored by MS-DOS 5+ and DR DOS 3.41-6.0; DR DOS 6.0 and Novell DOS 7
	  leave AX unchanged
SeeAlso: AX=3700h

Top
2137 - INT 21 - DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
INT 21 - DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
	AH = 37h
	AL = subfunction
	    02h get availdev flag
		Return: DL = 00h \DEV\ must precede character device names
			   = nonzero \DEV\ is optional
	    03h set availdev flag
		DL = new state
		    00h		\DEV\ is mandatory
		    nonzero	\DEV\ is optional
Return: AL = status
	    00h successful
	    FFh unsupported subfunction
Notes:	all versions of DOS from 2.00 allow \DEV\ to be prepended to device
	  names without generating an error even if the directory \DEV does
	  not actually exist (other paths generate an error if they do not
	  exist); DOS 2.x has an AVAILDEV= option in CONFIG.SYS to make \DEV
	  mandatory
	although MS-DOS 3.3+, DR DOS 3.41+, and Novell DOS 7 accept these
	  calls, they have no effect, and AL=02h always returns DL=FFh (except
	  for Novell DOS 7, which leaves AX unchanged for both subfunctions)

Top
2138 - INT 21 - DOS 2+ - GET COUNTRY-SPECIFIC INFORMATION
INT 21 - DOS 2+ - GET COUNTRY-SPECIFIC INFORMATION
	AH = 38h
--DOS 2.x--
	AL = 00h get current-country info
	DS:DX -> buffer for returned info (see #01398,#01399)
Return: CF set on error
	    AX = error code (02h)
	CF clear if successful
	    AX = country code (MS-DOS 2.11 only)
	    buffer at DS:DX filled
--DOS 3.0+--
	AL = 00h for current country
	AL = 01h thru 0FEh for specific country with code <255 (see #01400)
	AL = 0FFh for specific country with code >= 255
	   BX = 16-bit country code (see #01400)
	DS:DX -> buffer for returned info (see #01399)
Return: CF set on error
	    AX = error code (02h)
	CF clear if successful
	    AX = country code (Novell NWDOS v7.0)
	    BX = country code
	    DS:DX buffer filled
Note:	this function is not supported by the Borland DPMI host, but no error
	  is returned; as a workaround, one should allocate a buffer in
	  conventional memory with INT 31/AX=0100h and simulate an INT 21 with
	  INT 31/AX=0300h
SeeAlso: AH=65h,INT 10/AX=5001h,INT 2F/AX=1404h

Format of DOS 2.00-2.10 country info:
Offset	Size	Description	(Table 01398)
 00h	WORD	date format  0 = USA	mm dd yy
			     1 = Europe dd mm yy
			     2 = Japan	yy mm dd
 02h	BYTE	currency symbol
 03h	BYTE	00h
 04h	BYTE	thousands separator char
 05h	BYTE	00h
 06h	BYTE	decimal separator char
 07h	BYTE	00h
 08h 24 BYTEs	reserved

Format of DOS 2.11+ country info:
Offset	Size	Description	(Table 01399)
 00h	WORD	date format (see #01398)
 02h  5 BYTEs	ASCIZ currency symbol string
 07h  2 BYTEs	ASCIZ thousands separator
 09h  2 BYTEs	ASCIZ decimal separator
 0Bh  2 BYTEs	ASCIZ date separator
 0Dh  2 BYTEs	ASCIZ time separator
 0Fh	BYTE	currency format
		bit 2 = set if currency symbol replaces decimal point
		bit 1 = number of spaces between value and currency symbol
		bit 0 = 0 if currency symbol precedes value
			1 if currency symbol follows value
 10h	BYTE	number of digits after decimal in currency
 11h	BYTE	time format
		bit 0 = 0 if 12-hour clock
			1 if 24-hour clock
 12h	DWORD	address of case map routine
		(FAR CALL, AL = character to map to upper case [>= 80h])
 16h  2 BYTEs	ASCIZ data-list separator
 18h 10 BYTEs	reserved

(Table 01400)
Values for country code:
 001h (1)	United States
 002h (2)	Canadian-French
 003h (3)	Latin America
 004h (4)	Canada (English)
 007h (7)	Russia
 014h (20)	Egypt
 01Bh (27)	South Africa
 01Eh (30)	Greece
 01Fh (31)	Netherlands
 020h (32)	Belgium
 021h (33)	France
 022h (34)	Spain
 023h (35)	Bulgaria???
 024h (36)	Hungary (not supported by DR DOS 5.0)
 026h (38)	Yugoslavia (not supported by DR DOS 5.0) -- obsolete
 027h (39)	Italy / San Marino / Vatican City
 028h (40)	Romania
 029h (41)	Switzerland / Liechtenstein
 02Ah (42)	Czechoslovakia / Tjekia / Slovakia (not supported by DR DOS 5.0)
 02Bh (43)	Austria (DR DOS 5.0)
 02Ch (44)	United Kingdom
 02Dh (45)	Denmark
 02Eh (46)	Sweden
 02Fh (47)	Norway
 030h (48)	Poland (not supported by DR DOS 5.0)
 031h (49)	Germany
 033h (51)	Peru
 034h (52)	Mexico
 035h (53)	Cuba
 036h (54)	Argentina
 037h (55)	Brazil (not supported by DR DOS 5.0)
 038h (56)	Chile
 039h (57)	Columbia
 03Ah (58)	Venezuela
 03Ch (60)	Malaysia
 03Dh (61)	International English / Australia
 03Eh (62)	Indonesia / East Timor
 03Fh (63)	Philippines
 040h (64)	New Zealand
 041h (65)	Singapore
 042h (66)	Thailand (or Taiwan???)
 051h (81)	Japan (DR DOS 5.0, MS-DOS 5.0+)
 052h (82)	South Korea (DR DOS 5.0)
 054h (84)	Vietnam
 056h (86)	China (MS-DOS 5.0+)
 058h (88)	Taiwan (MS-DOS 5.0+)
 05Ah (90)	Turkey (MS-DOS 5.0+)
 05Bh (91)	India
 05Ch (92)	Pakistan
 05Dh (93)	Afghanistan
 05Eh (94)	Sri Lanka
 062h (98)	Iran
 063h (99)	Asia (English)
 066h (102)	??? (Hebrew MS-DOS 5.0)
 070h (112)	Belarus
 0C8h (200)	Thailand (PC DOS 6.1+)
		(reported as 01h due to a bug in PC DOS COUNTRY.SYS)
 0D4h (212)	Morocco
 0D5h (213)	Algeria
 0D8h (216)	Tunisia
 0DAh (218)	Libya
 0DCh (220)	Gambia
 0DDh (221)	Senegal
 0DEh (222)	Maruitania
 0DFh (223)	Mali
 0E0h (224)	African Guinea
 0E1h (225)	Ivory Coast
 0E2h (226)	Burkina Faso
 0E3h (227)	Niger
 0E4h (228)	Togo
 0E5h (229)	Benin
 0E6h (230)	Mauritius
 0E7h (231)	Liberia
 0E8h (232)	Sierra Leone
 0E9h (233)	Ghana
 0EAh (234)	Nigeria
 0EBh (235)	Chad
 0ECh (236)	Centra African Republic
 0EDh (237)	Cameroon
 0EEh (238)	Cape Verde Islands
 0EFh (239)	Sao Tome and Principe
 0F0h (240)	Equatorial Guinea
 0F1h (241)	Gabon
 0F2h (242)	Congo
 0F3h (243)	Zaire
 0F4h (244)	Angola
 0F5h (245)	Guinea-Bissau
 0F6h (246)	Diego Garcia
 0F7h (247)	Ascension Isle
 0F8h (248)	Seychelles
 0F9h (249)	Sudan
 0FAh (250)	Rwhanda
 0FBh (251)	Ethiopia
 0FCh (252)	Somalia
 0FDh (253)	Djibouti
 0FEh (254)	Kenya
 0FFh (255)	Tanzania
 100h (256)	Uganda
 101h (257)	Burundi
 103h (259)	Mozambique
 104h (260)	Zambia
 105h (261)	Madagascar
 106h (262)	Reunion Island
 107h (263)	Zimbabwe
 108h (264)	Namibia
 109h (265)	Malawi
 10Ah (266)	Lesotho
 10Bh (267)	Botswana
 10Ch (268)	Swaziland
 10Dh (269)	Comoros
 10Eh (270)	Mayotte
 122h (290)	St. Helena
 129h (297)	Aruba
 12Ah (298)	Faroe Islands
 12Bh (299)	Greenland
 15Eh (350)	Gibraltar
 15Fh (351)	Portugal
 160h (352)	Luxembourg
 161h (353)	Ireland
 162h (354)	Iceland
 163h (355)	Albania
 164h (356)	Malta
 165h (357)	Cyprus
 166h (358)	Finland
 167h (359)	Bulgaria
 172h (370)	Lithuania (reported as 372 due to a bug in MS-DOS COUNTRY.SYS)
 173h (371)	Latvia (reported as 372 due to a bug in MS-DOS COUNTRY.SYS)
 174h (372)	Estonia
 175h (373)	Moldova
 177h (375)	??? (MS-DOS 7.10 / Windows98)
 17Ch (380)	Ukraine
 17Dh (381)	Serbia / Montenegro
 180h (384)	Croatia
 181h (385)	Croatia (PC DOS 7+)
 182h (386)	Slovenia
 183h (387)	Bosnia-Herzegovina (Latin)
 184h (388)	Bosnia-Herzegovina (Cyrillic) (PC DOS 7+)
		(reported as 381 due to a bug in PC DOS COUNTRY.SYS)
 185h (389)	FYR Macedonia
 1A5h (421)	Czech Republic / Tjekia (PC DOS 7+)
 1A6h (422)	Slovakia
		(reported as 421 due to a bug in COUNTRY.SYS)
 1F4h (500)	Falkland Islands
 1F5h (501)	Belize
 1F6h (502)	Guatemala
 1F7h (503)	El Salvador
 1F8h (504)	Honduras
 1F9h (505)	Nicraragua
 1FAh (506)	Costa Rica
 1FBh (507)	Panama
 1FCh (508)	St. Pierre and Miquelon
 1FDh (509)	Haiti
 24Eh (590)	Guadeloupe
 24Fh (591)	Bolivia
 250h (592)	Guyana
 251h (593)	Ecuador
 252h (594)	rench Guiana
 253h (595)	Paraguay
 254h (596)	Martinique / French Antilles
 255h (597)	Suriname
 256h (598)	Uruguay
 257h (599)	Netherland Antilles
 29Ah (666)	Russia??? (PTS-DOS 6.51 KEYB)
 29Bh (667)	Poland??? (PTS-DOS 6.51 KEYB)
 29Ch (668)	Poland??? (Slavic???) (PTS-DOS 6.51 KEYB)
 29Eh (670)	Saipan / N. Mariana Island
 29Fh (671)	Guam
 2A0h (672)	Norfolk Island (Australia) / Christmas Island/Cocos Islands / Antartica
 2A1h (673)	Brunei Darussalam
 2A2h (674)	Nauru
 2A3h (675)	Papua New Guinea
 2A4h (676)	Tonga Islands
 2A5h (677)	Solomon Islands
 2A6h (678)	Vanuatu
 2A7h (679)	Fiji
 2A8h (680)	Palau
 2A9h (681)	Wallis & Futuna
 2AAh (682)	Cook Islands
 2ABh (683)	Niue
 2ACh (684)	American Samoa
 2ADh (685)	Western Samoa
 2AEh (686)	Kiribati
 2AFh (687)	New Caledonia
 2B0h (688)	Tuvalu
 2B1h (689)	French Polynesia
 2B2h (690)	Tokealu
 2B3h (691)	Micronesia
 2B4h (692)	Marshall Islands
 2C7h (711)	??? (currency = EA$, code pages 437,737,850,852,855,857)
 311h (785)	Arabic (Middle East/Saudi Arabia/etc.)
 324h (804)	Ukraine
 329h (809)	Antigua and Barbuda / Anguilla / Bahamas / Barbados / Bermuda
		British Virgin Islands / Cayman Islands / Dominica
		Dominican Republic / Grenada / Jamaica / Montserra
		St. Kitts and Nevis / St. Lucia / St. Vincent and Grenadines
		Trinidad and Tobago / Turks and Caicos
 352h (850)	North Korea
 354h (852)	Hong Kong
 355h (853)	Macao
 357h (855)	Cambodia
 358h (856)	Laos
 370h (880)	Bangladesh
 376h (886)	Taiwan (MS-DOS 6.22+)
 3C0h (960)	Maldives
 3C1h (961)	Lebanon
 3C2h (962)	Jordan
 3C3h (963)	Syria / Syrian Arab Republic
 3C4h (964)	Iraq
 3C5h (965)	Kuwait
 3C6h (966)	Saudi Arabia
 3C7h (967)	Yemen
 3C8h (968)	Oman
 3C9h (969)	Yemen??? (Arabic MS-DOS 5.0)
 3CBh (971)	United Arab Emirates
 3CCh (972)	Israel (Hebrew) (DR DOS 5.0,MS-DOS 5.0+)
 3CDh (973)	Bahrain
 3CEh (974)	Qatar
 3CFh (975)	Bhutan
 3D0h (976)	Mongolia
 3D1h (977)	Nepal
 3E3h (995)	Myanmar (Burma)
      (10xxx)	reserved for ISO 28601/ISO 8601 or derivative national stds
      (11xxx)	reserved for Euro currency support
      (12xxx)	reserved for ISO 28601 + Euro currency
      (1xxxx)	not yet defined
      (20xxx)	reserved for ISO 28601/ISO 8601 or derivative national stds
      (21xxx)	reserved for Euro currency support
      (22xxx)	reserved for ISO 28601 + Euro currency
      (2xxxx)	not yet defined
      (30xxx)	reserved for user-definable country codes
      (31xxx)	reserved for OEM-defined country codes
      (32000+)	reserved for future expansion
Note:	not all country codes are supported by all versions of DOS

Top
2138--DXFFFF - INT 21 - DOS 3.0+ - SET COUNTRY CODE
INT 21 - DOS 3.0+ - SET COUNTRY CODE
	AH = 38h
	DX = FFFFh
	AL = 01h thru FEh for specific country with code <255
	AL = FFh for specific country with code >= 255
	   BX = 16-bit country code (see #01400)
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
Note:	not supported by OS/2
SeeAlso: INT 2F/AX=1403h

Top
2139 - INT 21 - DOS 2+ - "MKDIR" - CREATE SUBDIRECTORY
INT 21 - DOS 2+ - "MKDIR" - CREATE SUBDIRECTORY
	AH = 39h
	DS:DX -> ASCIZ pathname
Return: CF clear if successful
	    AX destroyed
	CF set on error
	    AX = error code (03h,05h) (see #01680 at AH=59h/BX=0000h)
Notes:	all directories in the given path except the last must exist
	fails if the parent directory is the root and is full
	DOS 2.x-3.3 allow the creation of a directory sufficiently deep that
	  it is not possible to make that directory the current directory
	  because the path would exceed 64 characters
	under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
SeeAlso: AH=3Ah,AH=3Bh,AH=6Dh,AX=7139h,AH=E2h/SF=0Ah,AX=43FFh/BP=5053h
SeeAlso: INT 2F/AX=1103h,INT 60/DI=0511h

Top
213A - INT 21 - DOS 2+ - "RMDIR" - REMOVE SUBDIRECTORY
INT 21 - DOS 2+ - "RMDIR" - REMOVE SUBDIRECTORY
	AH = 3Ah
	DS:DX -> ASCIZ pathname of directory to be removed
Return: CF clear if successful
	    AX destroyed
	CF set on error
	    AX = error code (03h,05h,06h,10h) (see #01680 at AH=59h/BX=0000h)
Notes:	directory must be empty (contain only '.' and '..' entries)
	under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
SeeAlso: AH=39h,AH=3Bh,AX=713Ah,AH=E2h/SF=0Bh,INT 2F/AX=1101h,INT 60/DI=0512h

Top
213B - INT 21 - DOS 2+ - "CHDIR" - SET CURRENT DIRECTORY
INT 21 - DOS 2+ - "CHDIR" - SET CURRENT DIRECTORY
	AH = 3Bh
	DS:DX -> ASCIZ pathname to become current directory (max 64 bytes)
Return: CF clear if successful
	    AX destroyed
	CF set on error
	    AX = error code (03h) (see #01680 at AH=59h/BX=0000h)
Notes:	if new directory name includes a drive letter, the default drive is
	  not changed, only the current directory on that drive
	changing the current directory also changes the directory in which
	  FCB file calls operate
	under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
SeeAlso: AH=47h,AX=713Bh,INT 2F/AX=1105h

Top
213C - INT 21 - DOS 2+ - "CREAT" - CREATE OR TRUNCATE FILE
INT 21 - DOS 2+ - "CREAT" - CREATE OR TRUNCATE FILE
	AH = 3Ch
	CX = file attributes (see #01401)
	DS:DX -> ASCIZ filename
Return: CF clear if successful
	    AX = file handle
	CF set on error
	    AX = error code (03h,04h,05h) (see #01680 at AH=59h/BX=0000h)
Notes:	if a file with the given name exists, it is truncated to zero length
	under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
	DR DOS checks the system password or explicitly supplied password at
	  the end of the filename against the reserved field in the directory
	  entry before allowing access
SeeAlso: AH=16h,AH=3Dh,AH=5Ah,AH=5Bh,AH=93h,INT 2F/AX=1117h

Bitfields for file attributes:
Bit(s)	Description	(Table 01401)
 0	read-only
 1	hidden
 2	system
 3	volume label (ignored)
 4	reserved, must be zero (directory)
 5	archive bit
 7	if set, file is shareable under Novell NetWare

Top
213D - INT 21 - DOS 2+ - "OPEN" - OPEN EXISTING FILE
INT 21 - DOS 2+ - "OPEN" - OPEN EXISTING FILE
	AH = 3Dh
	AL = access and sharing modes (see #01402)
	DS:DX -> ASCIZ filename
	CL = attribute mask of files to look for (server call only)
Return: CF clear if successful
	    AX = file handle
	CF set on error
	    AX = error code (01h,02h,03h,04h,05h,0Ch,56h) (see #01680 at AH=59h)
Notes:	file pointer is set to start of file
	if SHARE or a network is loaded, the file open may fail if the file
	  is already open, depending on the combination of sharing modes
	  (see #01403,#01404)
	file handles which are inherited from a parent also inherit sharing
	  and access restrictions
	files may be opened even if given the hidden or system attributes
	under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
	DR DOS checks the system password or explicitly supplied password at
	  the end of the filename (following a semicolon) against the reserved
	  field in the directory entry before allowing access
	sharing modes are only effective on local drives if SHARE is loaded
BUG:	Novell DOS 7 SHARE v1.00 would refuse file access in the cases in
	  #01403 marked with [1] (read-only open of a read-only file
	  which had previously been opened in compatibility mode); this was
	  fixed in SHARE v1.01 of 09/29/94
SeeAlso: AH=0Fh,AH=3Ch,AX=4301h,AX=5D00h,INT 2F/AX=1116h,INT 2F/AX=1226h

Bitfields for access and sharing modes:
Bit(s)	Description	(Table 01402)
 2-0	access mode
	000 read only
	001 write only
	010 read/write
	011 (DOS 5+ internal) passed to redirector on EXEC to allow
		case-sensitive filenames
 3	reserved (0)
 6-4	sharing mode (DOS 3.0+) (see #01403)
	000 compatibility mode
	001 "DENYALL" prohibit both read and write access by others
	010 "DENYWRITE" prohibit write access by others
	011 "DENYREAD" prohibit read access by others
	100 "DENYNONE" allow full access by others
	111 network FCB (only available during server call)
 7	inheritance
	if set, file is private to current process and will not be inherited
	  by child processes
SeeAlso: #01782,#01403

(Table 01403)
Values of DOS 2-6.22 file sharing behavior:
	  |	Second and subsequent Opens
 First	  |Compat  Deny	  Deny	 Deny	Deny
 Open	  |	   All	  Write	 Read	None
	  |R W RW R W RW R W RW R W RW R W RW
 - - - - -| - - - - - - - - - - - - - - - - -
 Compat R |Y Y Y  N N N	 1 N N	N N N  1 N N
	W |Y Y Y  N N N	 N N N	N N N  N N N
	RW|Y Y Y  N N N	 N N N	N N N  N N N
 - - - - -|
 Deny	R |C C C  N N N	 N N N	N N N  N N N
 All	W |C C C  N N N	 N N N	N N N  N N N
	RW|C C C  N N N	 N N N	N N N  N N N
 - - - - -|
 Deny	R |2 C C  N N N	 Y N N	N N N  Y N N
 Write	W |C C C  N N N	 N N N	Y N N  Y N N
	RW|C C C  N N N	 N N N	N N N  Y N N
 - - - - -|
 Deny	R |C C C  N N N	 N Y N	N N N  N Y N
 Read	W |C C C  N N N	 N N N	N Y N  N Y N
	RW|C C C  N N N	 N N N	N N N  N Y N
 - - - - -|
 Deny	R |2 C C  N N N	 Y Y Y	N N N  Y Y Y
 None	W |C C C  N N N	 N N N	Y Y Y  Y Y Y
	RW|C C C  N N N	 N N N	N N N  Y Y Y
Legend: Y = open succeeds, N = open fails with error code 05h
	C = open fails, INT 24 generated
	1 = open succeeds if file read-only, else fails with error code
	2 = open succeeds if file read-only, else fails with INT 24
SeeAlso: #01636,#01404

(Table 01404)
Values for DOS 7.x file sharing behavior:
	  |	Second and subsequent Opens
 First	  |Compat    Deny      Deny	 Deny	   Deny
 Open	  |	     All       Write	 Read	   None
	  |R W RW A  R W RW A  R W RW A	 R W RW A  R W RW A
 - - - - -| - - - - - - - - - - - - - - - - - - - - - - - -
 Compat R |Y Y Y Y   N N N N   Y N N Y	 N N N Y   Y N N Y
	W |Y Y Y C   N N N N   N N N N	 N N N Y   Y N N Y
	RW|Y Y Y C   N N N N   N N N N	 N N N Y   Y N N Y
	NA|Y C C Y   N N N N   Y N N Y	 N N N Y   Y N N Y
 - - - - -|
 Deny	R |C C C C   N N N N   N N N N	 N N N N   N N N N
 All	W |C C C C   N N N N   N N N N	 N N N N   N N N N
	RW|C C C C   N N N N   N N N N	 N N N N   N N N N
	NA|C C C C   N N N N   N N N N	 N N N N   N N N N
 - - - - -|
 Deny	R |Y C C Y   N N N N   Y N N Y	 N N N Y   Y N N Y
 Write	W |C C C C   N N N N   N N N N	 Y N N Y   Y N N Y
	RW|C C C C   N N N N   N N N N	 N N N Y   Y N N Y
	NA|Y C C Y   N N N N   Y N N Y	 N N N Y   Y N N Y
 - - - - -|
 Deny	R |C C C C   N N N N   N Y N N	 N N N N   N Y N N
 Read	W |C C C C   N N N N   N N N N	 N Y N N   N Y N N
	RW|C C C C   N N N N   N N N N	 N N N N   N Y N N
	NA|Y Y Y Y   N N N N   Y Y Y Y	 N N N Y   Y Y Y Y
 - - - - -|
 Deny	R |Y Y Y Y   N N N N   Y Y Y Y	 N N N Y   Y Y Y Y
 None	W |C C C C   N N N N   N N N N	 Y Y Y Y   Y Y Y Y
	RW|C C C C   N N N N   N N N N	 N N N Y   Y Y Y Y
	NA|Y Y Y Y   N N N N   Y Y Y Y	 N N N Y   Y Y Y Y
Legend: R -> reading, W -> writing, RW -> both reading & writing,
	A/NA -> reading without access time update
	Y = open succeeds, N = open fails with error code 05h
	C = open fails, INT 24 generated
SeeAlso: #01403,#01636

Top
213E - INT 21 - DOS 2+ - "CLOSE" - CLOSE FILE
INT 21 - DOS 2+ - "CLOSE" - CLOSE FILE
	AH = 3Eh
	BX = file handle
Return: CF clear if successful
	    AX destroyed
	CF set on error
	    AX = error code (06h) (see #01680 at AH=59h/BX=0000h)
Notes:	if the file was written to, any pending disk writes are performed, the
	  time and date stamps are set to the current time, and the directory
	  entry is updated
	recent versions of DOS preserve AH because some versions of Multiplan
	  had a bug which depended on AH being preserved
SeeAlso: AH=10h,AH=3Ch,AH=3Dh,INT 2F/AX=1106h,INT 2F/AX=1227h

Top
213F - INT 21 - DOS 2+ - "READ" - READ FROM FILE OR DEVICE
INT 21 - DOS 2+ - "READ" - READ FROM FILE OR DEVICE
	AH = 3Fh
	BX = file handle
	CX = number of bytes to read
	DS:DX -> buffer for data
Return: CF clear if successful
	    AX = number of bytes actually read (0 if at EOF before call)
	CF set on error
	    AX = error code (05h,06h) (see #01680 at AH=59h/BX=0000h)
Notes:	data is read beginning at current file position, and the file position
	  is updated after a successful read
	the returned AX may be smaller than the request in CX if a partial
	  read occurred
	if reading from CON, read stops at first CR
	under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
BUG:	Novell NETX.EXE v3.26 and 3.31 do not set CF if the read fails due to
	  a record lock (see AH=5Ch), though it does return AX=0005h; this
	  has been documented by Novell
SeeAlso: AH=27h,AH=40h,AH=93h,INT 2F/AX=1108h,INT 2F/AX=1229h

Top
2140 - INT 21 - DOS 2+ - "WRITE" - WRITE TO FILE OR DEVICE
INT 21 - DOS 2+ - "WRITE" - WRITE TO FILE OR DEVICE
	AH = 40h
	BX = file handle
	CX = number of bytes to write
	DS:DX -> data to write
Return: CF clear if successful
	    AX = number of bytes actually written
	CF set on error
	    AX = error code (05h,06h) (see #01680 at AH=59h/BX=0000h)
Notes:	if CX is zero, no data is written, and the file is truncated or
	  extended to the current position
	data is written beginning at the current file position, and the file
	  position is updated after a successful write
	for FAT32 drives, the file must have been opened with AX=6C00h with
	  the "extended size" flag in order to expand the file beyond 2GB;
	  otherwise the write will fail with error code 0005h (access denied)
	the usual cause for AX < CX on return is a full disk
BUG:	a write of zero bytes will appear to succeed when it actually failed
	  if the write is extending the file and there is not enough disk
	  space for the expanded file (DOS 5.0-6.0); one should therefore check
	  whether the file was in fact extended by seeking to 0 bytes from
	  the end of the file (INT 21/AX=4202h/CX=0000h/DX=0000h)
	under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
SeeAlso: AH=28h,AH=3Fh"DOS",AH=93h,INT 2F/AX=1109h

Top
2141 - INT 21 - DOS 2+ - "UNLINK" - DELETE FILE
INT 21 - DOS 2+ - "UNLINK" - DELETE FILE
	AH = 41h
	DS:DX -> ASCIZ filename (no wildcards, but see notes)
	CL = attribute mask for deletion (server call only, see notes)
Return: CF clear if successful
	    AX destroyed (DOS 3.3) AL seems to be drive of deleted file
	CF set on error
	    AX = error code (02h,03h,05h) (see #01680 at AH=59h/BX=0000h)
Notes:	(DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
	  the filespec must be canonical (as returned by AH=60h), and only
	  files matching the attribute mask in CL are deleted
	DR DOS 5.0-6.0 returns error code 03h if invoked via AX=5D00h; DR DOS
	  3.41 crashes if called via AX=5D00h with wildcards
	DOS does not erase the file's data; it merely becomes inaccessible
	  because the FAT chain for the file is cleared
	deleting a file which is currently open may lead to filesystem
	  corruption.  Unless SHARE is loaded, DOS does not close the handles
	  referencing the deleted file, thus allowing writes to a nonexistant
	  file.
	under DR DOS and DR Multiuser DOS, this function will fail if the file
	  is currently open
	under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
BUG:	DR DOS 3.41 crashes if called via AX=5D00h
SeeAlso: AH=13h,AX=4301h,AX=4380h,AX=5D00h,AH=60h,AX=7141h,AX=F244h
SeeAlso: INT 2F/AX=1113h

Top
2142 - INT 21 - DOS 2+ - "LSEEK" - SET CURRENT FILE POSITION
INT 21 - DOS 2+ - "LSEEK" - SET CURRENT FILE POSITION
	AH = 42h
	AL = origin of move
	    00h start of file
	    01h current file position
	    02h end of file
	BX = file handle
	CX:DX = (signed) offset from origin of new file position
Return: CF clear if successful
	    DX:AX = new file position in bytes from start of file
	CF set on error
	    AX = error code (01h,06h) (see #01680 at AH=59h/BX=0000h)
Notes:	for origins 01h and 02h, the pointer may be positioned before the
	  start of the file; no error is returned in that case (except under
	  Windows NT), but subsequent attempts at I/O will produce errors
	if the new position is beyond the current end of file, the file will
	  be extended by the next write (see AH=40h); for FAT32 drives, the
	  file must have been opened with AX=6C00h with the "extended size"
	  flag in order to expand the file beyond 2GB
BUG:	using this method to grow a file from zero bytes to a very large size
	  can corrupt the FAT in some versions of DOS; the file should first
	  be grown from zero to one byte and then to the desired large size
SeeAlso: AH=24h,INT 2F/AX=1228h

Top
214300 - INT 21 - DOS 2+ - GET FILE ATTRIBUTES
INT 21 - DOS 2+ - GET FILE ATTRIBUTES
	AX = 4300h
	DS:DX -> ASCIZ filename
Return: CF clear if successful
	    CX = file attributes (see #01420)
	    AX = CX (DR DOS 5.0)
	CF set on error
	    AX = error code (01h,02h,03h,05h) (see #01680 at AH=59h)
Notes:	under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
	under DR DOS 3.41 and 5.0, attempts to change the subdirectory bit are
	  simply ignored without an error
BUG:	Windows for Workgroups returns error code 05h (access denied) instead
	  of error code 02h (file not found) when attempting to get the
	  attributes of a nonexistent file.  This causes open() with O_CREAT
	  and fopen() with the "w" mode to fail in Borland C++.
SeeAlso: AX=4301h,AX=4310h,AX=7143h,AH=B6h,INT 2F/AX=110Fh,INT 60/DI=0517h

Top
214301 - INT 21 - DOS 2+ - "CHMOD" - SET FILE ATTRIBUTES
INT 21 - DOS 2+ - "CHMOD" - SET FILE ATTRIBUTES
	AX = 4301h
	CX = new file attributes (see #01420)
	DS:DX -> ASCIZ filename
Return: CF clear if successful
	    AX destroyed
	CF set on error
	    AX = error code (01h,02h,03h,05h) (see #01680 at AH=59h)
Notes:	will not change volume label or directory attribute bits, but will
	  change the other attribute bits of a directory (the directory
	  bit must be cleared to successfully change the other attributes of a
	  directory, but the directory will not be changed to a normal file as
	  a result)
	MS-DOS 4.01 reportedly closes the file if it is currently open
	for security reasons, the Novell NetWare execute-only bit can never
	  be cleared; the file must be deleted and recreated
	under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
	DOS 5.0 SHARE will close the file if it is currently open in sharing-
	  compatibility mode, otherwise a sharing violation critical error is
	  generated if the file is currently open
	DR DOS 3.41/5.0 will silently ignore attempts to change the 'directory'
	  attribute bit
SeeAlso: AX=4300h,AX=4311h,AX=7143h,INT 2F/AX=110Eh

Bitfields for file attributes:
Bit(s)	Description	(Table 01420)
 7	shareable (Novell NetWare)
 7	pending deleted files (Novell DOS, OpenDOS)
 6	unused
 5	archive
 4	directory
 3	volume label
	execute-only (Novell NetWare)
 2	system
 1	hidden
 0	read-only

Top
214302 - INT 21 - MS-DOS 7 - GET COMPRESSED FILE SIZE
INT 21 - MS-DOS 7 - GET COMPRESSED FILE SIZE
	AX = 4302h
	DS:DX -> ASCIZ pathname for file or directory
Return: CF clear if successful
	    ??? = compressed size of file/directory in bytes
	CF set on error
	    AX = error code
Note:	on volumes which do not support compression, the returned size is the
	  actual file size rounded up to the next cluster boundary
SeeAlso: AH=71h,AH=72h

Top
2143FFBP5053 - INT 21 - MS-DOS 7.20 (Win98) - EXTENDED-LENGTH FILENAME OPERATIONS
INT 21 - MS-DOS 7.20 (Win98) - EXTENDED-LENGTH FILENAME OPERATIONS
	AX = 43FFh
	BP = 5053h ('PS')
	CL = function
	    39h "mkdir" create directory
		DS:DX -> ASCIZ pathname
	    56h rename file
		DS:DX -> ASCIZ filename of existing file (no wildcards)
		ES:DI -> ASCIZ new filename (no wildcards)
Return: CF clear if successful
	    AX destroyed
	CF set on error
	    AX = error code (03h,05h) (see #01680 at AH=59h/BX=0000h)
Note:	these functions are equivalent to INT 21/AH=39h and INT 21/AH=56h,
	  but with a maximum path length of 128 characters instead of 67;
	  unlike INT 21/AX=71xxh, these functions are available under bare
	  DOS and not just in a Windows DOS box
SeeAlso: AH=39h,AH=56h,AX=7139h,AX=7156h

Top
214400 - INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
	AX = 4400h
	BX = handle
Return: CF clear if successful
	    DX = device information word (see #01423)
	    AX destroyed
	CF set on error
	    AX = error code (01h,05h,06h) (see #01680 at AH=59h/BX=0000h)
Notes:	value in DH corresponds to high byte of device driver's attribute word
	  if handle refers to a character device
	Novell NetWare reportedly does not return a drive number in bits 5-0
	  for a disk file
	this function was not supported by Digital Research's DOS Plus
SeeAlso: AX=4401h,INT 2F/AX=122Bh

Bitfields for device information word:
Bit(s)	Description	(Table 01423)
 character device
  14	device driver can process IOCTL requests (see AX=4402h"DOS 2+")
  13	output until busy supported
  11	driver supports OPEN/CLOSE calls
   8	??? (set by MS-DOS 6.2x KEYB)
   7	set (indicates device)
   6	EOF on input
   5	raw (binary) mode
   4	device is special (uses INT 29)
   3	clock device
   2	NUL device
   1	standard output
   0	standard input
 disk file
  15	file is remote (DOS 3.0+)
  14	don't set file date/time on closing (DOS 3.0+)
  11	media not removable
   8	(DOS 4 only) generate INT 24 if no disk space on write or read past
	  end of file
   7	clear (indicates file)
   6	file has not been written
  5-0	drive number (0 = A:)
SeeAlso: INT 29

Top
214401 - INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
	AX = 4401h
	BX = handle (must refer to character device)
	DX = device information word (see #01423)
	    (DH must be zero for DOS version prior to 6.x)
Return: CF clear if successful
	CF set on error
	    AX = error code (01h,05h,06h,0Dh) (see #01680 at AH=59h/BX=0000h)
Note:	this function was not supported by Digital Research's DOS Plus
SeeAlso: AX=4400h,INT 2F/AX=122Bh

Top
214402 - INT 21 - DOS 2+ - IOCTL - READ FROM CHARACTER DEVICE CONTROL CHANNEL
INT 21 - DOS 2+ - IOCTL - READ FROM CHARACTER DEVICE CONTROL CHANNEL
	AX = 4402h
	BX = file handle referencing character device
	CX = number of bytes to read
	DS:DX -> buffer
Return: CF clear if successful
	    AX = number of bytes actually read
	CF set on error
	    AX = error code (01h,05h,06h,0Dh) (see #01680 at AH=59h/BX=0000h)
Notes:	format of data is driver-specific
	  (also see separate entries below for some specific cases)
	this function was not supported by Digital Research's DOS Plus
SeeAlso: AX=4400h,AX=4403h"DOS",AX=4404h"DOS",INT 2F/AX=122Bh

Top
214402 - INT 21 U - MS-DOS 7.0+ - CONFIG$ device - GET CONFIGURATION INFORMATION
INT 21 U - MS-DOS 7.0+ - CONFIG$ device - GET CONFIGURATION INFORMATION
	AX = 4402h
	BX = file handle for character device "CONFIG$"
	CX = number of bytes to read (at least 5)
	DS:DX -> buffer for ??? data (see #01444)
Return: CF clear if successful
	    AX = number of bytes actually read
	CF set on error
	    AX = error code (01h,05h,06h,0Dh) (see #01680 at AH=59h/BX=0000h)
SeeAlso: AX=4403h"CONFIG$"

Format of MS-DOS 7.0 CONFIG$ ??? data:
Offset	Size	Description	(Table 01444)
 00h	WORD	??? (0000h)
 02h	WORD	??? (0000h or value read from IO.SYS segment 70h)
 04h	BYTE	??? (value read from IO.SYS segment 70h)

Top
214403 - INT 21 - DOS 2+ - IOCTL - WRITE TO CHARACTER DEVICE CONTROL CHANNEL
INT 21 - DOS 2+ - IOCTL - WRITE TO CHARACTER DEVICE CONTROL CHANNEL
	AX = 4403h
	BX = file handle referencing character device
	CX = number of bytes to write
	DS:DX -> data to write
Return: CF clear if successful
	    AX = number of bytes actually written
	CF set on error
	    AX = error code (01h,05h,06h,0Dh) (see #01680 at AH=59h/BX=0000h)
Notes:	format of data is driver-specific
	  (also see separate entries below for some specific cases)
	if the file handle refers to "4DOSSTAK", the 4DOS (v2.x-3.03)
	  KEYSTACK.SYS driver will push the specified characters on the
	  keyboard stack; similarly for "NDOSSTAK", the NDOS KEYSTACK.SYS
	  driver will push the characters onto the keyboard stack
	this function was not supported by Digital Research's DOS Plus
SeeAlso: AX=4400h,AX=4402h"DOS 2+",AX=4405h"DOS",INT 2F/AX=122Bh
SeeAlso: INT 2F/AX=D44Dh,INT 2F/AX=D44Fh

Top
214403 - INT 21 U - MS-DOS 7.0+ - CONFIG$ device - SET??? CONFIGURATION INFORMATION
INT 21 U - MS-DOS 7.0+ - CONFIG$ device - SET??? CONFIGURATION INFORMATION
	AX = 4403h
	BX = file handle for character device "CONFIG$"
	CX = number of bytes to write
	DS:DX -> buffer containing ???
Return: CF clear if successful
	    AX = number of bytes actually written
	CF set on error
	    AX = error code (01h,05h,06h,0Dh) (see #01680 at AH=59h/BX=0000h)
Note:	IOCTL Output to CONFIG$ is only available while IO.SYS is booting
	  the system; once CONFIG.SYS has been processed, this call always
	  succeeds, ignoring any input
SeeAlso: AX=4403h"CONFIG$"

Top
214404 - INT 21 - DOS 2+ - IOCTL - READ FROM BLOCK DEVICE CONTROL CHANNEL
INT 21 - DOS 2+ - IOCTL - READ FROM BLOCK DEVICE CONTROL CHANNEL
	AX = 4404h
	BL = drive number (00h = default, 01h = A:, etc.)
	CX = number of bytes to read
	DS:DX -> buffer
Return: CF clear if successful
	    AX = number of bytes actually read
	CF set on error
	    AX = error code (01h,05h,06h,0Dh) (see #01680 at AH=59h/BX=0000h)
Notes:	format of data is driver-specific
	this function was not supported by Digital Research's DOS Plus
SeeAlso: AX=4402h"DOS 2+",AX=4405h"DOS",INT 2F/AX=122Bh

Top
214405 - INT 21 - DOS 2+ - IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL
INT 21 - DOS 2+ - IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL
	AX = 4405h
	BL = drive number (00h = default, 01h = A:, etc)
	CX = number of bytes to write
	DS:DX -> data to write
Return: CF clear if successful
	    AX = number of bytes actually written
	CF set on error
	    AX = error code (01h,05h,06h,0Dh) (see #01680 at AH=59h/BX=0000h)
Notes:	format of data is driver-specific
	this function was not supported by Digital Research's DOS Plus
SeeAlso: AX=4403h"DOS",AX=4404h"DOS",INT 2F/AX=122Bh

Top
214406 - INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
	AX = 4406h
	BX = file handle
Return: CF clear if successful
	    AL = input status
		00h not ready (device) or at EOF (file)
		FFh ready
	    AH may be destroyed (refer to note)
	CF set on error
	    AX = error code (01h,05h,06h,0Dh) (see #01680 at AH=59h/BX=0000h)
Notes:	files may not register as being at EOF if positioned there by AH=42h
	under DOS 5.0, on a successful return, AH contains either the next
	  character which will be read or 1Ah if at EOF; under a Windows95
	  DOS box, AH seems to be either unchanged or 00h
	this function was not supported by Digital Research's DOS Plus
BUG:	the CLOCK$ device under DR DOS 3.41 always indicates 'Ready'; this was
	  corrected in v5.0
SeeAlso: AX=4407h,INT 2F/AX=122Bh

Top
214407 - INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
	AX = 4407h
	BX = file handle
Return: CF clear if successful
	    AL = input status
		00h not ready
		FFh ready
	CF set on error
	    AX = error code (01h,05h,06h,0Dh) (see #01680 at AH=59h/BX=0000h)
Notes:	for DOS 2+, files are always ready for output, even if the disk is
	  full or no media is in the drive
	this function was not supported by Digital Research's DOS Plus
SeeAlso: AX=4406h,INT 2F/AX=122Bh

Top
214408 - INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
	AX = 4408h
	BL = drive number (00h = default, 01h = A:, etc)
Return: CF clear if successful
	    AX = media type (0000h removable, 0001h fixed)
	CF set on error
	    AX = error code (01h,0Fh) (see #01680 at AH=59h/BX=0000h)
Notes:	in addition to the normal operation, if Stacker is installed, this
	  call also sets the volume number at offset 58h in the Stacker
	  device driver (except under DR DOS 3.41-5.0, which do not pass
	  through this call to the driver; use AX=440Eh instead)
	  (see AX=4404h"Stacker",AX=440Eh,INT 25/AX=CDCDh)
	this function was not supported by Digital Research's DOS Plus
SeeAlso: AX=4400h,AX=4404h"Stacker",AX=4409h,INT 2F/AX=122Bh

Top
214409 - INT 21 - DOS 3.1+ - IOCTL - CHECK IF BLOCK DEVICE REMOTE
INT 21 - DOS 3.1+ - IOCTL - CHECK IF BLOCK DEVICE REMOTE
	AX = 4409h
	BL = drive number (00h = default, 01h = A:, etc)
Return: CF clear if successful
	    DX = device attribute word
		bit 15: drive is SUBSTituted
		bit 13: (DR DOS 3.41/5.0 local drives only) always set
			media ID needed
		bit 12: drive is remote
		bit  9: direct I/O not allowed
	CF set on error
	    AX = error code (01h,0Fh,15h) (see #01680 at AH=59h/BX=0000h)
Notes:	on local drives, DX bits not listed above are the attribute word from
	  the device driver header (see #01646 at AH=52h); for remote drives,
	  the other bits appear to be undefined for MS-DOS versions prior to
	  5.0 (they are all cleared in DOS 5+)
	checking whether DX=0800h on return appears to be a fairly reliable
	  method for detecting Microsoft's RAMDRIVE, though not for other
	  ramdisks (there appears to be no simple yet foolproof method for
	  detecting ramdisks, although the presence of only a single copy of
	  the FAT and only a single head on non-removable devices is a fairly
	  good indicator); for Windows95, RAMDRIVE returns DX=4800h
	for non-existent remote drives, this function sometimes returns
	  AX=0015h (drive not ready) instead of AX=000Fh (invalid drive) on
	  the first call; a subsequent call will return the correct error
	  code
	this function was not supported by Digital Research's DOS Plus
SeeAlso: AX=4400h,AX=4408h,AX=440Ah,INT 2F/AX=122Bh

Top
21440A - INT 21 - DOS 3.1+ - IOCTL - CHECK IF HANDLE IS REMOTE
INT 21 - DOS 3.1+ - IOCTL - CHECK IF HANDLE IS REMOTE
	AX = 440Ah
	BX = handle
Return: CF clear if successful
	    DX = attribute word (as stored in SFT)
		bit 15: set if remote
		bit 14: date/time not set on close
	CF set on error
	    AX = error code (01h,06h) (see #01680 at AH=59h/BX=0000h)
Notes:	if file is remote, Novell Advanced NetWare 2.0 returns the number of
	  the file server on which the handle is located in CX
	DR DOS 3.41 and 5.0 clear all bits of DX except bit 15; Novell DOS 7
	  fully supports this function
	this function was not supported by Digital Research's DOS Plus
SeeAlso: AX=4400h,AX=4409h,AH=52h,INT 2F/AX=122Bh

Top
21440B - INT 21 - DOS 3.1+ - IOCTL - SET SHARING RETRY COUNT
INT 21 - DOS 3.1+ - IOCTL - SET SHARING RETRY COUNT
	AX = 440Bh
	CX = pause between retries (default 1)
	DX = number of retries (default 3)
Return: CF clear if successful
	CF set on error
	    AX = error code (01h) (see #01680 at AH=59h/BX=0000h)
Notes:	delay is dependent on processor speed (value in CX specifies number of
	  64K-iteration empty loops to execute)
	if DX=0000h on entry, the retry count is left unchanged
	this function was not supported by Digital Research's DOS Plus
SeeAlso: AH=52h,INT 2F/AX=1224h,INT 2F/AX=122Bh

Top
21440C - INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
	AX = 440Ch
	BX = device handle
	CH = category code (see #01545)
	CL = function number (see #01546)
	DS:DX -> parameter block (see #01547,#01548,#01549,#01550,#01551,#01552)
	SI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
	DI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    DS:DX -> iteration count if CL=65h
	    SI = returned value (European MS-DOS 4.0, OS/2 comp box)
	    DI = returned value (European MS-DOS 4.0, OS/2 comp box)
Note:	DR DOS 3.41 and 5.0 return error code 16h on CL=45h,65h if the device
	  does not support a retry counter
SeeAlso: AX=440Dh"DOS 3.2+",INT 2F/AX=0802h,INT 2F/AX=122Bh,INT 2F/AX=14FFh
SeeAlso: INT 2F/AX=1A01h

(Table 01545)
Values for IOCTL category code:
 00h	unknown (DOS 3.3+)
 01h	COMn: (DOS 3.3+)
 02h	reserved for terminal control
 03h	CON (DOS 3.3+)
 04h	reserved for keyboard control
 05h	LPTn:
 07h	mouse control (European MS-DOS 4.0)
 08h	reserved for disk control -- same as for block devices
	(see INT 21/AX=440Dh)
 9Eh	Media Access Control driver (STARLITE)
 00h-7Fh reserved for Microsoft
 80h-FFh reserved for OEM/user-defined
SeeAlso: #01558

(Table 01546)
Values for generic character IOCTL function:
 00h	MAC driver Bind (STARLITE) (see #01547)
 40h	DOS 3??? only: was reserved for set screen mode (see #04116)
 45h	set iteration (retry) count (see #01548)
 4Ah	select code page (see #01549)
 4Ch	start code-page preparation (see #01550)
 4Dh	end code-page preparation (see #01551)
 5Fh	set display information (DOS 4.0+) (see #01552)
 60h	DOS 3??? only: was reserved for get screen mode (see #04116)
 65h	get iteration (retry) count
 6Ah	query selected code page (see #01549)
 6Bh	query codepage prepare list (DOS 4.0+) (see #01553)
 7Fh	get display information (DOS 4.0+) (see #01552)
Note:	bit assignments for function code:
	    bit 7: set to ignore if unsupported, clear to return error
	    bit 6: set if passed to driver, clear if intercepted by DOS
	    bit 5: set if queries data from device, clear if sends command
		(by convention, if a function both queries and sends data,
		  bit 5 should be clear)
	    bits 4-0: subfunction

Format of parameter block for function 00h:
Offset	Size	Description	(Table 01547)
 00h  8 BYTEs	ASCIZ signature "STARMAC"
 08h	WORD	version
 0Ah	WORD	flags
		bit 0: media requires connect or listen request before use
		bit 1: network is a LAN (broadcast/multicast supported)
		bit 2: point-to-point network
 0Ch	WORD	handle for use with MAC driver's private interface (filled in
		by MAC driver)
 0Eh	WORD	context
 10h	WORD	approximate speed in KB/sec (filled in by MAC driver)
 12h	WORD	approximate cost in cents per hour (filled in by MAC driver)
 14h	WORD	maximum packet size in bytes (filled in by MAC driver)
 16h	WORD	addressing format (filled in by MAC driver)
		0000h general addressing
		0001h Ethernet addressing
		0002h Token Ring addressing
		0003h Token Bus addressing
 18h	DWORD	Send entry point (filled in by MAC driver)
 1Ch	DWORD	RegisterEventHandler entry point (filled in by MAC driver)
 20h	DWORD	SetPacketFilter entry point (filled in by MAC driver)
 24h	DWORD	UnBind entry point (filled in by MAC driver)

Format of parameter block for DOS 3??? screen mode functions 40h and 60h:
Offset	Size	Description	(Table 04116)
 00h	WORD	length of folowing data (0009h)
 02h	BYTE	mode type
 03h	WORD	number of colors
 05h	WORD	width
 07h	WORD	height
Note:	these functions appear never to have been released to the public
SeeAlso: #01546

Format of parameter block for function 45h:
Offset	Size	Description	(Table 01548)
 00h	WORD	number of times output is attempted before driver assumes
		  device is busy

Format of parameter block for functions 4Ah and 6Ah:
Offset	Size	Description	(Table 01549)
 00h	WORD	length of data
 02h	WORD	code page ID (see #01757 at INT 21/AX=6602h)
 04h 2N BYTEs	DCBS (double byte character set) lead byte range
		  start/end for each of N ranges (DOS 4.0)
	WORD	0000h  end of data (DOS 4.0)

Format of parameter block for function 4Ch:
Offset	Size	Description	(Table 01550)
 00h	WORD	flags
		DISPLAY.SYS = 0000h
		PRINTER.SYS bit 0 clear to prepare downloaded font, set to
			prepare cartridge selection
 02h	WORD	length of remainder of parameter block
 04h	WORD	number of code pages following
 06h  N WORDs	code page 1,...,N

Format of parameter block for function 4Dh:
Offset	Size	Description	(Table 01551)
 00h	WORD	length of data
 02h	WORD	code page ID (see #01757 at INT 21/AX=6602h)

Format of parameter block for functions 5Fh and 7Fh:
Offset	Size	Description	(Table 01552)
 00h	BYTE	level (0 for DOS 4.x-6.0)
 01h	BYTE	reserved (0)
 02h	WORD	length of following data (14)
 04h	WORD	control flags
		bit 0 set for blink, clear for intensity
		bits 1-15 reserved
 06h	BYTE	mode type (1=text, 2=graphics)
 07h	BYTE	reserved (0)
 08h	WORD	colors
		0000h = monochrome
		else N bits per pixel
 0Ah	WORD	pixel columns
 0Ch	WORD	pixel rows
 0Eh	WORD	character columns
 10h	WORD	character rows

Format of parameter block for function 6Bh:
Offset	Size	Description	(Table 01553)
 00h	WORD	length of following data
 02h	WORD	number of hardware code pages
 04h  N WORDs	hardware code pages 1,...,N
	WORD	number of prepared code pages
      N WORDs	prepared code pages 1,...,N

Top
21440D - INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
	AX = 440Dh
	BL = drive number (00h=default,01h=A:,etc)
	CH = category code (see #01558)
	CL = minor code (function) (see #01559)
	DS:DX -> (DOS) parameter block (see #01560,#01562,#01563,#01564,#01565)
	SI:DI -> (OS/2 comp box) parameter block (see #01566,#01568,#01569,#01572)
Return: CF set on error
	    AX = error code (01h,02h,etc.) (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    DS:DX -> data block if CL=60h or CL=61h
Notes:	DOS 4.01 seems to ignore the high byte of the number of directory
	  entries in the BPB for diskettes.
	functions 46h and 66h undocumented in DOS 4.x, documented for DOS 5+
	the DUBLDISK.SYS v2.6 driver only supports minor codes 60h and 67h
	DR DOS 3.41-6.0 only support minor codes 40h-42h and 60h-62h; all
	  other minor codes return error code 16h
	some PCMCIA calls reportedly appear to be dangerous for MS-DOS versions
	  prior to 5.0
	minor code 60h normally produces no I/O except with AutoMount=1 for
	  DBLSPACE/DRVSPACE
SeeAlso: AX=440Ch,AX=440Dh/CX=084Ah,AX=440Dh/CX=0871h,AH=69h,INT 2F/AX=0802h
SeeAlso: INT 2F/AX=122Bh

(Table 01558)
Values for block device IOCTL category code:
 08h	disk drive
 48h	FAT32 disk drive
 00h-7Fh reserved for Microsoft
 80h-FFh reserved for OEM/user-defined

(Table 01559)
Values for generic block IOCTL minor code:
 00h	(OS/2)	\ used to lock/unlock a drive
 01h	(OS/2)	/
 40h	set device parameters (see #01560)
 41h	write logical device track (see #01562)
 42h	format and verify logical device track (see #01563)
 46h	(DOS 4.0+) set volume serial number (see #01565,AH=69h)
 47h	(DOS 4.0+) set access flag (see #01566)
 48h	(Enh. Disk Drive Spec) set media lock state (see #01567,INT 13/AH=45h)
 49h	(Enh. Disk Drive Spec) eject media in drive (see INT 13/AH=49h)
	no parameter block required
 4Ah	(MS-DOS 7.0) lock logical volume (see AX=440Dh/CX=084Ah)
 4Bh	(MS-DOS 7.0) lock physical volume (see AX=440Dh/CX=084Bh)
 50h	(PCMCIA) attribute memory write
 51h	(PCMCIA) common memory write
 52h	(PCMCIA) force media change (DOS 5+ ???) (see #01568)
 53h	(PCMCIA) erase drive
 54h	(PCMCIA) erase media
 56h	(PCMCIA) set erase status callback
 57h	(PCMCIA) append Card Information Structure (CIS) tuple
 58h	(PCMCIA) erase CIS tuples
 60h	get device parameters (see #01560)
 61h	read logical device track (see #01562)
 62h	verify logical device track (see #01564)
 66h	(DOS 4.0+) get volume serial number (see #01565,AH=69h)
 67h	(DOS 4.0+) get access flag (see #01566)
 68h	(DOS 5.0+) sense media type (see #01569)
 6Ah	(MS-DOS 7.0) unlock logical volume (see AX=440Dh/CX=086Ah)
	no parameter block required
 6Bh	(MS-DOS 7.0) unlock physical volume (see AX=440Dh/CX=086Bh)
	no parameter block required
 6Ch	(MS-DOS 7.0) get lock flag (see AX=440Dh/CX=086Ch)
	no parameter block required
 6Dh	(MS-DOS 7.0) enumerate open files (see AX=440Dh/CX=086Dh)
 6Eh	(MS-DOS 7.0) find swap file (see AX=440Dh/CX=086Eh)
 6Fh	(MS-DOS 7.0) get drive map information (see #01570)
 70h	(PCMCIA) attribute memory read
 70h	(MS-DOS 7.0) get current lock state (see AX=440Dh/CX=0870h)
	no parameter block required
 71h	(MS-DOS 7.0) get first cluster (see AX=440Dh/CX=0871h)
 73h	(PCMCIA) get memory media information (DOS 5+ ???) (see #01572)
 76h	(PCMCIA) get erase status callback
 77h	(PCMCIA) get first Card Information Structure (CIS) tuple
 78h	(PCMCIA) get next CIS tuple
 7Fh	(PCMCIA) get ??? information (see #01573,#01574)

Format of parameter block for functions 40h, 60h:
Offset	Size	Description	(Table 01560)
 00h	BYTE	special functions
		bit 0 set if function to use current BPB, clear if Device
			  BIOS Parameter Block field contains new default BPB
		bit 1 set if function to use track layout fields only
			must be clear if CL=60h
		bit 2 set if all sectors in track same size (should be set)
		bits 3-7 reserved (MS-DOS, Novell DOS 7)
		bit 5: skip head settling time (WinDOS 2.11)
		bit 6: format access flag (WinDOS 2.11)
 01h	BYTE	device type (see #01561)
 02h	WORD	device attributes
		bit 0 set if nonremovable medium
		bit 1 set if door lock ("changeline") supported
		bits 2-15 reserved
 04h	WORD	number of cylinders
 06h	BYTE	media type
		for 1.2M drive
		    00h 1.2M disk (default)
		    01h 320K/360K disk
		F8h for DUBLDISK.SYS v2.6 expanded drives
		always 00h for other drive types
 07h 31 BYTEs	device BPB (see #01663 at AH=53h), bytes after BPB offset 1Eh
		  omitted; final six bytes only transferred on function 40h
		  with BYTE 00h bit 0 set for MS-DOS 5.0
---function 40h only---
 26h	WORD	number of sectors per track (start of track layout field)
		(maximum 63)
 28h  N word pairs: number,size of each sector in track
---category code 48h (FAT32), function 40h---
 07h 53 BYTEs	extended BPB (see #01664)
 3Ch 32 BYTEs	reserved
 5Ch	WORD	number of track table entries
 5Eh 2N WORDs	sector table (word pairs: number/size of each sector in track)
---category code 48h (FAT32), function 60h---
 07h 53 BYTEs	extended BPB (see #01664)
 3Ch 32 BYTEs	reserved

(Table 01561)
Values for device type:
 00h	320K/360K 5.25-inch floppy disk
 01h	1.2M 5.25-inch floppy disk
 02h	720K floppy disk
 03h	single-density 8-inch disk
 04h	double-density 8-inch disk
 05h	fixed disk
 06h	tape drive
 07h	(DOS 3.3+) other type of block device, normally 1.44M floppy
 08h	read/write optical disk
 09h	(DOS 5+) 2.88M 3.5-inch floppy
 FFh	(some DOS 5 betas) 2.88M 3.5-inch floppy

Format of parameter block for functions 41h, 61h:
Offset	Size	Description	(Table 01562)
 00h	BYTE	special functions (reserved, must be zero)
 01h	WORD	number of disk head
 03h	WORD	number of disk cylinder
 05h	WORD	number of first sector to read/write
 07h	WORD	number of sectors
 09h	DWORD	transfer address
Note:	under Windows95, a volume must be locked (see AX=440Dh/CX=084Bh) in
	  order to perform direct accesses such as track reads and writes
	  with this IOCTL function

Format of parameter block for function 42h:
Offset	Size	Description	(Table 01563)
 00h	BYTE	reserved, must be zero (DOS <3.2)
		  bit 0=0: format/verify track
			1: format status call (DOS 3.2+), don't actually format
		  bit 1: format multiple tracks, require additional WORD
			  (hard disks only)
		  bits 2-7 reserved, must be zero
		value on return (DOS 3.3+):
		  00h	specified tracks, sectors/track supported by BIOS
		  01h	function not supported by BIOS
		  02h	specified tracks, sectors/track not allowed for drive
		  03h	no disk in drive
 01h	WORD	number of disk head
 03h	WORD	number of disk cylinder
---BYTE 00h bit 1 set---
 05h	WORD	number of tracks to format

Format of parameter block for function 62h:
Offset	Size	Description	(Table 01564)
 00h	BYTE	reserved, must be zero (DOS <3.2)
		  bit 0=0: verify single track
			1: verify multiple tracks
		  bits 1-7 reserved, must be zero
		value on return (DOS 3.3+):
		  00h	specified tracks, sectors/track supported by BIOS
		  01h	function not supported by BIOS
		  02h	specified tracks, sectors/track not allowed for drive
		  03h	no disk in drive
 01h	WORD	number of disk head
 03h	WORD	number of disk cylinder
 05h	WORD	number of tracks to verify (equivalent to 255 or fewer sectors)

Format of parameter block for functions 46h, 66h:
Offset	Size	Description	(Table 01565)
 00h	WORD	(call) info level (should be 0000h)
 02h	DWORD	disk serial number (binary)
 06h 11 BYTEs	volume label or "NO NAME    "
 11h  8 BYTEs	filesystem type "FAT12	 " or "FAT16   "
		  (generally CL=66h only, but MS-DOS 5.0 will write the
		  given filesystem type to the disk)
Note:	under MS-DOS 7.0 or a Windows95 DOS box, the volume label field can
	  return as all blanks even when a volume label has been set (the Win95
	  installation seems to blank the volume label field in the partition
	  boot sector; once LABEL has been run, the volume label is reported
	  correctly)
SeeAlso: AH=69h

Format of parameter block for functions 47h, 67h:
Offset	Size	Description	(Table 01566)
 00h	BYTE	special-function field (must be zero)
 01h	BYTE	disk-access flag, nonzero if access allowed by driver

Format of parameter block for function 48h:
Offset	Size	Description	(Table 01567)
 00h	BYTE	(call) locking operation
		00h lock media in drive
		01h unlock media
		02h get locking status
 01h	BYTE	(ret) drive's lock status (number of pending locks on drive)
Note:	also supported by MS-DOS 7.0+

Format of parameter block for function 52h:
 00h	BYTE	(call) unused???	(Table 01568)
		(ret) 00h if flash/ATA drive but no card inserted
			unchanged otherwise
Notes:	the absense of a flash card should be tested by checking the DOS error
	  code rather than the returned byte
	the parameter byte is cleared to 00h erroneously by the Award
	  PCDISK.EXE v1.02c PCMCIA/ATA driver if no ATA card is inserted
	  (bug corrected in PCDISK.EXE v1.02h and later)
	not supported by the SystemSoft ATADRV.EXE and the Phoenix PCMATA.SYS
	  PCMCIA/ATA drivers

Format of parameter block for function 68h:
Offset	Size	Description	(Table 01569)
 00h	BYTE	01h for default media type, 00h for any other media type
		(see also INT 13/AH=20h"Compaq")
 01h	BYTE	02h for 720K, 07h for 1.44M, 09h for 2.88M

Format of parameter block for function 6Fh:
Offset	Size	Description	(Table 01570)
 00h	BYTE	(call) length of this buffer (in bytes)
 01h	BYTE	(ret) number of bytes in parameter block actually used
 02h	BYTE	(ret) drive flags (see #01571)
 03h	BYTE	(ret) physical drive number
		00h-7Fh floppy
		80h-FEh hard
		FFh no physical drive
 04h	DWORD	(ret) bitmap of logical drives associated with physical drive
		bit 0 = drive A:, etc.
 08h	QWORD	(ret) relative block address of partition start

Bitfields for Get Drive Map Information drive flags:
Bit(s)	Description	(Table 01571)
 0	protected-mode driver for logical drive
 1	protected-mode driver in use for physical drive corresponding to the
	  logical drive
 2	drive available only in protected mode
 3	protected-mode drive supports media ejection
 4	drive issues media insertion and removal notifications
SeeAlso: #01570

Format of parameter block for function 73h:
Offset	Size	Description	(Table 01572)
 00h	BYTE	???
		00h ATA card inserted ???
		80h ATA card not inserted ???
 01h	BYTE	length of parameter block ???
		apparently always 40h
 02h	BYTE	???
		00h ATA card not inserted ???
		0Dh ATA card inserted ???
 03h  2 BYTEs	??? (apparently always 00h)
 05h	BYTE	drive number (0=first) ???
 06h	BYTE	total number of drives ???
 07h	BYTE	???
		00h ATA card not inserted ???
		01h ATA card inserted ???
 08h 17 BYTEs	???
 19h	BYTE	???
		00h ATA card not inserted ???
		01h ATA card inserted ???
 1Ah	BYTE	??? (apparently always 01h)
 1Bh	BYTE	???
		00h ATA card not inserted ???
		01h ATA card inserted ???
 1Ch  2 BYTEs	??? (apparently always 0015h)
 1Eh  2 BYTEs	???
 20h  2 BYTEs	??? (apparently always 0110h)
 22h 15 BYTEs	???
 31h  2 BYTEs	??? (apparently always 7000h)
 33h 11 BYTEs	driver signature
		"AWARD PDISK" for Award PCDISK.EXE PCMCIA/ATA driver
		"MS-BIOS    " for HP 200LX generic ATA driver
 3Eh  2 BYTEs	???
Notes:	parameter structure possibly depends on driver
	this function is not supported by the SystemSoft ATADRV.EXE and the
	  Phoenix PCMATA.SYS PCMCIA/ATA drivers

Format of parameter block for function 7Fh for SystemSoft ATADRV.EXE:
Offset	Size	Description	(Table 01573)
 00h	DWORD	-> unknown location within driver
Note:	function supported by the SystemSoft ATADRV.EXE PCMCIA/ATA driver
	  but not by the Award PCDISK.EXE PCMCIA/ATA driver
SeeAlso: #01574

Format of parameter block for function 7Fh for Phoenix PCMATA.SYS:
Offset	Size	Description	(Table 01574)
 00h  8 BYTEs	???
Note:	this function supported by the Phoenix PCMATA.SYS PCMCIA/ATA driver
	  but not by the Award PCDISK.EXE PCMCIA/ATA driver
SeeAlso: #01573

Top
21440DCX084A - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - LOCK LOGICAL VOLUME
INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - LOCK LOGICAL VOLUME
	AX = 440Dh
	CX = 084Ah / 484Ah
	    (category code 08h for FAT12/16, 48h for FAT32; minor code 4Ah)
	BL = drive number (01h=A:,02h=B:,etc)
	BH = lock level (00h-04h)
	DX = drive permissions (see #01575) for Level 1 lock or second
	    Level 0 lock when formatting
Return: CF set on error
	    AX = error code (01h,02h,etc.) (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
Notes:	the logical volume must be locked before direct disk accesses are
	  permitted by Windows95/98
	the commandline LOCK issues a level 4 lock
	Windows98 only permits lock levels 0 and 4
BUG:	Windows98 will return an error (invalid function) if the specified
	  drive number is zero or more than 32, but only allocated 26 bytes
	  for recording locks, so BL=1Bh..20h will trash internal data
	  structures
SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Bh,AX=440Dh/CX=086Ah
SeeAlso: AX=440Dh/CX=086Ch

Bitfields for drive permissions:
Bit(s)	Description	(Table 01575)
 0	allow writes
 1	disallow new file mappings
 2	volume locked for formatting

Top
21440DCX084B - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - LOCK PHYSICAL VOLUME
INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - LOCK PHYSICAL VOLUME
	AX = 440Dh
	CX = 084Bh / 484Bh
	    (category code 08h for FAT12/16, 48h for FAT32; minor code 4Bh)
	BH = logical drive number (00h = default, 01h = A:, etc.)
	BL = lock level (00h-03h)
	DX = drive permissions (see #01575) for Level 1 lock or second
	    Level 0 lock when formatting
Return: CF set on error
	    AX = error code (01h,02h,etc.) (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
Desc:	lock all logical volumes on the same physical volume as the indicated
	  drive
Note:	the physical volume must be locked before direct disk writes via
	  INT 13 are permitted by Windows95
SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Bh
SeeAlso: AX=440Dh/CX=086Ch

Top
21440DCX086A - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - UNLOCK LOGICAL VOLUME
INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - UNLOCK LOGICAL VOLUME
	AX = 440Dh
	CX = 086Ah / 486Ah
	    (category code 08h for FAT12/16, 48h for FAT32; minor code 6Ah)
	BL = drive number (00h=default,01h=A:,etc)
Return: CF set on error
	    AX = error code (01h,02h,etc.) (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
Note:	the logical volume must be locked before direct disk accesses via
	  INT 13 are permitted by Windows95
BUG:	Windows98 will return an error (invalid function) if the specified
	  drive number is zero or more than 32, but only allocated 26 bytes
	  for recording locks, so BL=1Bh..20h will trash internal data
	  structures
SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Bh

Top
21440DCX086B - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - UNLOCK PHYSICAL VOLUME
INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - UNLOCK PHYSICAL VOLUME
	AX = 440Dh
	CX = 086Bh / 486Bh
	    (category code 08h for FAT12/16, 48h for FAT32; minor code 6Bh)
	BH = logical drive number (00h = default, 01h = A:, etc.)
Return: CF set on error
	    AX = error code (01h,02h,etc.) (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
Desc:	lock all logical volumes on the same physical volume as the indicated
	  drive
SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Bh,AX=440Dh/CX=086Ah

Top
21440DCX086C - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - GET LOCK FLAG STATE
INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - GET LOCK FLAG STATE
	AX = 440Dh
	CX = 086Ch / 486Ch
	    (category code 08h for FAT12/16, 48h for FAT32; minor code 6Ch)
	BL = drive number (00h=default,01h=A:,etc)
Return: CF set on error
	    AX = error code (01h,02h,etc.) (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    AX = access flag (see #01576)
SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=084Bh
SeeAlso: AX=440Dh/CX=0870h

(Table 01576)
Values for drive access flag:
 0000h	no writes/file mappings since last call
 0001h	write operation has occurred since last call
 0002h	file mapping has occurred since last call
Note:	function 6Ch resets the access flag every time it is called

Top
21440DCX086D - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - ENUMERATE OPEN FILES
INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - ENUMERATE OPEN FILES
	AX = 440Dh
	CX = 086Dh / 486Dh
	    (category code 08h for FAT12/16, 48h for FAT32; minor code 6Dh)
	BL = drive number (00h=default,01h=A:,etc)
	DS:DX -> buffer for ASCIZ pathname
	SI = file index (0000h to number of open files-1)
	DI = enumeration type (0000h all files, 0001h unmovable files)
Return: CF set on error
	    AX = error code (01h,02h,12h,etc.) (see #01680 at AH=59h/BX=0000h)
		0012h if file index is out of range
	CF clear if successful
	    AX = file open mode (BX from AX=6C00h or AX=716Ch)
	    CX = file type (see #01577)
SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Ch
SeeAlso: AX=440Dh/CX=086Eh,AX=6C00h,AX=716Ch

(Table 01577)
Values for file type:
 0000h	normal file
 0001h	memory-mapped file (unmovable)
 0002h	unmovable file
 0004h	swap file

Top
21440DCX086E - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - FIND SWAP FILE
INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - FIND SWAP FILE
	AX = 440Dh
	CX = 086Eh / 486Eh
	    (category code 08h for FAT12/16, 48h for FAT32; minor code 6Eh)
	BL = drive number (00h=default,01h=A:,etc)
	DS:DX -> buffer for ASCIZ pathname
	SI = file index
	DI = enumeration type
Return: CF set on error
	    AX = error code (01h,02h,etc.) (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    AX = pager type
		0001h no pager
		0002h paging through MS-DOS
		0003h protected-mode pager
	    CX:BX = swap file size in 4K pages
SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Dh

Top
21440DCX0870 - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - GET CURRENT LOCK STATE
INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - GET CURRENT LOCK STATE
	AX = 440Dh
	CX = 0870h / 4870h
	    (category code 08h for FAT12/16, 48h for FAT32; minor code 70h)
	BL = drive number (00h=default,01h=A:,etc)
Return: CF set on error
	    AX = error code (01h,02h,etc.) (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    AX = current lock level (0-3) or FFFFh if not locked
	    CX = lock permissions if AX<>FFFFh (see #01575)
SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Ch

Top
21440DCX0871 - INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - GET FIRST CLUSTER
INT 21 - MS-DOS 7.0+ - GENERIC IOCTL - GET FIRST CLUSTER
	AX = 440Dh
	CX = 0871h / 4871h
	    (category code 08h for FAT12/16, 48h for FAT32; minor code 71h)
	BX = filename character set (see #01578)
	DS:DX -> ASCIZ pathname for file or directory
Return: CF set on error
	    AX = error code (01h,02h,etc.) (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    DX:AX = first cluster number
Note:	this function finds any file or directory regardless of attributes,
	  except that it will not find volume labels
SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Ch,#01352

(Table 01578)
Values for character set:
 00h	Windows ANSI
 01h	current OEM character set
 02h	Unicode

Top
21440E - INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
	AX = 440Eh
	BL = drive number (00h=default,01h=A:,etc)
Return: CF set on error
	    AX = error code (01h,0Fh) (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    AL = 00h block device has only one logical drive assigned
		 1..26 the last letter used to reference the drive (1=A:,etc)
Notes:	DR DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
	  always returns AL=00h; Windows NT 4.0 also always returns AL=00h
	in addition to the normal operation, if Stacker is installed, this
	  call also sets the volume number at offset 58h in the Stacker
	  device driver (DR DOS 3.41-5.0 only; use AX=4408h otherwise)
	  (see AX=4404h"Stacker",INT 25/AX=CDCDh)
SeeAlso: AX=4408h,AX=440Fh,INT 2F/AX=122Bh

Top
21440F - INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
	AX = 440Fh
	BL = physical drive number (00h=default,01h=A:,etc))
Return: CF set on error
	    AX = error code (01h,0Fh) (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    drive now responds to next logical drive number
Notes:	maps logical drives to physical drives, similar to DOS's treatment of
	  a single physical floppy drive as both A: and B:
	DR DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
	  always returns an error on this function
SeeAlso: AX=440Eh,INT 2F/AX=122Bh

Top
214410 - INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (HANDLE)
INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (HANDLE)
	AX = 4410h
	BX = handle for device
	CH = category code (see #01545)
	CL = function code (see #01546)
Return: CF clear if successful
	    AX = 0000h	specified IOCTL function is supported
	CF set on error
	    AL = 01h	IOCTL capability not available
Note:	a program which wishes to use Generic IOCTL calls beyond those in the
	  standard DOS 3.2 set may use this call first to see whether a
	  particular call is supported
SeeAlso: AX=440Ch,AX=440Dh"DOS 3.2+",AX=4411h

Top
214411 - INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (DRIVE)
INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (DRIVE)
	AX = 4411h
	BL = drive number
	CH = category code (see #01558)
	CL = function code (see #01559)
Return: CF clear if successful
	    AX = 0000h	specified IOCTL function is supported
	CF set on error
	    AL = 01h	IOCTL capability not available
Note:	a program which wishes to use Generic IOCTL calls beyond those in the
	  standard DOS 3.2 set may use this call first to see whether a
	  particular call is supported
SeeAlso: AX=440Ch,AX=440Dh"DOS 3.2+",AX=4410h

Top
2145 - INT 21 - DOS 2+ - "DUP" - DUPLICATE FILE HANDLE
INT 21 - DOS 2+ - "DUP" - DUPLICATE FILE HANDLE
	AH = 45h
	BX = file handle
Return: CF clear if successful
	    AX = new handle
	CF set on error
	    AX = error code (04h,06h) (see #01680 at AH=59h/BX=0000h)
Notes:	moving file pointer for either handle will also move it for the other,
	  because both will refer to the same system file table
	for DOS versions prior to 3.3, file writes may be forced to disk by
	  duplicating the file handle and closing the duplicate
SeeAlso: AH=3Dh,AH=46h

Top
2146 - INT 21 - DOS 2+ - "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE
INT 21 - DOS 2+ - "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE
	AH = 46h
	BX = file handle
	CX = file handle to become duplicate of first handle
Return: CF clear if successful
	CF set on error
	    AX = error code (04h,06h) (see #01680 at AH=59h/BX=0000h)
Notes:	closes file with handle CX if it is still open
	DOS 3.30 hangs if BX=CX on entry
	moving file pointer for either handle will also move it for the other,
	  because both will refer to the same system file table
SeeAlso: AH=3Dh,AH=45h

Top
2147 - INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
	AH = 47h
	DL = drive number (00h = default, 01h = A:, etc)
	DS:SI -> 64-byte buffer for ASCIZ pathname
Return: CF clear if successful
	    AX = 0100h (undocumented)
	CF set on error
	    AX = error code (0Fh) (see #01680 at AH=59h/BX=0000h)
Notes:	the returned path does not include a drive or the initial backslash
	many Microsoft products for Windows rely on AX being 0100h on success
	under the FlashTek X-32 DOS extender, the buffer pointer is in DS:ESI
SeeAlso: AH=19h,AH=3Bh,AH=71h,INT 15/AX=DE25h

Top
2148 - INT 21 - DOS 2+ - ALLOCATE MEMORY
INT 21 - DOS 2+ - ALLOCATE MEMORY
	AH = 48h
	BX = number of paragraphs to allocate
Return: CF clear if successful
	    AX = segment of allocated block
	CF set on error
	    AX = error code (07h,08h) (see #01680 at AH=59h/BX=0000h)
	    BX = size of largest available block
Notes:	DOS 2.1-6.0 coalesces free blocks while scanning for a block to
	  allocate
	.COM programs are initially allocated the largest available memory
	  block, and should free some memory with AH=49h before attempting any
	  allocations
	under the FlashTek X-32 DOS extender, EBX contains a protected-mode
	  near pointer to the allocated block on a successful return
SeeAlso: AH=49h,AH=4Ah,AH=58h,AH=83h

Top
2149 - INT 21 - DOS 2+ - FREE MEMORY
INT 21 - DOS 2+ - FREE MEMORY
	AH = 49h
	ES = segment of block to free
Return: CF clear if successful
	CF set on error
	    AX = error code (07h,09h) (see #01680 at AH=59h/BX=0000h)
Notes:	apparently never returns an error 07h, despite official docs; DOS 2.1+
	  code contains only an error 09h exit
	DOS 2.1-6.0 does not coalesce adjacent free blocks when a block is
	  freed, only when a block is allocated or resized
	the code for this function is identical in DOS 2.1-6.0 except for
	  calls to start/end a critical section in DOS 3.0+
SeeAlso: AH=48h,AH=4Ah

Top
214A - INT 21 - DOS 2+ - RESIZE MEMORY BLOCK
INT 21 - DOS 2+ - RESIZE MEMORY BLOCK
	AH = 4Ah
	BX = new size in paragraphs
	ES = segment of block to resize
Return: CF clear if successful
	CF set on error
	    AX = error code (07h,08h,09h) (see #01680 at AH=59h/BX=0000h)
	    BX = maximum paragraphs available for specified memory block
Notes:	under DOS 2.1-6.0, if there is insufficient memory to expand the block
	  as much as requested, the block will be made as large as possible
	DOS 2.1-6.0 coalesces any free blocks immediately following the block
	  to be resized
SeeAlso: AH=48h,AH=49h,AH=83h

Top
214B - INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
	AH = 4Bh
	AL = type of load
	    00h load and execute
	    01h load but do not execute
	    03h load overlay (see #01591)
	    04h load and execute in background (European MS-DOS 4.0 only)
		"Exec & Go" (see also AH=80h)
	DS:DX -> ASCIZ program name (must include extension)
	ES:BX -> parameter block (see #01590,#01591,#01592)
	CX = mode (subfunction 04h only)
		0000h child placed in zombie mode after termination
		0001h child's return code discarded on termination
Return: CF clear if successful
	    BX,DX destroyed
	    if subfunction 01h, process ID set to new program's PSP; get with
		INT 21/AH=62h
	CF set on error
	    AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see #01680 at AH=59h)
Notes:	DOS 2.x destroys all registers, including SS:SP
	under ROM-based DOS, if no disk path characters (colons or slashes)
	  are included in the program name, the name is searched for in the
	  ROM module headers (see #01595) before searching on disk
	for functions 00h and 01h, the calling process must ensure that there
	  is enough unallocated memory available; if necessary, by releasing
	  memory with AH=49h or AH=4Ah
	for function 01h, the AX value to be passed to the child program is put
	  on top of the child's stack
	for function 03h, DOS assumes that the overlay is being loaded into
	  memory allocated by the caller
	function 01h was undocumented prior to the release of DOS 5.0
	some versions (such as DR DOS 6.0) check the parameters and parameter
	  block and return an error if an invalid value (such as an offset of
	  FFFFh) is found
	background programs under European MS-DOS 4.0 must use the new
	  executable format
	this function ignores the filename extension, instead checking the
	  first two bytes of the file to determine whether there is a valid
	  .EXE header (see #01594); if not, the file is assumed to be in .COM
	  format.  If present, the file may be in any of several formats which
	  are extensions of the original .EXE format (see #01593)
	.COM-format executables begin running with the following register
	  values:
		AL = 00h if first FCB has valid drive letter, FFh if not
		AH = 00h if second FCB has valid drive letter, FFh if not
		CS,DS,ES,SS = PSP segment
		SP = offset of last word available in first 64K segment
		(note: AX is always 0000h under DESQview)
	old-format executables begin running with the following register
	  values:
		AL = 00h if first FCB has valid drive letter, FFh if not
		AH = 00h if second FCB has valid drive letter, FFh if not
		DS,ES = PSP segment
		SS:SP as defined in .EXE header
		(note: AX is always 0000h under DESQview)
	new executables begin running with the following register values
		AX = environment segment
		BX = offset of command tail in environment segment
		CX = size of automatic data segment (0000h = 64K)
		ES,BP = 0000h
		DS = automatic data segment
		SS:SP = initial stack
	  the command tail corresponds to an old executable's PSP:0081h and
	  following, except that the 0Dh is turned into a NUL (00h); new
	  format executables have no PSP
	under the FlashTek X-32 DOS extender, only function 00h is supported
	  and the pointers are passed in DS:EDX and ES:EBX
	DR DOS 6 always loads .EXE-format programs with no fixups and
	  .COM-format programs starting with 9Ch 55h (PUSHF/PUSH BP) above the
	  64K mark to avoid the EXEPACK bug, by extending the memory block
	  containing the program's environment; this code is disabled if the
	  name of the parent program as stored in the MCB is 'WIN'.
	DR DOS 3.41 and 5.0 check for a valid filename before testing the
	  subfunction number, so the otherwise invalid subfunction 02h will
	  only return error code 01h if the given filename actually exists;
	  otherwise, errors 02h, 03h, or 05h are returned
BUGS:	DOS 2.00 assumes that DS points at the current program's PSP
	Load Overlay (subfunction 03h) loads up to 512 bytes too many if the
	  file contains additional data after the actual overlay
	Load but Do Not Execute (subfunction 01h) is reported to corrupt the
	  top word of the caller's stack if the loaded module terminates with
	  INT 21/AH=4Ch in some versions of MS-DOS, including v5.00.
SeeAlso: AX=4B05h,AH=4Ch,AH=4Dh,AH=64h/BX=0025h,AH=8Ah,INT 2E,INT 60/DI=0604h

Format of EXEC parameter block for AL=00h,01h,04h:
Offset	Size	Description	(Table 01590)
 00h	WORD	segment of environment to copy for child process (copy caller's
		  environment if 0000h)
 02h	DWORD	pointer to command tail to be copied into child's PSP
 06h	DWORD	pointer to first FCB to be copied into child's PSP
 0Ah	DWORD	pointer to second FCB to be copied into child's PSP
 0Eh	DWORD	(AL=01h) will hold subprogram's initial SS:SP on return
 12h	DWORD	(AL=01h) will hold entry point (CS:IP) on return
SeeAlso: #01591,#01592

Format of EXEC parameter block for AL=03h:
Offset	Size	Description	(Table 01591)
 00h	WORD	segment at which to load overlay
 02h	WORD	relocation factor to apply to overlay if in .EXE format
SeeAlso: #01590,#01592

Format of EXEC parameter block for FlashTek X-32:
Offset	Size	Description	(Table 01592)
 00h	PWORD	48-bit far pointer to environment string
 06h	PWORD	48-bit far pointer to command tail string
SeeAlso: #01590,#01591

(Table 01593)
Values for the executable types understood by various environments:
 MZ	old-style DOS executable (see #01594)
 ZM	used by some very early DOS linkers, and still supported as an
	  alternate to the MZ signature by MS-DOS, PC DOS, PTS-DOS, and S/DOS
 NE	Windows or OS/2 1.x segmented ("new") executable (see #01596)
 LE	Windows virtual device driver (VxD) linear executable (see #01609)
 LX	variant of LE used in OS/2 2.x (see #01609)
 W3	Windows WIN386.EXE file; a collection of LE files
 W4	Windows95 VMM32.VXD file
 PE	Win32 (Windows NT and Win32s) portable executable based on Unix COFF
 DL	HP 100LX/200LX system manager compliant executable (.EXM)
 MP	old PharLap .EXP (see #01619)
 P2	PharLap 286 .EXP (see #01620)
 P3	PharLap 386 .EXP (see #01620)

Format of .EXE file header:
Offset	Size	Description	(Table 01594)
 00h  2 BYTEs	.EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
		  (see also #01593)
 02h	WORD	number of bytes in last 512-byte page of executable
 04h	WORD	total number of 512-byte pages in executable (includes any
		partial last page)
 06h	WORD	number of relocation entries
 08h	WORD	header size in paragraphs
 0Ah	WORD	minimum paragraphs of memory required to allocate in addition
		  to executable's size
 0Ch	WORD	maximum paragraphs to allocate in addition to executable's size
 0Eh	WORD	initial SS relative to start of executable
 10h	WORD	initial SP
 12h	WORD	checksum (one's complement of sum of all words in executable)
 14h	DWORD	initial CS:IP relative to start of executable
 18h	WORD	offset within header of relocation table
		40h or greater for new-format (NE,LE,LX,W3,PE,etc.) executable
 1Ah	WORD	overlay number (normally 0000h = main program)
---new executable---
 1Ch  4 BYTEs	???
 20h	WORD	behavior bits
 22h 26 BYTEs	reserved for additional behavior info
 3Ch	DWORD	offset of new executable (NE,LE,etc) header within disk file,
		or 00000000h if plain MZ executable
---Borland TLINK---
 1Ch  2 BYTEs	??? (apparently always 01h 00h)
 1Eh	BYTE	signature FBh
 1Fh	BYTE	TLINK version (major in high nybble, minor in low nybble)
 20h  2 BYTEs	??? (v2.0 apparently always 72h 6Ah, v3.0+ seems always 6Ah 72h)
---ARJ self-extracting archive---
 1Ch  4 BYTEs	signature "RJSX" (older versions, new signature is "aRJsfX" in
		the first 1000 bytes of the file)
---LZEXE 0.90 compressed executable---
 1Ch  4 BYTEs	signature "LZ09"
---LZEXE 0.91 compressed executable---
 1Ch  4 BYTEs	signature "LZ91"
---PKLITE compressed executable---
 1Ch	BYTE	minor version number
 1Dh	BYTE	bits 0-3: major version
		bit 4: extra compression
		bit 5: huge (multi-segment) file
 1Eh  6 BYTEs	signature "PKLITE" (followed by copyright message)
---LHarc 1.x self-extracting archive---
 1Ch  4 BYTEs	unused???
 20h  3 BYTEs	jump to start of extraction code
 23h  2 BYTEs	???
 25h 12 BYTEs	signature "LHarc's SFX "
---LHA 2.x self-extracting archive---
 1Ch  8 BYTEs	???
 24h 10 BYTEs	signature "LHa's SFX " (v2.10) or "LHA's SFX " (v2.13)
---TopSpeed C 3.0 CRUNCH compressed file---
 1Ch	DWORD	018A0001h
 20h	WORD	1565h
---PKARCK 3.5 self-extracting archive---
 1Ch	DWORD	00020001h
 20h	WORD	0700h
---BSA (Soviet archiver) self-extracting archive---
 1Ch	WORD	000Fh
 1Eh	BYTE	A7h
---LARC self-extracting archive---
 1Ch  4 BYTEs	???
 20h 11 BYTEs	"SFX by LARC "
---LH self-extracting archive---
 1Ch  8 BYTEs	???
 24h  8 BYTEs	"LH's SFX "
---RAR self-extracting archive---
 1Ch  4 BYTEs	signature "RSFX"
---other linkers---
 1Ch	var	optional information
---
  N   N DWORDs	relocation items
		each is the segment:offset from start of load image at which
		  to add the actual load segment to the indicated WORD
Notes:	if the word at offset 02h is 4, it should be treated as 00h, since
	  pre-1.10 versions of the MS linker set it that way
	if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
	  program is loaded as high in memory as possible (DOS only checks
	  the maximum allocation, however)
	the maximum allocation is set to FFFFh by default
	additional data may be contained in the file beyond the end of the
	  load image described by the .EXE header; this data may be overlays,
	  the actual executable for newer-format executables, or debugging
	  information (see #01600,#01624)
	relocations entries need not be in any particular order, although they
	  are typically stored in order from beginning to end of the load
	  image
SeeAlso: #01596

Format of ROM Module Header:
Offset	Size	Description	(Table 01595)
 00h  2 BYTEs	ROM signature 55h, AAh
 02h	BYTE	size of ROM in 512-byte blocks
 03h  3 BYTEs	POST initialization entry point (near JMP instruction)
 06h	ROM Program Name List [array]
	Offset	Size	Description
	 00h	BYTE	length of ROM program's name (00h if end of name list)
	 01h  N BYTEs	program name
	 N+1  3 BYTEs	program entry point (near JMP instruction)

Format of new executable header:
Offset	Size	Description	(Table 01596)
 00h  2 BYTEs	"NE" (4Eh 45h) signature
 02h  2 BYTEs	linker version (major, then minor)
 04h	WORD	offset from start of this header to entry table (see #01603)
 06h	WORD	length of entry table in bytes
 08h	DWORD	file load CRC (0 in Borland's TPW)
 0Ch	BYTE	program flags (see #01597)
 0Dh	BYTE	application flags (see #01598)
 0Eh	WORD	auto data segment index
 10h	WORD	initial local heap size
 12h	WORD	initial stack size (added to data seg, 0000h if SS <> DS)
 14h	DWORD	program entry point (CS:IP), "CS" is index into segment table
 18h	DWORD	initial stack pointer (SS:SP), "SS" is segment index
		if SS=automatic data segment and SP=0000h, the stack pointer is
		  set to the top of the automatic data segment, just below the
		  local heap
 1Ch	WORD	segment count
 1Eh	WORD	module reference count
 20h	WORD	length of nonresident names table in bytes
 22h	WORD	offset from start of this header to segment table (see #01601)
 24h	WORD	offset from start of this header to resource table
 26h	WORD	offset from start of this header to resident names table
 28h	WORD	offset from start of this header to module reference table
 2Ah	WORD	offset from start of this header to imported names table
		(array of counted strings, terminated with a string of length
		  00h)
 2Ch	DWORD	offset from start of file to nonresident names table
 30h	WORD	count of moveable entry point listed in entry table
 32h	WORD	file alignment size shift count
		0 is equivalent to 9 (default 512-byte pages)
 34h	WORD	number of resource table entries
 36h	BYTE	target operating system
		00h unknown
		01h OS/2
		02h Windows
		03h European MS-DOS 4.x
		04h Windows 386
		05h BOSS (Borland Operating System Services)
		81h PharLap 286|DOS-Extender, OS/2
		82h PharLap 286|DOS-Extender, Windows
 37h	BYTE	other EXE flags (see #01599)
 38h	WORD	offset to return thunks or start of gangload area
 3Ah	WORD	offset to segment reference thunks or length of gangload area
 3Ch	WORD	minimum code swap area size
 3Eh  2 BYTEs	expected Windows version (minor version first)
Note:	this header is documented in detail in the Windows 3.1 SDK Programmer's
	  Reference, Vol 4.
SeeAlso: #01594

Bitfields for new executable program flags:
Bit(s)	Description	(Table 01597)
 0-1	DGROUP type
	  0 = none
	  1 = single shared
	  2 = multiple (unshared)
	  3 = (null)
 2	global initialization
 3	protected mode only
 4	8086 instructions
 5	80286 instructions
 6	80386 instructions
 7	80x87 instructions

Bitfields for new executable application flags:
Bit(s)	Description	(Table 01598)
 0-2	application type
	001 full screen (not aware of Windows/P.M. API)
	010 compatible with Windows/P.M. API
	011 uses Windows/P.M. API
 3	is a Family Application (OS/2)
 5	0=executable, 1=errors in image
 6	non-conforming program (valid stack is not maintained)
 7	DLL or driver rather than application
	(SS:SP info invalid, CS:IP points at FAR init routine called with
	  AX=module handle which returns AX=0000h on failure, AX nonzero on
	  successful initialization)

Bitfields for other new .EXE flags:
Bit(s)	Description	(Table 01599)
 0	supports long filenames
 1	2.X protected mode
 2	2.X proportional font
 3	gangload area

Format of Codeview trailer (at end of executable):
Offset	Size	Description	(Table 01600)
 00h	WORD	signature 4E42h ('NB')
 02h	WORD	Microsoft debug info version number
 04h	DWORD	Codeview header offset
SeeAlso: #01624

Format of new executable segment table record:
Offset	Size	Description	(Table 01601)
 00h	WORD	offset in file (shift left by alignment shift to get byte offs)
 02h	WORD	length of image in file (0000h = 64K)
 04h	WORD	segment attributes (see #01602)
 06h	WORD	number of bytes to allocate for segment (0000h = 64K)
Note:	the first segment table entry is entry number 1
SeeAlso: #01604

Bitfields for segment attributes:
Bit(s)	Description	(Table 01602)
 0	data segment rather than code segment
 1	unused???
 2	real mode
 3	iterated
 4	movable
 5	sharable
 6	preloaded rather than demand-loaded
 7	execute-only (code) or read-only (data)
 8	relocations (directly following code for this segment)
 9	debug info present
 10,11	80286 DPL bits
 12	discardable
 13-15	discard priority

Format of new executable entry table item (list):
Offset	Size	Description	(Table 01603)
 00h	BYTE	number of entry points (00h if end of entry table list)
 01h	BYTE	segment number (00h if end of entry table list)
 02h 3N BYTEs	entry records
		Offset	Size	Description
		 00h	BYTE	flags
				bit 0: exported
				bit 1: single data
				bits 2-7: unused???
		 01h	WORD	offset within segment

Format of new executable relocation data (immediately follows segment image):
Offset	Size	Description	(Table 01604)
 00h	WORD	number of relocation items
 02h 8N BYTEs	relocation items
		Offset	Size	Description
		 00h	BYTE	relocation type
				00h LOBYTE
				02h BASE
				03h PTR
				05h OFFS
				0Bh PTR48
				0Dh OFFS32
		 01h	BYTE	flags
				bit 2: additive
		 02h	WORD	offset within segment
		 04h	WORD	target address segment
		 06h	WORD	target address offset
SeeAlso: #01601,#01605

Format of new executable resource data:
Offset	Size	Description	(Table 01605)
 00h	WORD	alignment shift count for resource data
 02h  N RECORDs resources
	Format of resource record:
	Offset	Size	Description
	 00h	WORD	type ID
			0000h if end of resource records
			>= 8000h if integer type
			else offset from start of resource table to type string
	 02h	WORD	number of resources of this type
	 04h	DWORD	reserved for runtime use
	 08h  N Resources (see #01606)
Note:	resource type and name strings are stored immediately following the
	  resource table, and are not null-terminated
SeeAlso: #01606

Format of new executable resource entry:
Offset	Size	Description	(Table 01606)
 00h	WORD	offset in alignment units from start of file to contents of
		the resource data
 02h	WORD	length of resource image in bytes
 04h	WORD	flags
		bit 4: moveable
		bit 5: shareable
		bit 6: preloaded
 06h	WORD	resource ID
		>= 8000h if integer resource
		else offset from start of resource table to resource string
 08h	DWORD	reserved for runtime use
Notes:	resource type and name strings are stored immediately following the
	  resource table, and are not null-terminated
	strings are counted strings, with a string of length 0 indicating the
	  end of the resource table
SeeAlso: #01605,#01607

Format of new executable module reference table [one bundle of entries]:
Offset	Size	Description	(Table 01607)
 00h	BYTE	number of records in this bundle (00h if end of table)
 01h	BYTE	segment indicator
		00h unused
		FFh movable segment, segment number is in entry
		else segment number of fixed segment
 02h  N RECORDs
	Format of segment record
	Offset	Size	Description
	 00h	BYTE	flags
			bit 0: entry is exported
			bit 1: entry uses global (shared) data
			bits 7-3: number of parameter words
	---fixed segment---
	 01h	WORD	offset
	---moveable segment---
	 01h  2 BYTEs	INT 3F instruction (CDh 3Fh)
	 03h	BYTE	segment number
	 05h	WORD	offset
Note:	table entries are numbered starting from 1
SeeAlso: #01608

Format of new executable resident/nonresident name table entry:
Offset	Size	Description	(Table 01608)
 00h	BYTE	length of string (00h if end of table)
 01h  N BYTEs	ASCII text of string
 N+1	WORD	ordinal number (index into entry table)
Notes:	the first string in the resident name table is the module name; the
	  first entry in the nonresident name table is the module description
	the strings are case-sensitive; if the executable was linked with
	  /IGNORECASE, all strings are in uppercase
SeeAlso: #01607

Format of Linear Executable (enhanced mode executable) header:
Offset	Size	Description	(Table 01609)
 00h  2 BYTEs	"LE" (4Ch 45h) signature (Windows)
		"LX" (4Ch 58h) signature (OS/2)
 02h	BYTE	byte order (00h = little-endian, nonzero = big-endian)
 03h	BYTE	word order (00h = little-endian, nonzero = big-endian)
 04h	DWORD	executable format level
 08h	WORD	CPU type (see also INT 15/AH=C9h)
		01h Intel 80286 or upwardly compatible
		02h Intel 80386 or upwardly compatible
		03h Intel 80486 or upwardly compatible
		04h Intel Pentium (80586) or upwardly compatible
		20h Intel i860 (N10) or compatible
		21h Intel "N11" or compatible
		40h MIPS Mark I (R2000, R3000) or compatible
		41h MIPS Mark II (R6000) or compatible
		42h MIPS Mark III (R4000) or compatible
 0Ah	WORD	target operating system
		01h OS/2
		02h Windows
		03h European DOS 4.0
		04h Windows 386
 0Ch	DWORD	module version
 10h	DWORD	module type (see #01610)
 14h	DWORD	number of memory pages
 18h	Initial CS:EIP
	DWORD	object number
	DWORD	offset
 20h	Initial SS:ESP
	DWORD	object number
	DWORD	offset
 28h	DWORD	memory page size
 2Ch	DWORD	(Windows LE) bytes on last page
		(OS/2 LX) page offset shift count
 30h	DWORD	fixup section size
 34h	DWORD	fixup section checksum
 38h	DWORD	loader section size
 3Ch	DWORD	loader section checksum
 40h	DWORD	offset of object table (see #01611)
 44h	DWORD	object table entries
 48h	DWORD	object page map table offset (see #01613)
 4Ch	DWORD	object iterate data map offset
 50h	DWORD	resource table offset
 54h	DWORD	resource table entries
 58h	DWORD	resident names table offset (see #01614)
 5Ch	DWORD	entry table offset (see #01615,#01616)
 60h	DWORD	module directives table offset
 64h	DWORD	Module Directives entries
 68h	DWORD	Fixup page table offset
 6Ch	DWORD	Fixup record table offset (see #01618)
 70h	DWORD	imported modules name table offset
 74h	DWORD	imported modules count
 78h	DWORD	imported procedures name table offset
 7Ch	DWORD	per-page checksum table offset
 80h	DWORD	data pages offset
 84h	DWORD	preload page count
 88h	DWORD	non-resident names table offset
 8Ch	DWORD	non-resident names table length
 90h	DWORD	non-resident names checksum
 94h	DWORD	automatic data object
 98h	DWORD	debug information offset
 9Ch	DWORD	debug information length
 A0h	DWORD	preload instance pages number
 A4h	DWORD	demand instance pages number
 A8h	DWORD	extra heap allocation
 ACh 12 BYTEs	reserved
 B8h	DWORD	offset of VERSIONINFO resource (MS-Windows VxD only)
 BCh	DWORD	pointer to ??? (dynamically-loadable VxDs only???)
 C0h	WORD	device ID (MS-Windows VxD only)
 C2h	WORD	DDK version (MS-Windows VxD only)
Note:	used by EMM386.EXE, QEMM, and Windows 3.0 Enhanced Mode drivers

Bitfields for Linear Executable module type:
Bit(s)	Description	(Table 01610)
 2	initialization (only for DLLs) 0 = global, 1 = per-process
 4	no internal fixups in executable image
 5	no external fixups in executable image
 8-10	API compatibility
	0 = unknown
	1 = incompatible with PM windowing \
	2 = compatible with PM windowing    > (only for
	3 = uses PM windowing API	   /	programs)
 13	module not loadable (only for programs)
 15-17	module type
	000 program
	001 library (DLL)
	011 protected memory library module
	100 physical device driver
	110 virtual device driver
 30	per-process library termination
	(requires valid CS:EIP, can't be set for .EXE)

Format of object table entry:
Offset	Size	Description	(Table 01611)
 00h	DWORD	virtual size in bytes
 04h	DWORD	relocation base address
 08h	DWORD	object flags (see #01612)
 0Ch	DWORD	page map index
 10h	DWORD	page map entries (see #01613)
 14h  4 BYTEs	reserved??? (apparently always zeros)

Bitfields for object flags:
Bit(s)	Description	(Table 01612)
 0	readable
 1	writable
 2	executable
 3	resource
 4	discardable
 5	shared
 6	preloaded
 7	invalid
 8-9	type
	00 normal
	01 zero-filled
	10 resident
	11 resident and contiguous
 10	resident and long-lockable
 11	reserved
 12	16:16 alias required
 13	"BIG" (Huge: 32-bit)
 14	conforming
 15	"OBJECT_I/O_PRIVILEGE_LEVEL"
 16-31	reserved

Format of object page map table entry:
Offset	Size	Description	(Table 01613)
 00h	BYTE	??? (usually 00h)
 01h	WORD	(big-endian) index to fixup table
		0000h if no relocation info
 03h	BYTE	type (00h hard copy in file, 03h some relocation needed)

Format of resident names table entry:
Offset	Size	Description	(Table 01614)
 00h	BYTE	length of name
 01h  N BYTEs	name
 N+1  3 BYTEs	???

Format of LE linear executable entry table:
Offset	Size	Description	(Table 01615)
 00h	BYTE	number of entries in table
 01h 10 BYTEs per entry
		Offset	Size	Description
		 00h	BYTE	bit flags
				bit 0: non-empty bundle
				bit 1: 32-bit entry
		 01h	WORD	object number
		 03h	BYTE	entry type flags
				bit 0: exported
				bit 1: uses single data rather than instance
				bit 2: reserved
				bits 3-7: number of stack parameters
		 04h	DWORD	offset of entry point
		 08h  2 BYTEs	???
Note:	empty bundles (bit flags at 00h = 00h) are used to skip unused indices,
	  and do not contain the remaining nine bytes

Format of LX linear executable entry table [array]:
Offset	Size	Description	(Table 01616)
 00h	BYTE	number of bundles following (00h = end of entry table)
 01h	BYTE	bundle type
		00h empty
		01h 16-bit entry
		02h 286 callgate entry
		03h 32-bit entry
		04h forwarder entry
		bit 7 set if additional parameter typing information is present
---bundle type 00h---
 no additional fields
---bundle type 01h---
 02h	WORD	object number
 04h	BYTE	entry flags
		bit 0: exported
		bits 7-3: number of stack parameters
 05h	WORD	offset of entry point in object (shifted by page size shift)
---bundle type 02h---
 02h	WORD	object number
 04h	BYTE	entry flags
		bit 0: exported
		bits 7-3: number of stack parameters
 05h	WORD	offset of entry point in object
 07h	WORD	reserved for callgate selector (used by loader)
---bundle type 03h---
 02h	WORD	object number
 04h	BYTE	entry flags
		bit 0: exported
		bits 7-3: number of stack parameters
 05h	DWORD	offset of entry point in object
---bundle type 04h---
 02h	WORD	reserved
 04h	BYTE	forwarder flags
		bit 0: import by ordinal
		bits 7-1 reserved
 05h	WORD	module ordinal
		(forwarder's index into Import Module Name table)
 07h	DWORD	procedure name offset or import ordinal number
Note:	all fields after the first two bytes are repeated N times

Bitfields for linear executable fixup type:
Bit(s)	Description	(Table 01617)
 7	ordinal is BYTE rather than WORD
 6	16-rather than 8-object number/module ordinal
 5	addition with DWORD rather than WORD
 4	relocation info has size with new two bytes at end
 3	reserved (0)
 2	set if add to destination, clear to replace destination
 1-0	type
	00 internal fixup
	01 external fixup, imported by ordinal
	10 external fixup, imported by name
	11 internal fixup via entry table

Format of linear executable fixup record:
Offset	Size	Description	(Table 01618)
 00h	BYTE	type
		bits 7-4: modifier (0001 single, 0011 multiple)
		bits 3-0: type
			0000 byte offset
			0010 word segment
			0011 16-bit far pointer (DWORD)
			0101 16-bit offset
			0110 32-bit far pointer (PWORD)
			0111 32-bit offset
			1000 near call or jump, WORD/DWORD based on seg attrib
 01h	BYTE	linear executable fixup type (see #01617)
---if single type---
 02h	WORD	offset within page
 04h	relocation information
	---internal fixup---
	BYTE	object number
	---external,ordinal---
	BYTE	one-based module number in Import Module table
	BYTE/WORD ordinal number
	WORD/DWORD value to add (only present if modifier bit 4 set)
	---external,name---
	BYTE	one-based module number in Import Module table
	WORD	offset in Import Procedure names
	WORD/DWORD value to add (only present if modifier bit 4 set)
---if multiple type---
 02h	BYTE	number of items
 03h	var	relocation info as for "single" type (above)
      N WORDs	offsets of items to relocate

Format of old Phar Lap .EXP file header:
Offset	Size	Description	(Table 01619)
 00h  2 BYTEs	"MP" (4Dh 50h) signature
 02h	WORD	remainder of image size / page size (page size = 512h)
 04h	WORD	size of image in pages
 06h	WORD	number of relocation items
 08h	WORD	header size in paragraphs
 0Ah	WORD	minimum number of extra 4K pages to be allocated at the end
		  of program, when it is loaded
 0Ch	WORD	maximum number of extra 4K pages to be allocated at the end
		  of program, when it is loaded
 0Eh	DWORD	initial ESP
 12h	WORD	word checksum of file
 14h	DWORD	initial EIP
 18h	WORD	offset of first relocation item
 1Ah	WORD	overlay number
 1Ch	WORD	??? (wants to be 1)
SeeAlso: #01620

Format of new Phar Lap .EXP file header:
Offset	Size	Description	(Table 01620)
 00h  2 BYTEs	signature ("P2" for 286 .EXP executable, "P3" for 386 .EXP)
 02h	WORD	level (01h flat-model file, 02h multisegmented file)
 04h	WORD	header size
 06h	DWORD	file size in bytes
 0Ah	WORD	checksum
 0Ch	DWORD	offset of run-time parameters within file (see #01622)
 10h	DWORD	size of run-time parameters in bytes
 14h	DWORD	offset of relocation table within file
 18h	DWORD	size of relocation table in bytes
 1Ch	DWORD	offset of segment information table within file (see #01621)
 20h	DWORD	size of segment information table in bytes
 24h	WORD	size of segment information table entry in bytes
 26h	DWORD	offset of load image within file
 2Ah	DWORD	size of load image on disk
 2Eh	DWORD	offset of symbol table within file or 00000000h
 32h	DWORD	size of symbol table in bytes
 36h	DWORD	offset of GDT within load image
 3Ah	DWORD	size of GDT in bytes
 3Eh	DWORD	offset of LDT within load image
 42h	DWORD	size of LDT in bytes
 46h	DWORD	offset of IDT within load image
 4Ah	DWORD	size of IDT in bytes
 4Eh	DWORD	offset of TSS within load image
 52h	DWORD	size of TSS in bytes
 56h	DWORD	minimum number of extra bytes to be allocated at end of program
		(level 1 executables only)
 5Ah	DWORD	maximum number of extra bytes to be allocated at end of program
		(level 1 executables only)
 5Eh	DWORD	base load offset (level 1 executables only)
 62h	DWORD	initial ESP
 66h	WORD	initial SS
 68h	DWORD	initial EIP
 6Ch	WORD	initial CS
 6Eh	WORD	initial LDT
 70h	WORD	initial TSS
 72h	WORD	flags
		bit 0: load image is packed
		bit 1: 32-bit checksum is present
		bits 4-2: type of relocation table
 74h	DWORD	memory requirements for load image
 78h	DWORD	32-bit checksum (optional)
 7Ch	DWORD	size of stack segment in bytes
 80h 256 BYTEs	reserved (0)
SeeAlso: #01619,#01623

Format of Phar Lap segment information table entry:
Offset	Size	Description	(Table 01621)
 00h	WORD	selector number
 02h	WORD	flags
 04h	DWORD	base offset of selector
 08h	DWORD	minimum number of extra bytes to be allocated to the segment

Format of 386|DOS-Extender run-time parameters:
Offset	Size	Description	(Table 01622)
 00h  2 BYTEs	signature "DX" (44h 58h)
 02h	WORD	minimum number of real-mode params to leave free at run time
 04h	WORD	maximum number of real-mode params to leave free at run time
 06h	WORD	minimum interrupt buffer size in KB
 08h	WORD	maximum interrupt buffer size in KB
 0Ah	WORD	number of interrupt stacks
 0Ch	WORD	size in KB of each interrupt stack
 0Eh	DWORD	offset of byte past end of real-mode code and data
 12h	WORD	size in KB of call buffers
 14h	WORD	flags
		bit 0: file is virtual memory manager
		bit 1: file is a debugger
 16h	WORD	unprivileged flag (if nonzero, executes at ring 1, 2, or 3)
 18h 104 BYTEs	reserved (0)

Format of Phar Lap repeat block header:
Offset	Size	Description	(Table 01623)
 00h	WORD	byte count
 02h	BYTE	repeat string length

Format of Borland debugging information header (following load image):
Offset	Size	Description	(Table 01624)
 00h	WORD	signature 52FBh
 02h	WORD	version ID
 04h	DWORD	size of name pool in bytes
 08h	WORD	number of names in name pool
 0Ah	WORD	number of type entries
 0Ch	WORD	number of structure members
 0Eh	WORD	number of symbols
 10h	WORD	number of global symbols
 12h	WORD	number of modules
 14h	WORD	number of locals (optional)
 16h	WORD	number of scopes in table
 18h	WORD	number of line-number entries
 1Ah	WORD	number of include files
 1Ch	WORD	number of segment records
 1Eh	WORD	number of segment/file correlations
 20h	DWORD	size of load image after removing uninitialized data and debug
		  information
 24h	DWORD	debugger hook; pointer into debugged program whose meaning
		  depends on program flags
 28h	BYTE	program flags
		bit 0: case-sensitive link
		bit 1: pascal overlay program
 29h	WORD	no longer used
 2Bh	WORD	size of data pool in bytes
 2Dh	BYTE	padding
 2Eh	WORD	size of following header extension (currently 00h, 10h, or 20h)
 30h	WORD	number of classes
 32h	WORD	number of parents
 34h	WORD	number of global classes (currently unused)
 36h	WORD	number of overloads (currently unused)
 38h	WORD	number of scope classes
 3Ah	WORD	number of module classes
 3Ch	WORD	number of coverage offsets
 3Eh	DWORD	offset relative to symbol base of name pool
 42h	WORD	number of browser information records
 44h	WORD	number of optimized symbol records
 46h	WORD	debugging flags
 48h  8 BYTEs	padding
Note:	additional information on the Borland debugging info may be found in
	  Borland's Open Architecture Handbook
SeeAlso: #01600

Top
214B05 - INT 21 - DOS 5+ - SET EXECUTION STATE
INT 21 - DOS 5+ - SET EXECUTION STATE
	AX = 4B05h
	DS:DX -> execution state structure (see #01625)
Return: CF clear if successful
	    AX = 0000h
	CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
Note:	used by programs which intercept AX=4B00h to prepare new programs for
	  execution (including setting the DOS version number).	 No DOS, BIOS
	  or other software interrupt may be called after return from this call
	  before commencement of the child process.  If DOS is running in the
	  HMA, A20 is turned off on return from this call.
SeeAlso: AH=4Bh

Format of execution state structure:
Offset	Size	Description	(Table 01625)
 00h	WORD	reserved (00h)
 02h	WORD	type flags
		bit 0: program is an .EXE
		bit 1: program is an overlay
 04h	DWORD	pointer to ASCIZ name of program file
 08h	WORD	PSP segment of new program
 0Ah	DWORD	starting CS:IP of new program
 0Eh	DWORD	program size including PSP

Top
214C - INT 21 - DOS 2+ - "EXIT" - TERMINATE WITH RETURN CODE
INT 21 - DOS 2+ - "EXIT" - TERMINATE WITH RETURN CODE
	AH = 4Ch
	AL = return code
Return: never returns
Notes:	unless the process is its own parent
	  (see #01378 [offset 16h] at AH=26h), all open files are closed and
	  all memory belonging to the process is freed
	all network file locks should be removed before calling this function
SeeAlso: AH=00h,AH=26h,AH=4Bh,AH=4Dh,INT 15/AH=12h/BH=02h,INT 20,INT 22
SeeAlso: INT 60/DI=0601h

Top
214D - INT 21 - DOS 2+ - GET RETURN CODE (ERRORLEVEL)
INT 21 - DOS 2+ - GET RETURN CODE (ERRORLEVEL)
	AH = 4Dh
Return: AH = termination type
	    00h normal (INT 20,INT 21/AH=00h, or INT 21/AH=4Ch)
	    01h control-C abort
	    02h critical error abort
	    03h terminate and stay resident (INT 21/AH=31h or INT 27)
	AL = return code
	CF clear
Notes:	the word in which DOS stores the return code is cleared after being
	  read by this function, so the return code can only be retrieved once
	COMMAND.COM stores the return code of the last external command it
	  executed as ERRORLEVEL
	this call should not be used if the child was started with AX=4B04h;
	  use AH=8Ah instead
	the following sequence will close a Virtual DOS Machine under OS/2 2.0
	  through OS/2 Merlin (but may change in the future):
	    MOV	AH,4Dh
	    INT	21h
	    HLT
	    DB	02h,0FDh
	  This sequence is the only way to close a specific VDM which was
	  booted from floppy or a disk image.
SeeAlso: AH=4Bh,AH=4Ch,AH=8Ah

Top
214E - INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE
INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE
	AH = 4Eh
	AL = special flag for use by APPEND (refer to note below)
	CX = file attribute mask (see #01420 at AX=4301h) (bits 0 and 5 ignored)
	    0088h (Novell DOS 7) find first deleted file
	DS:DX -> ASCIZ file specification (may include path and wildcards)
Return: CF clear if successful
	    Disk Transfer Area filled with FindFirst data block (see #01626)
	CF set on error
	    AX = error code (02h,03h,12h) (see #01680 at AH=59h/BX=0000h)
Notes:	for search attributes other than 08h, all files with at MOST the
	  specified combination of hidden, system, and directory attributes
	  will be returned.  Under DOS 2.x, searching for attribute 08h
	  (volume label) will also return normal files, while under DOS 3.0+
	  only the volume label (if any) will be returned.
	this call also returns successfully if given the name of a character
	  device without wildcards.  DOS 2.x returns attribute 00h, size 0,
	  and the current date and time.  DOS 3.0+ returns attribute 40h and
	  the current date and time.
	immediately after an INT 2F/AX=B711h (APPEND return found name), the
	  name at DS:DX will be overwritten; if AL=00h on entry, the actual
	  found pathname will be stored, otherwise, the actual found path
	  will be prepended to the original filespec without a path.
	under LANtastic, this call may be used to obtain a list of a server's
	  shared resources by searching for "\\SERVER\*.*"; a list of printer
	  resources may be obtained by searching for "\\SERVER\@*.*"
	under the FlashTek X-32 DOS extender, the filespec pointer is in DS:EDX
BUGS:	under DOS 3.x and 4.x, the second and subsequent calls to this function
	  with a character device name (no wildcards) and search attributes
	  which include the volume-label bit (08h) will fail unless there is
	  an intervening DOS call which implicitly or explicity performs a
	  directory search without the volume-label bit.  Such implicit
	  searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK
	  (AH=41h), and RENAME (AH=56h)
	DR DOS 3.41 and 5.0 return the Directory attribute for the volume label
SeeAlso: AH=11h,AH=4Fh,AX=4301h,AX=714Eh,AX=71A1h,AX=F257h/SF=02h
SeeAlso: INT 2F/AX=111Bh,INT 2F/AX=B711h

Format of FindFirst data block:
Offset	Size	Description	(Table 01626)
---PC-DOS 3.10, PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
 00h	BYTE	drive letter (bits 0-6), remote if bit 7 set
 01h 11 BYTEs	search template
 0Ch	BYTE	search attributes
---DOS 2.x (and some DOS 3.x???)---
 00h	BYTE	search attributes
 01h	BYTE	drive letter
 02h 11 BYTEs	search template
---WILDUNIX.COM---
 00h 12 BYTEs	15-character wildcard search pattern and drive letter (packed)
 0Ch	BYTE	search attributes
---DOS 2.x and most 3.x---
 0Dh	WORD	entry count within directory
 0Fh	DWORD	pointer to DTA???
 13h	WORD	cluster number of start of parent directory
---PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
 0Dh	WORD	entry count within directory
 0Fh	WORD	cluster number of start of parent directory
 11h  4 BYTEs	reserved
---OS/2 MVDM---
 00h	WORD	"OS2_BMP_handle"
 02h	WORD	"OS2_LastEnt"
 04h	DWORD	"OS2_Checksum"
 08h	BYTE	"OS2_usi_flag"
 09h	DWORD	used by DOS emulator for second pass for volume-label searches
 0Dh	WORD	(ret) "DOS_LastEnt" entry count within directory
 0Fh	BYTE	OS/2 Processed-FindFirst flag
		00h FindFirst processed by DOS
		42h FindFirst processed by OS/2
 10h  5 BYTEs	reserved for future use
---all versions, documented fields---
 15h	BYTE	attribute of file found
 16h	WORD	file time (see #01665 at AX=5700h)
 18h	WORD	file date (see #01666 at AX=5700h)
 1Ah	DWORD	file size
 1Eh 13 BYTEs	ASCIZ filename+extension

Top
214F - INT 21 - DOS 2+ - "FINDNEXT" - FIND NEXT MATCHING FILE
INT 21 - DOS 2+ - "FINDNEXT" - FIND NEXT MATCHING FILE
	AH = 4Fh
	Disk Transfer Area contains data block from previous FindFirst or
	  FindNext call
Return: CF clear if successful
	    Disk Transfer Area updated
	CF set on error
	    AX = error code (12h) (see #01680 at AH=59h/BX=0000h)
Notes:	under Novell DOS 7, if the FindFirst call (AH=4Eh) had CX=0088h, then
	  the next matching deleted file will be returned
	since the entire state of a FindFirst/FindNext sequence is contained
	  in the data block in the DTA, other disk operations such as renaming,
	  moving, deleting, or creating files can cause inaccurate directory
	  searches, such as finding the same file twice
BUG:	DR DOS 3.41 and 5.0 return the Directory attribute for the volume label
SeeAlso: AH=12h,AH=4Eh,AX=714Fh,AX=71A1h

Top
2150 - INT 21 - DOS 2+ internal - SET CURRENT PROCESS ID (SET PSP ADDRESS)
INT 21 - DOS 2+ internal - SET CURRENT PROCESS ID (SET PSP ADDRESS)
	AH = 50h
	BX = segment of PSP for new process
Notes:	DOS uses the current PSP address to determine which processes own files
	  and memory; it corresponds to process identifiers used by other OSs
	under DOS 2.x, this function cannot be invoked inside an INT 28h
	  handler without setting the Critical Error flag
	under MS-DOS 3.0+ and DR DOS 3.41+, this function does not use any of
	  the DOS-internal stacks and may thus be called at any time, even
	  during another INT 21h call
	some Microsoft applications such as Quick C 2.51 use segments of 0000h
	  and FFFFh and direct access to the SDA (see #01687 at AX=5D06h) to
	  test whether they are running under MS-DOS rather than a compatible
	  OS; although one should only call this function with valid PSP
	  addresses, any program hooking it should be prepared to handle
	  invalid addresses
	this function is supported by the OS/2 compatibility box
	this call was undocumented prior to the release of DOS 5.0
SeeAlso: AH=26h,AH=51h,AH=62h

Top
2151 - INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
	AH = 51h
Return: BX = segment of PSP for current process
Notes:	DOS uses the current PSP address to determine which processes own files
	  and memory; it corresponds to process identifiers used by other OSs
	under DOS 2.x, this function cannot be invoked inside an INT 28h
	  handler without setting the Critical Error flag
	under DOS 3.0+, this function does not use any of the DOS-internal
	  stacks and may thus be called at any time, even during another
	  INT 21h call
	supported by OS/2 compatibility box
	identical to the documented AH=62h
	this call was undocumented prior to the release of DOS 5.0
SeeAlso: AH=26h,AH=50h,AH=62h

Top
2152 - INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
	AH = 52h
Return: ES:BX -> DOS list of lists (see #01627)
Notes:	partially supported by OS/2 v1.1 compatibility box (however, most
	  pointers are FFFFh:FFFFh, LASTDRIVE is FFh, and the NUL header "next"
	  pointer is FFFFh:FFFFh).
	partially supported by the Windows NT DOS box; contains only a
	  rudimentary Current Directory Structure (see #01645)
	on return, ES points at the DOS data segment (see also INT 2F/AX=1203h)
	Quarterdeck's suggested check for the use of its DOSDATA.SYS or
	  DOS-UP.SYS is to test whether the list-of-lists segment is greater
	  than the segment of the first memory block; a better check for
	  DOS-UP.SYS is INT 21/AX=2B01h/CX=444Dh
	because not all DOS workalikes support all fields in the List of Lists,
	  applications should ensure that pointers are neither 0000h:0000h
	  nor FFFFh:FFFFh before using them
	Windows for Workgroups 3.11 network and Windows95 set the path to
	  the local drive and directory even for network drives; in that
	  case the UNC form \\SERVER\SHARE can be obtained with
	  INT 21/AX=5F02h or INT 21/AX=5F46h. LapLink RemoteAccess does the
	  same even for INT 21/AX=5F02h
	Windows95 GUI no longer returns the true path for a SUBSTed drive,
	  but MS-DOS 7.00 does; use INT 21/AH=60h to obtain the true name
SeeAlso: INT 2F/AX=1203h

Format of List of Lists:
Offset	Size	Description	(Table 01627)
 -24	WORD	(DOS 3.1+) contents of CX from INT 21/AX=5E01h
 -22	WORD	(DOS ???+) LRU counter for FCB caching
 -20	WORD	(DOS ???+) LRU counter for FCB opens
 -18	DWORD	(DOS ???+) address of OEM function handler (see INT 21/AH=F8h)
			FFFFh:FFFFh if not installed or not available
 -14	WORD	(DOS ???+) offset in DOS CS of code to return from INT 21 call
 -12	WORD	(DOS 3.1+) sharing retry count (see AX=440Bh)
 -10	WORD	(DOS 3.1+) sharing retry delay (see AX=440Bh)
 -8	DWORD	(DOS 3.0+) pointer to current disk buffer
 -4	WORD	(DOS 3.0+) pointer in DOS data segment of unread CON input
		when CON is read via a handle, DOS reads an entire line,
		  and returns the requested portion, buffering the rest
		  for the next read.  0000h indicates no unread input
 -2	WORD	segment of first memory control block (see #01628)
 00h	DWORD	pointer to first Drive Parameter Block (see #01395 at AH=32h)
 04h	DWORD	-> first System File Table (see #01639,#01640,#01641,#01642)
 08h	DWORD	pointer to active CLOCK$ device's header (most recently loaded
		  driver with CLOCK bit set)
 0Ch	DWORD	pointer to active CON device's header (most recently loaded
		  driver with STDIN bit set)
---DOS 2.x---
 10h	BYTE	number of logical drives in system
 11h	WORD	maximum bytes/block of any block device
 13h	DWORD	pointer to first disk buffer (see #01649,#01650)
 17h 18 BYTEs	actual NUL device driver header (not a pointer!)
		NUL is always the first device on DOS's linked list of device
		  drivers. (see #01646)
---DOS 3.0---
 10h	BYTE	number of block devices
 11h	WORD	maximum bytes/block of any block device
 13h	DWORD	pointer to first disk buffer (see #01650,#01652)
 17h	DWORD	pointer to array of current directory structures (see #01643)
 1Bh	BYTE	value of LASTDRIVE command in CONFIG.SYS (default 5)
 1Ch	DWORD	pointer to STRING= workspace area
 20h	WORD	size of STRING area (the x in STRING=x from CONFIG.SYS)
 22h	DWORD	pointer to FCB table
 26h	WORD	the y in FCBS=x,y from CONFIG.SYS
 28h 18 BYTEs	actual NUL device driver header (not a pointer!)
		NUL is always the first device on DOS's linked list of device
		  drivers. (see #01646)
---DOS 3.1-3.3---
 10h	WORD	maximum bytes per sector of any block device
 12h	DWORD	pointer to first disk buffer in buffer chain (see #01650)
 16h	DWORD	pointer to array of current directory structures (see #01643)
 1Ah	DWORD	pointer to system FCB tables (see #01640,#01641,#01642)
 1Eh	WORD	number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
 20h	BYTE	number of block devices installed
 21h	BYTE	number of available drive letters (largest of 5, installed
		  block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
		  current directory structure array.
 22h 18 BYTEs	actual NUL device driver header (not a pointer!)
		NUL is always the first device on DOS's linked list of device
		  drivers. (see #01646)
 34h	BYTE	number of JOIN'ed drives
---DOS 4.x---
 10h	WORD	maximum bytes per sector of any block device
 12h	DWORD	pointer to disk buffer info record (see #01652,#01653)
		Note: although the initialization code in IO.SYS uses this
		  pointer, MSDOS.SYS does not, instead using the hardcoded
		  address of the info record
 16h	DWORD	pointer to array of current directory structures
		(see #01643,#01644)
 1Ah	DWORD	pointer to system FCB tables (see #01640,#01641,#01642)
 1Eh	WORD	number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
		(always 00h for DOS 5.0)
 20h	BYTE	number of block devices installed
 21h	BYTE	number of available drive letters; also size of current
		  directory structure array.
		For DOS 4.0-6.0: largest of 5, installed block devices,
		  and CONFIG.SYS LASTDRIVE=
		For DOS 7.x (Windows9X), set to 32 if no LASTDRIVE= or
		  LASTDRIVEHIGH=, else set to larger of installed block
		  devices and LASTDRIVE(HIGH)=
 22h 18 BYTEs	actual NUL device driver header (not a pointer!)
		NUL is always the first device on DOS's linked list of device
		  drivers. (see #01646)
 34h	BYTE	number of JOIN'ed drives
 35h	WORD	pointer within IBMDOS code segment to list of special program
		  names (see #01662)
		(always 0000h for DOS 5.0)
 37h	DWORD	pointer to FAR routine for resident IFS utility functions
		(see #01658)
		may be called by any IFS driver which does not wish to
		  service functions 20h or 24h-28h itself
 3Bh	DWORD	pointer to chain of IFS (installable file system) drivers
 3Fh	WORD	the x in BUFFERS x,y (rounded up to multiple of 30 if in EMS)
 41h	WORD	number of lookahead buffers (the y in BUFFERS x,y)
 43h	BYTE	boot drive (1=A:)
 44h	BYTE	flag: 01h to use DWORD moves (80386+), 00h otherwise
 45h	WORD	extended memory size in KB
---DOS 5.0-6.0---
 10h 39 BYTEs	as for DOS 4.x (above)
 37h	DWORD	pointer to SETVER program list or 0000h:0000h
 3Bh	WORD	(DOS=HIGH) offset in DOS CS of function to fix A20 control
		  when executing special .COM format
 3Dh	WORD	PSP of most-recently EXECed program if DOS in HMA, 0000h if low
		used for maintaining count of INT 21 calls which disable A20
		  on return
 3Fh  8 BYTEs	as for DOS 4.x (above)
---Windows NT DOS Box---
 10h  6 BYTEs	???
 16h	DWORD	pointer to array of current directory structures (see #01645)
 1Ah  6 BYTEs	???
 20h	BYTE	number of block devices installed
 21h	BYTE	number of local drive letters (= installed block devices)
		Also size of current directory structure array.
 22h 18 BYTEs	actual NUL device driver header (not a pointer!)
		NUL is always the first device on DOS's linked list of device
		  drivers. (see #01646)
---DOS 7.x---
 10h 55 BYTEs	as for DOS 5.0-6.0 (above)
 47h 25 BYTEs	???
 60h	BYTE	"DOS_FLAG" (see also INT 26)

Format of DOS memory control block:
Offset	Size	Description	(Table 01628)
 00h	BYTE	block type: 5Ah if last block in chain, otherwise 4Dh
 01h	WORD	PSP segment of owner or special flag value (see #01629)
 03h	WORD	size of memory block in paragraphs
 05h  3 BYTEs	unused by MS-DOS
		(386MAX) if locked-out block, region start/prev region end
---DOS 2.x,3.x---
 08h  8 BYTEs	unused
---DOS 4.0+ ---
 08h  8 BYTEs	ASCII program name if PSP memory block or DR DOS UMB,
		  else garbage
		null-terminated if less than 8 characters
Notes:	the next MCB is at segment (current + size + 1)
	under DOS 3.1+, the first memory block is the DOS data segment,
	  containing installable drivers, buffers, etc.	 Under DOS 4.0+ it is
	  divided into subsegments, each with its own memory control block
	  (see #01633), the first of which is at offset 0000h.
	for DOS 5+, blocks owned by DOS may have either "SC" or "SD" in bytes
	  08h and 09h.	"SC" is system code or locked-out inter-UMB memory,
	  "SD" is system data, device drivers, etc.
	Some versions of DR DOS use only seven characters of the program name,
	  placing a NUL in the eighth byte.
SeeAlso: #01630,#01632,#01633

(Table 01629)
Values for special flag PSP segments:
 0000h	free
 0006h	DR DOS XMS UMB
 0007h	DR DOS excluded upper memory ("hole")
 0008h	belongs to DOS
 FFF7h	386MAX v6.01+ ???
 FFFAh	386MAX UMB control block (see #01477 at AX=4402h"386MAX")
 FFFDh	386MAX locked-out memory
 FFFEh	386MAX UMB (normally immediately follows its control block)
 FFFFh	386MAX v6.01+ device driver

Format of MS-DOS 5+ UMB control block:
Offset	Size	Description	(Table 01630)
 00h	BYTE	type: 5Ah if last block in chain, 4Dh otherwise
 01h	WORD	first available paragraph in UMB if control block at start
		  of UMB, 000Ah if control block at end of UMB
 03h	WORD	length in paragraphs of following UMB or locked-out region
 05h  3 BYTEs	unused
 08h  8 BYTEs	block type name: "UMB" if start block, "SM" if end block in UMB
SeeAlso: #01628,#01631

Format of MS-DOS 7.0 HMA memory control block:
Offset	Size	Description	(Table 01631)
 00h	WORD	signature "MS" (4Dh 53h)
 02h	WORD	usage flag???
		0000h free
		else ???
 04h	WORD	size of memory block in bytes (not counting MCB)
 06h	WORD	offset of next memory block in HMA or 0000h
 08h  8 BYTEs	unused (0)
SeeAlso: #01628,#01630,#01632

Format of STARLITE (General Software's Embedded DOS) memory control block:
Offset	Size	Description	(Table 01632)
 00h	BYTE	block type: 5Ah if last block in chain, otherwise 4Dh
 01h	WORD	PSP segment of owner, 0000h if free, 0008h if belongs to DOS
 03h	WORD	size of memory block in paragraphs
 05h	BYTE	unused
 06h	WORD	segment address of next memory control block (0000h if last)
 08h	WORD	segment address of previous memory control block or 0000h
 0Ah  6 BYTEs	reserved

Format of DOS 4.0+ data segment subsegment control blocks:
Offset	Size	Description	(Table 01633)
 00h	BYTE	subsegment type (blocks typically appear in this order)
		"D"  device driver
		"E"  device driver appendage
		"I"  IFS (Installable File System) driver
		     (MS-DOS 7) high-loaded drive data table array (see #02603)
		"F"  FILES=  control block storage area (for FILES>5)
		"X"  FCBS=   control block storage area, if present
		"C"  BUFFERS EMS workspace area (if BUFFERS /X option used)
		"B"  BUFFERS=  storage area
		"L"  LASTDRIVE=	 current directory structure array storage area
		"S"  STACKS=  code and data area, if present (see #01634,#01635)
		"T"  INSTALL= transient code
 01h	WORD	paragraph of subsegment start (usually the next paragraph)
 03h	WORD	size of subsegment in paragraphs
 05h  3 BYTEs	unused
 08h  8 BYTEs	for types "D" and "I", base name of file from which the driver
		  was loaded (unused for other types)

Format of data at start of STACKS code segment (if present):
Offset	Size	Description	(Table 01634)
 00h	WORD	???
 02h	WORD	number of stacks (the x in STACKS=x,y)
 04h	WORD	size of stack control block array (should be 8*x)
 06h	WORD	size of each stack (the y in STACKS=x,y)
 08h	DWORD	pointer to STACKS data segment
 0Ch	WORD	offset in STACKS data segment of stack control block array
 0Eh	WORD	offset in STACKS data segment of last element of that array
 10h	WORD	offset in STACKS data segment of the entry in that array for
		  the next stack to be allocated (initially same as value in
		  0Eh and works its way down in steps of 8 to the value in
		  0Ch as hardware interrupts pre-empt each other)
Note:	the STACKS code segment data may, if present, be located as follows:
    DOS 3.2:	The code segment data is at a paragraph boundary fairly early
		  in the IBMBIO segment (seen at 0070:0190h)
    DOS 3.3:	The code segment is at a paragraph boundary in the DOS data
		  segment, which may be determined by inspecting the segment
		  pointers of the vectors for those of interrupts 02h, 08h-0Eh,
		  70h, 72-77h which have not been redirected by device drivers
		  or TSRs.
    DOS 4.0+	Identified by sub-segment control block type "S" within the DOS
		  data segment.
SeeAlso: #01636,INT B4"STACKMAN"

Format of array elements in STACKS data segment:
Offset	Size	Description	(Table 01635)
 00h	BYTE	status: 00h=free, 01h=in use, 03h=corrupted by overflow of
		  higher stack.
 01h	BYTE	not used
 02h	WORD	previous SP
 04h	WORD	previous SS
 06h	WORD	ptr to word at top of stack (new value for SP). The word at the
		  top of the stack is preset to point back to this control
		  block.

Format of SHARE.EXE hooks (DOS 3.1-6.00):
Offset	Size	Description	(Table 01636)
(offsets from first system file table--pointed at by ListOfLists+04h)
-3Ch	DWORD	pointer to FAR routine for ???
		Note: not called by MS-DOS 3.3, set to 0000h:0000h by
			SHARE 3.3+
-38h	DWORD	pointer to FAR routine called on opening file
		on call, internal DOS location points at filename
		  (see #01687 at AX=5D06h)
		Return: CF clear if successful
			CF set on error
			    AX = DOS error code (24h)
				  (see #01680 at AH=59h/BX=0000h)
		Note: SHARE directly accesses DOS-internal data to get name of
			file just opened
-34h	DWORD	pointer to FAR routine called on closing file
		ES:DI -> system file table
		Note: does something to every Record Lock Record for file
-30h	DWORD	pointer to FAR routine to close all files for given computer
		(called by AX=5D03h)
-2Ch	DWORD	pointer to FAR routine to close all files for given process
		(called by AX=5D04h)
-28h	DWORD	pointer to FAR routine to close file by name
		(called by AX=5D02h)
		DS:SI -> DOS parameter list (see #01686 at AX=5D00h)
		   DPL's DS:DX -> name of file to close
		Return: CF clear if successful
			CF set on error
			    AX = DOS error code (03h)
				  (see #01680 at AH=59h/BX=0000h)
-24h	DWORD	pointer to FAR routine to lock region of file
		call with BX = file handle
			  ---DOS 3.x---
			  CX:DX = starting offset
			  SI:AX = size
			  ---DOS 4.0+ ---
			  DS:DX -> lock range
					DWORD start offset
					DWORD size in bytes
		Return: CF set on error
			    AL = DOS error code (21h) (see #01680 at AH=59h)
		Note: not called if file is marked as remote
-20h	DWORD	pointer to FAR routine to unlock region of file
		call with BX = file handle
			  ---DOS 3.x---
			  CX:DX = starting offset
			  SI:AX = size
			  ---DOS 4.0+ ---
			  DS:DX -> lock range
					DWORD start offset
					DWORD size in bytes
		Return: CF set on error
			    AL = DOS error code (21h) (see #01680 at AH=59h)
		Note: not called if file is marked as remote
-1Ch	DWORD	pointer to FAR routine to check if file region is locked
		call with ES:DI -> system file table entry for file
			CX = length of region from current position in file
		Return: CF set if any portion of region locked
			    AX = 0021h
-18h	DWORD	pointer to FAR routine to get open file list entry
		(called by AX=5D05h)
		call with DS:SI -> DOS parameter list (see #01686 at AX=5D00h)
			DPL's BX = index of sharing record
			DPL's CX = index of SFT in SFT chain of sharing rec
		Return: CF set on error or not loaded
			    AX = DOS error code (12h) (see #01680 at AH=59h)
			CF clear if successful
			    ES:DI -> filename
			    CX = number of locks owned by specified SFT
			    BX = network machine number
			    DX destroyed
-14h	DWORD	pointer to FAR routine for updating FCB from SFT???
		call with DS:SI -> unopened FCB
			  ES:DI -> system file table entry
		Return: BL = C0h???
		Note: copies following fields from SFT to FCB:
		   starting cluster of file	  0Bh	 1Ah
		   sharing record offset	  33h	 1Ch
		   file attribute		  04h	 1Eh
-10h	DWORD	pointer to FAR routine to get first cluster of FCB file ???
		call with ES:DI -> system file table entry
			  DS:SI -> FCB
		Return: CF set if SFT closed or sharing record offsets
				mismatched
			CF clear if successful
			    BX = starting cluster number from FCB
-0Ch	DWORD	pointer to FAR routine to close file if duplicate for process
		DS:SI -> system file table
		Return: AX = number of handle in JFT which already uses SFT
		Note: called during open/create of a file
		Note: if SFT was opened with inheritance enabled and sharing
			mode 111, does something to all other SFTs owned by
			same process which have the same file open mode and
			sharing record
-08h	DWORD	pointer to FAR routine for closing file
		Note: closes various handles referring to file most-recently
			opened
-04h	DWORD	pointer to FAR routine to update directory info in related SFT
		  entries
		call with ES:DI -> system file table entry for file (see #01641)
			  AX = subfunction (apply to each related SFT)
				00h: update time stamp (offset 0Dh) and date
				     stamp (offset 0Fh)
				01h: update file size (offset 11h) and starting
				     cluster (offset 0Bh).  Sets last-accessed
				     cluster fields to start of file if file
				     never accessed
				02h: as function 01h, but last-accessed fields
				     always changed
				03h: do both functions 00h and 02h
		Note: follows ptr at offset 2Bh in system file table entries
		Note: NOP if opened with no-inherit or via FCB
Notes:	most of the above hooks (except -04h, -14h, -18h, and -3Ch) assume
	  either that SS=DOS DS or SS=DS=DOS DS and directly access
	  DOS-internal data
	sharing hooks are not supported by DR DOS 5-6; they appear to be
	  supported by Novell DOS 7, with a segment of 0000h indicating the
	  DOS data segment
SeeAlso: #01637,#01638

Format of sharing record:
Offset	Size	Description	(Table 01637)
 00h	BYTE	flag
		00h free block
		01h allocated block
		FFh end marker
 01h	WORD	size of block
 03h	BYTE	checksum of pathname (including NUL)
		if sum of ASCII values is N, checksum is (N/256 + N%256)
 04h	WORD	offset in SHARE's DS of first Record Lock Record (see #01638)
 06h	DWORD	pointer to start of system file table chain for file
 0Ah	WORD	unique sequence number
 0Ch	var	ASCIZ full pathname
Note:	not supported by DR DOS SHARE 1.1 and 2.0; will reportedly be
	  supported by Novell DOS 7
SeeAlso: #01636,#01638

Format of SHARE.EXE Record Lock Record:
Offset	Size	Description	(Table 01638)
 00h	WORD	offset in SHARE's DS of next lock table in list or 0000h
 02h	DWORD	offset in file of start of locked region
 06h	DWORD	offset in file of end of locked region
 0Ah	DWORD	pointer to System File Table entry for this file
 0Eh	WORD	PSP segment of lock's owner
---DOS 5+ ---
 10h	WORD	lock type: (00h lock all, 01h lock writes only)
SeeAlso: #01636,#01637,#01639,#01642

Format of DOS 2.x system file tables:
Offset	Size	Description	(Table 01639)
 00h	DWORD	pointer to next file table (offset FFFFh if last)
 04h	WORD	number of files in this table
 06h  28h bytes per file
	Offset	Size	Description
	 00h	BYTE	number of file handles referring to this file
	 01h	BYTE	file open mode (see #01402 at AH=3Dh)
	 02h	BYTE	file attribute
	 03h	BYTE	drive (0 = character device, 1 = A, 2 = B, etc)
	 04h 11 BYTEs	filename in FCB format (no path,no period,blank-padded)
	 0Fh	WORD	???
	 11h	WORD	???
	 13h	DWORD	file size???
	 17h	WORD	file date in packed format (see #01666 at AX=5700h)
	 19h	WORD	file time in packed format (see #01665 at AX=5700h)
	 1Bh	BYTE	device attribute (see #01423 at AX=4400h)
	---character device---
	 1Ch	DWORD	pointer to device driver
	---block device---
	 1Ch	WORD	starting cluster of file
	 1Eh	WORD	relative cluster in file of last cluster accessed
	------
	 20h	WORD	absolute cluster number of current cluster
	 22h	WORD	???
	 24h	DWORD	current file position???
SeeAlso: #01640,#01641,#01642

Format of DOS 3.0 system file tables and FCB tables:
Offset	Size	Description	(Table 01640)
 00h	DWORD	pointer to next file table (offset FFFFh if last)
 04h	WORD	number of files in this table
 06h  38h bytes per file
	Offset	Size	Description
	 00h-1Eh as for DOS 3.1+ (see #01641)
	 1Fh	WORD	byte offset of directory entry within sector
	 21h 11 BYTEs	filename in FCB format (no path/period, blank-padded)
	 2Ch	DWORD	(SHARE.EXE) pointer to previous SFT sharing same file
	 30h	WORD	(SHARE.EXE) network machine number which opened file
			(Windows Enhanced mode DOSMGR uses the virtual machine
			  ID as the machine number; see INT 2F/AX=1683h)
	 32h	WORD	PSP segment of file's owner (first three entries for
			  AUX/CON/PRN contain segment of IO.SYS startup code)
	 34h	WORD	(SHARE.EXE) offset in SHARE code seg of share record
	 36h	WORD	??? apparently always 0000h
SeeAlso: #01639,#01641,#01642

Format of DOS 3.1-3.3x, DR DOS 5.0-6.0 system file tables and FCB tables:
Offset	Size	Description	(Table 01641)
 00h	DWORD	pointer to next file table (offset FFFFh if last)
 04h	WORD	number of files in this table
 06h  35h bytes per file
	Offset	Size	Description
	 00h	WORD	number of file handles referring to this file
	 02h	WORD	file open mode (see AX=6C00h, #01402 at AH=3Dh)
			bit 15 set if this file opened via FCB
	 04h	BYTE	file attribute (see #01420 at AX=4301h)
	 05h	WORD	device info word (see #01423 at AX=4400h)
			bit 15 set if remote file
			bit 14 set means do not set file date/time on closing
			bit 12 set means don't inherit on EXEC
			bits 5-0 drive number for disk files
	 07h	DWORD	pointer to device driver header if character device
			else pointer to DOS Drive Parameter Block
			  (see #01395 at AH=32h)
	 0Bh	WORD	starting cluster of file
	 0Dh	WORD	file time in packed format (see #01665 at AX=5700h)
			not used for character devices in DR DOS
	 0Fh	WORD	file date in packed format (see #01666 at AX=5700h)
			not used for character devices in DR DOS
	 11h	DWORD	file size
	---system file table---
	 15h	DWORD	current offset in file (may be larger than size of
			  file; INT 21/AH=42h does not check new position)
	---FCB table---
	 15h	WORD	counter for last I/O to FCB
	 17h	WORD	counter for last open of FCB
			(these are separate to determine the times of the
			  latest I/O and open)
	---
	 19h	WORD	relative cluster within file of last cluster accessed
	 1Bh	WORD	absolute cluster number of last cluster accessed
			0000h if file never read or written???
	 1Dh	WORD	number of sector containing directory entry
			(see #01352)
	 1Fh	BYTE	number of dir entry within sector (byte offset/32)
	 20h 11 BYTEs	filename in FCB format (no path/period, blank-padded)
	 2Bh	DWORD	(SHARE.EXE) pointer to previous SFT sharing same file
	 2Fh	WORD	(SHARE.EXE) network machine number which opened file
			(Windows Enhanced mode DOSMGR uses the virtual machine
			  ID as the machine number; see INT 2F/AX=1683h)
	 31h	WORD	PSP segment of file's owner (see #01378 at AH=26h)
			  (first three entries for AUX/CON/PRN contain segment
			  of IO.SYS startup code)
	 33h	WORD	offset within SHARE.EXE code segment of
			  sharing record (see #01637) 0000h = none
SeeAlso: #01639,#01640,#01642

Format of DOS 4.0-6.0 system file tables and FCB tables:
Offset	Size	Description	(Table 01642)
 00h	DWORD	pointer to next file table (offset FFFFh if last)
 04h	WORD	number of files in this table
 06h  3Bh bytes per file
	Offset	Size	Description
	 00h	WORD	number of file handles referring to this file
			FFFFh if in use but not referenced
	 02h	WORD	file open mode (see AX=6C00h,#01402 at AH=3Dh)
			bit 15 set if this file opened via FCB
	 04h	BYTE	file attribute (see #01420 at AX=4301h)
	 05h	WORD	device info word (see also #01423 at AX=4400h)
			bit 15 set if remote file
			bit 14 set means do not set file date/time on closing
			bit 13 set if named pipe
			bit 12 set if no inherit
			bit 11 set if network spooler
			bit 7  set if device, clear if file (only if local)
			bits 6-0 as for AX=4400h
	 07h	DWORD	pointer to device driver header if character device
			else pointer to DOS Drive Parameter Block
			  (see #01395 at AH=32h) or REDIR data
	 0Bh	WORD	starting cluster of file (local files only)
			not set for FAT32-capable versions of Windows95
			  (since they allow 32-bit cluster numbers)
	 0Dh	WORD	file time in packed format (see #01665)
	 0Fh	WORD	file date in packed format (see #01666)
	 11h	DWORD	file size
	 15h	DWORD	current offset in file (SFT)
			LRU counters (FCB table, two WORDs)
	---local file---
	 19h	WORD	relative cluster within file of last cluster accessed
	 1Bh	DWORD	number of sector containing directory entry
	 1Fh	BYTE	number of dir entry within sector (byte offset/32)
	---network redirector---
	 19h	DWORD	pointer to REDIRIFS record
	 1Dh  3 BYTEs	???
	------
	 20h 11 BYTEs	filename in FCB format (no path/period, blank-padded)
	 2Bh	DWORD	(SHARE.EXE) pointer to previous SFT sharing same file
	 2Fh	WORD	(SHARE.EXE) network machine number which opened file
			(Windows Enhanced mode DOSMGR uses the virtual machine
			  ID as the machine number; see INT 2F/AX=1683h)
	 31h	WORD	PSP segment of file's owner (see #01378 at AH=26h)
			  (first three entries for AUX/CON/PRN contain segment
			  of IO.SYS startup code)
	 33h	WORD	offset within SHARE.EXE code segment of
			sharing record (see #01595)  0000h = none
	 35h	WORD	(local) absolute cluster number of last clustr accessed
			(redirector) ???
	 37h	DWORD	pointer to IFS driver for file, 0000000h if native DOS
Note:	the OS/2 2.0 DOS Boot Session does not properly fill in the filename
	  field due to incomplete support for SFTs; the OS/2 2.0 DOS Window
	  does not appear to support SFTs at all
SeeAlso: #01639,#01640,#01641

Format of current directory structure (CDS) (array, LASTDRIVE entries):
Offset	Size	Description	(Table 01643)
 00h 67 BYTEs	ASCIZ path in form X:\PATH (local) or UNC form
		  \\SERVER\PATH (network, see notes below)
 43h	WORD	drive attributes (also see note below) (see also AX=5F07h)
		bit 15: uses network redirector	 \ invalid if 00, installable
		bit 14: physical drive		 / file system if 11
		bit 13: JOIN'ed	  \ path above is true path that would be
		bit 12: SUBST'ed  / needed if not under SUBST or JOIN
		bit 11: removable media (WinNT4.0)
		bit 10: hard disk??? (WinNT4.0)
		bit  7: remote drive hidden from redirector's assign-list and
			  exempt from network connection make/break commands;
			  set for CD-ROM drives by MSCDEX (not supported by
			  CORELCDX)
 45h	DWORD	pointer to Drive Parameter Block for drive
		  (see #01395 at AH=32h)
---local drives---
 49h	WORD	starting cluster of current directory
		0000h = root, FFFFh = never accessed
 4Bh	WORD	??? seems to be FFFFh always
 4Dh	WORD	??? seems to be FFFFh always
---network drives---
 49h	DWORD	pointer to redirector or REDIRIFS record, or FFFFh:FFFFh
		(DOS 4 only) available for use by IFS driver
 4Dh	WORD	stored user data from INT 21/AX=5F03h
------
 4Fh	WORD	offset in current directory path of backslash corresponding to
		  root directory for drive
		this value specifies how many characters to hide from the
		  "CHDIR" and "GETDIR" calls; normally set to 2 to hide the
		  drive letter and colon, SUBST, JOIN, and networks change it
		  so that only the appropriate portion of the true path is
		  visible to the user
---DOS 4.0+ ---
 51h	BYTE	(DOS 4 only, remote drives) device type
		04h network drive
 52h	DWORD	pointer to IFS driver (DOS 4) or redirector block (DOS 5+) for
		  this drive, 00000000h if native DOS
 56h	WORD	available for use by IFS driver
Notes:	the path for invalid drives is normally set to X:\, but may be empty
	  after JOIN x: /D in DR DOS 5.0 or NET USE x: /D in older LAN versions
	normally, only one of bits 13&12 may be set together with bit 14, but
	  DR DOS 5.0 uses other combinations for bits 15-12: 0111 JOIN,
	  0001 SUBST, 0101 ASSIGN (see #01644)
	Windows for Workgroups 3.11 network sets the path to the local
	  drive and directory even for network drives; in that case the
	  UNC form \\SERVER\SHARE can be obtained with INT 21/AX=5F02h
	  or INT 21/AX=5F46h. LapLink RemoteAccess does the same even for
	  INT 21/AX=5F02h
	Window NT 4.0 always uses X:\PATH, even for substituted drives (i.e.
	  the CDS will *not* contain the original path prior to SUBST)
	SoftWindows on the Macintosh PowerPC sets \\E for the host drive
SeeAlso: #01644,INT 21/AX=71AAh/BL=00h

Format of DR DOS 5.0-6.0 current directory structure entry (array):
Offset	Size	Description	(Table 01644)
 00h 67 BYTEs	ASCIZ pathname of actual root directory for this logical drive
 43h	WORD	drive attributes
		1000h SUBSTed drive
		3000h??? JOINed drive
		4000h physical drive
		5000h ASSIGNed drive
		7000h JOINed drive
		8000h network drive
 45h	BYTE	physical drive number (0=A:) if this logical drive is valid
 46h	BYTE	??? apparently flags for JOIN and ASSIGN
 47h	WORD	cluster number of start of parent directory (0000h = root)
 49h	WORD	entry number of current directory in parent directory
 4Bh	WORD	cluster number of start of current directory
 4Dh	WORD	used for media change detection (details not available)
 4Fh	WORD	cluster number of SUBST/JOIN "root" directory
		0000h if physical root directory
SeeAlso: #01643

Format of Windows NT Current Directory Structure (CDS) (array):
Offset	Size	Description	(Table 01645)
 00h 67 BYTEs	ASCIZ path in form X:\ (does not show either current directory
		  or network path)
 43h  4 BYTEs	???
Note:	the WinNT CDS contains only as many entries as there are local drives,
	  not LASTDRIVE entries.

Format of DOS device driver header:
Offset	Size	Description	(Table 01646)
 00h	DWORD	pointer to next driver, offset=FFFFh if last driver
 04h	WORD	device attributes (see #01647,#01648)
 06h	WORD	device strategy entry point
		call with ES:BX -> request header
		  (see #02597 at INT 2F/AX=0802h)
 08h	WORD	device interrupt entry point
---character device---
 0Ah  8 BYTEs	blank-padded character device name
---block device---
 0Ah	BYTE	number of subunits (drives) supported by driver
 0Bh  7 BYTEs	normally unused; sometimes contains signature to indicate
		  specific drivers:
		"$PCMATA"   PCMCIA driver PCMATA.SYS (see AX=440Dh"DOS 3.2+")
		"AHADDVR"   Adaptec SCSI disk driver ASPIDISK.SYS
		"DBLSPAC"   MS DoubleSpace or DriveSpace
		"DSKREET"   NortonUtils v5+ Diskreet (see INT 2F/AX=FE00h)
		"GFS	"   LapLink III device driver DD.BIN
		"SIDExxx"   PCMCIA driver ATADRV.EXE (see AX=440Dh"DOS 3.2+")
		"STAC-CD"   Stacker/Stacker Anywhere (see AX=4404h"Stacker")
---DoubleSpace/DriveSpace---
 12h  2 BYTEs	signature ",." (2Ch 2Eh)
 14h	var	preloading API entry point
---CD-ROM---
 12h	WORD	reserved, must be 0000h
		appears to be another device chain
 14h	BYTE	drive letter, 01h=A:, etc. (must initially be 00h; this byte
		  is set by MSCDEX when it loads)
 15h	BYTE	number of units
 16h  6 BYTEs	signature 'MSCDnn' where 'nn' is version (currently '00')
		(this field does not exist in most drivers)
SeeAlso: #02550 at INT 25/AX=CDCDh,#02845 at INT 2F/AX=5600h

Bitfields for device attributes (character device):
Bit(s)	Description	(Table 01647)
 15	set (indicates character device)
 14	IOCTL supported (see AH=44h)
 13	(DOS 3.0+) output until busy supported
 12	reserved
 11	(DOS 3.0+) OPEN/CLOSE/RemMedia calls supported
 10-8	reserved
 7	(DOS 5.0+) Generic IOCTL check call supported (driver command 19h)
	(see AX=4410h,AX=4411h)
 6	(DOS 3.2+) Generic IOCTL call supported (driver command 13h)
	(see AX=440Ch,AX=440Dh"DOS 3.2+")
 5	reserved
 4	device is special (use INT 29 "fast console output")
 3	device is CLOCK$ (all reads/writes use transfer record described
	  below)
 2	device is NUL
 1	device is standard output
 0	device is standard input
Note:	for European MS-DOS 4.0, bit 11 also indicates that bits 8-6 contain a
	  version code (000 = DOS 3.0,3.1; 001 = DOS 3.2;
	  010 = European DOS 4.0)
SeeAlso: #01648,#01646

Bitfields for device attributes (block device):
Bit(s)	Description	(Table 01648)
 15	clear (indicates block device)
 14	IOCTL supported
 13	non-IBM format
 12	network device (device is remote)
 11	(DOS 3.0+) OPEN/CLOSE/RemMedia calls supported
 10	reserved
 9	direct I/O not allowed??? (set by DOS 3.3 DRIVER.SYS for "new" drives)
 8	??? set by DOS 3.3 DRIVER.SYS for "new" drives
 7	(DOS 5.0+) Generic IOCTL check call supported (driver command 19h)
	(see AX=4410h,AX=4411h)
 6	(DOS 3.2+) Generic IOCTL call supported (driver command 13h)
	implies support for commands 17h and 18h
	  (see AX=440Ch,AX=440Dh"DOS 3.2+",AX=440Eh,AX=440Fh)
 5-2	reserved
 1	driver supports 32-bit sector addressing (DOS 3.31+)
 0	 reserved
Note:	for European MS-DOS 4.0, bit 11 also indicates that bits 8-6 contain a
	  version code (000 = DOS 3.0,3.1; 001 = DOS 3.2;
	  010 = European DOS 4.0)
SeeAlso: #01647,#01646

Format of DOS 2.x disk buffer:
Offset	Size	Description	(Table 01649)
 00h	DWORD	pointer to next disk buffer, offset = FFFFh if last
		least-recently used buffer is first in chain
 04h	BYTE	drive (0=A, 1=B, etc), FFh if not in use
 05h  3 BYTEs	unused??? (seems always to be 00h 00h 01h)
 08h	WORD	logical sector number
 0Ah	BYTE	number of copies to write (1 for non-FAT sectors)
 0Bh	BYTE	sector offset between copies if multiple copies to be written
 0Ch	DWORD	pointer to DOS Drive Parameter Block (see #01395 at AH=32h)
 10h		buffered data
SeeAlso: #01650,#01652,#01653,#01655

Format of DOS 3.x disk buffer:
Offset	Size	Description	(Table 01650)
 00h	DWORD	pointer to next disk buffer, offset = FFFFh if last
		least-recently used buffer is first in chain
 04h	BYTE	drive (0=A,1=B, etc), FFh if not in use
 05h	BYTE	buffer flags (see #01651)
 06h	WORD	logical sector number
 08h	BYTE	number of copies to write (1 for non-FAT sectors)
 09h	BYTE	sector offset between copies if multiple copies to be written
 0Ah	DWORD	pointer to DOS Drive Parameter Block (see #01395 at AH=32h)
 0Eh	WORD	unused??? (almost always 0)
 10h		buffered data
SeeAlso: #01649,#01652,#01653,#01655

Bitfields for DOS 3.x disk buffer flags:
Bit(s)	Description	(Table 01651)
 7	???
 6	buffer dirty
 5	buffer has been referenced
 4	???
 3	sector in data area
 2	sector in a directory, either root or subdirectory
 1	sector in FAT
 0	boot sector??? (guess)
SeeAlso: #01656

Format of DOS 4.00 (pre UR 25066) disk buffer info:
Offset	Size	Description	(Table 01652)
 00h	DWORD	pointer to array of disk buffer hash chain heads (see #01654)
 04h	WORD	number of disk buffer hash chains (referred to as NDBCH below)
 06h	DWORD	pointer to lookahead buffer, zero if not present
 0Ah	WORD	number of lookahead sectors, else zero (the y in BUFFERS=x,y)
 0Ch	BYTE	00h if buffers in EMS (/X), FFh if not
 0Dh	WORD	EMS handle for buffers, zero if not in EMS
 0Fh	WORD	EMS physical page number used for buffers (usually 255)
 11h	WORD	??? seems always to be 0001h
 13h	WORD	segment of EMS physical page frame
 15h	WORD	??? seems always to be zero
 17h  4 WORDs	EMS partial page mapping information???
SeeAlso: #01649,#01650,#01653,#01657

Format of DOS 4.01 (from UR 25066 Corrctive Services Disk on) disk buffer info:
Offset	Size	Description	(Table 01653)
 00h	DWORD	pointer to array of disk buffer hash chain heads (see #01654)
 04h	WORD	number of disk buffer hash chains (referred to as NDBCH below)
 06h	DWORD	pointer to lookahead buffer, zero if not present
 0Ah	WORD	number of lookahead sectors, else zero (the y in BUFFERS=x,y)
 0Ch	BYTE	01h, possibly to distinguish from pre-UR 25066 format
 0Dh	WORD	??? EMS segment for BUFFERS (only with /XD)
 0Fh	WORD	??? EMS physical page number of EMS seg above (only with /XD)
 11h	WORD	??? EMS segment for ??? (only with /XD)
 13h	WORD	??? EMS physical page number of above (only with /XD)
 15h	BYTE	??? number of EMS page frames present (only with /XD)
 16h	WORD	segment of one-sector workspace buffer allocated in main memory
		  if BUFFERS/XS or /XD options in effect, possibly to avoid DMA
		  into EMS
 18h	WORD	EMS handle for buffers, zero if not in EMS
 1Ah	WORD	EMS physical page number used for buffers (usually 255)
 1Ch	WORD	??? appears always to be 0001h
 1Eh	WORD	segment of EMS physical page frame
 20h	WORD	??? appears always to be zero
 22h	BYTE	00h if /XS, 01h if /XD, FFh if BUFFERS not in EMS
SeeAlso: #01649,#01650,#01652,#01657

Format of DOS 4.x disk buffer hash chain head (array, one entry per chain):
Offset	Size	Description	(Table 01654)
 00h	WORD	EMS logical page number in which chain is resident, -1 if not
		  in EMS
 02h	DWORD	pointer to least recently used buffer header.  All buffers on
		  this chain are in the same segment.
 06h	BYTE	number of dirty buffers on this chain
 07h	BYTE	reserved (00h)
Notes:	buffered disk sectors are assigned to chain N where N is the sector's
	  address modulo NDBCH,	 0 <= N <= NDBCH-1
	each chain resides completely within one EMS page
	this structure is in main memory even if buffers are in EMS

Format of DOS 4.0-6.0 disk buffer:
Offset	Size	Description	(Table 01655)
 00h	WORD	forward ptr, offset only, to next least recently used buffer
 02h	WORD	backward pointer, offset only
 04h	BYTE	drive (0=A,1=B, etc) if bit 7 clear
		SFT index if bit 7 set
		FFh if not in use
 05h	BYTE	buffer flags (see #01656)
 06h	DWORD	logical sector number (local buffers only)
 0Ah	BYTE	number of copies to write
		for FAT sectors, same as number of FATs
		for data and directory sectors, usually 1
 0Bh	WORD	offset in sectors between copies to write for FAT sectors
 0Dh	DWORD	pointer to DOS Drive Parameter Block (see #01395 at AH=32h)
 11h	WORD	size of data in buffer if remote buffer (see also #01656)
 13h	BYTE	reserved (padding)
 14h		buffered data
Note:	for DOS 4.x, all buffered sectors which have the same hash value
	  (computed as the sum of high and low words of the logical sector
	  number divided by the number of disk buffer chains) are on the same
	  doubly-linked circular chain; for DOS 5+, only a single circular
	  chain exists.
	the links consist of offset addresses only, the segment being the same
	  for all buffers in the chain.
SeeAlso: #01649,#01650,#01652

Bitfields for DOS 4.0-6.0 disk buffer flags:
Bit(s)	Description	(Table 01656)
 7	remote buffer
 6	buffer dirty
 5	buffer has been referenced (reserved in DOS 5+)
 4	search data buffer (only valid if remote buffer)
 3	sector in data area
 2	sector in a directory, either root or subdirectory
 1	sector in FAT
 0	reserved
SeeAlso: #01651

Format of DOS 5.0-6.0 disk buffer info:
Offset	Size	Description	(Table 01657)
 00h	DWORD	pointer to least-recently-used buffer header (may be in HMA)
		(see #01655)
 04h	WORD	number of dirty disk buffers
 06h	DWORD	pointer to lookahead buffer, zero if not present
 0Ah	WORD	number of lookahead sectors, else zero (the y in BUFFERS=x,y)
 0Ch	BYTE	buffer location
		00h base memory, no workspace buffer
		01h HMA, workspace buffer in base memory
 0Dh	DWORD	pointer to one-segment workspace buffer in base memory
 11h  3 BYTEs	unused
 14h	WORD	???
 16h	BYTE	flag: INT 24 fail while making an I/O status call
 17h	BYTE	temp storage for user memory allocation strategy during EXEC
 18h	BYTE	counter: number of INT 21 calls for which A20 is off
 19h	BYTE	bit flags
		bit 0: ???
		bit 1: SWITCHES=/W specified in CONFIG.SYS (don't load
			WINA20.SYS when MS Windows 3.0 starts)
		bit 2: in EXEC state (INT 21/AX=4B05h)
 1Ah	WORD	offset of unpack code start (used only during INT 21/AX=4B05h)
 1Ch	BYTE	bit 0 set iff UMB MCB chain linked to normal MCB chain
 1Dh	WORD	minimum paragraphs of memory required by program being EXECed
 1Fh	WORD	segment of first MCB in upper memory blocks or FFFFh if DOS
		  memory chain in base 640K only (first UMB MCB usually at
		  9FFFh, locking out video memory with a DOS-owned memory
		  block)
		the MCB this word points at contains a valid link into high
		  memory even if it is marked with a 'Z' indicating the last
		  memory block
 21h	WORD	paragraph from which to start scanning during memory allocation
SeeAlso: #01652,#01653

(Table 01658)
Call IFS utility function entry point with:
	AH = 20h miscellaneous functions
	    AL = 00h get date
		Return: CX = year
			DH = month
			DL = day
	    AL = 01h get process ID and computer ID
		Return: BX = current PSP segment
			DX = active network machine number
	    AL = 05h get file system info
		ES:DI -> 16-byte info buffer
		Return: buffer filled
			Offset	Size	Description
			 00h  2 BYTEs	unused
			 02h	WORD	number of SFTs (actually counts only
					the first two file table arrays)
			 04h	WORD	number of FCB table entries
			 06h	WORD	number of proctected FCBs
			 08h  6 BYTEs	unused
			 0Eh	WORD	largest sector size supported
	    AL = 06h get machine name
		ES:DI -> 18-byte buffer for name
		Return: buffer filled with name starting at offset 02h
	    AL = 08h get sharing retry count
		Return: BX = sharing retry count
	    AL = other
		Return: CF set
	AH = 21h get redirection state
		BH = type (03h disk, 04h printer)
		Return: BH = state (00h off, 01h on)
	AH = 22h ??? some sort of time calculation
		AL = 00h ???
		    nonzero ???
	AH = 23h ??? some sort of time calculation
	AH = 24h compare filenames
	    DS:SI -> first ASCIZ filename
	    ES:DI -> second ASCIZ filename
	    Return: ZF set if files are same ignoring case and / vs \
	AH = 25h normalize filename
	    DS:SI -> ASCIZ filename
	    ES:DI -> buffer for result
	    Return: filename uppercased, forward slashes changed to backslashes
	AH = 26h get DOS stack
	    Return: DS:SI -> top of stack
		    CX = size of stack in bytes
	AH = 27h increment InDOS flag
	AH = 28h decrement InDOS flag
Note:	IFS drivers which do not wish to implement functions 20h or 24h-28h may
	  pass them on to the default handler pointed at by [LoL+37h]
SeeAlso: #01659,#01660

Format of IFS driver list:
Offset	Size	Description	(Table 01659)
 00h	DWORD	pointer to next driver header
 04h  8 BYTEs	IFS driver name (blank padded), as used by FILESYS command
 0Ch  4 BYTEs	???
 10h	DWORD	pointer to IFS utility function entry point (see #01658)
		call with ES:BX -> IFS request (see #01660)
 14h	WORD	offset in header's segment of driver entry point
	???
SeeAlso: #01658,#01660

Format of IFS request block:
Offset	Size	Description	(Table 01660)
 00h	WORD	total size in bytes of request
 02h	BYTE	class of request
		02h ???
		03h redirection
		04h ???
		05h file access
		06h convert error code to string
		07h ???
 03h	WORD	returned DOS error code
 05h	BYTE	IFS driver exit status
		00h success
		01h ???
		02h ???
		03h ???
		04h ???
		FFh internal failure
 06h 16 BYTEs	???
---request class 02h---
 16h	BYTE	function code
		04h ???
 17h	BYTE	unused???
 18h	DWORD	pointer to ???
 1Ch	DWORD	pointer to ???
 20h  2 BYTEs	???
---request class 03h---
 16h	BYTE	function code
 17h	BYTE	???
 18h	DWORD	pointer to ???
 1Ch	DWORD	pointer to ???
 22h	WORD	returned ???
 24h	WORD	returned ???
 26h	WORD	returned ???
 28h	BYTE	returned ???
 29h	BYTE	unused???
---request class 04h---
 16h	DWORD	pointer to ???
 1Ah	DWORD	pointer to ???
---request class 05h---
 16h	BYTE	function code
		01h flush disk buffers
		02h get disk space
		03h MKDIR
		04h RMDIR
		05h CHDIR
		06h delete file
		07h rename file
		08h search directory
		09h file open/create
		0Ah LSEEK
		0Bh read from file
		0Ch write to file
		0Dh lock region of file
		0Eh commit/close file
		0Fh get/set file attributes
		10h printer control
		11h ???
		12h process termination
		13h ???
	---class 05h function 01h---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h  4 BYTEs	???
	 26h	BYTE	???
	 27h	BYTE	???
	---class 05h function 02h---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h  4 BYTEs	???
	 26h	WORD	returned total clusters
	 28h	WORD	returned sectors per cluster
	 2Ah	WORD	returned bytes per sector
	 2Ch	WORD	returned available clusters
	 2Eh	BYTE	returned ???
	 2Fh	BYTE	???
	---class 05h functions 03h,04h,05h---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h  4 BYTEs	???
	 26h	DWORD	pointer to directory name
	---class 05h function 06h---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h  4 BYTEs	???
	 26h	WORD	attribute mask
	 28h	DWORD	pointer to filename
	---class 05h function 07h---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h  4 BYTEs	???
	 26h	WORD	attribute mask
	 28h	DWORD	pointer to source filespec
	 2Ch	DWORD	pointer to destination filespec
	---class 05h function 08h---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h  4 BYTEs	???
	 26h	BYTE	00h FINDFIRST
			01h FINDNEXT
	 28h	DWORD	pointer to FindFirst search data + 01h if FINDNEXT
	 2Ch	WORD	search attribute if FINDFIRST
	 2Eh	DWORD	pointer to filespec if FINDFIRST
	---class 05h function 09h---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h	DWORD	pointer to IFS open file structure (see #01661)
	 26h	WORD	???  \ together, specify open vs. create, whether or
	 28h	WORD	???  / not to truncate
	 2Ah  4 BYTEs	???
	 2Eh	DWORD	pointer to filename
	 32h  4 BYTEs	???
	 36h	WORD	file attributes on call
			returned ???
	 38h	WORD	returned ???
	---class 05h function 0Ah---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h	DWORD	pointer to IFS open file structure (see #01661)
	 26h	BYTE	seek type (02h = from end)
	 28h	DWORD	offset on call
			returned new absolute position
	---class 05h functions 0Bh,0Ch---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h	DWORD	pointer to IFS open file structure (see #01661)
	 28h	WORD	number of bytes to transfer
			returned bytes actually transferred
	 2Ah	DWORD	transfer address
	---class 05h function 0Dh---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h	DWORD	pointer to IFS open file structure (see #01661)
	 26h	BYTE	file handle???
	 27h	BYTE	unused???
	 28h	WORD	???
	 2Ah	WORD	???
	 2Ch	WORD	???
	 2Eh	WORD	???
	---class 05h function 0Eh---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h	DWORD	pointer to IFS open file structure (see #01661)
	 26h	BYTE	00h commit file
			01h close file
	 27h	BYTE	unused???
	---class 05h function 0Fh---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h  4 BYTEs	???
	 26h	BYTE	02h GET attributes
			03h PUT attributes
	 27h	BYTE	unused???
	 28h 12 BYTEs	???
	 34h	WORD	search attributes???
	 36h	DWORD	pointer to filename
	 3Ah	WORD	(GET) returned ???
	 3Ch	WORD	(GET) returned ???
	 3Eh	WORD	(GET) returned ???
	 40h	WORD	(GET) returned ???
	 42h	WORD	(PUT) new attributes
			(GET) returned attributes
	---class 05h function 10h---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h	DWORD	pointer to IFS open file structure (see #01661)
	 26h	WORD	???
	 28h	DWORD	pointer to ???
	 2Ch	WORD	???
	 2Eh	BYTE	???
	 2Fh	BYTE	subfunction
			01h get printer setup
			03h ???
			04h ???
			05h ???
			06h ???
			07h ???
			21h set printer setup
	---class 05h function 11h---
	 17h  7 BYTEs	???
	 1Eh	DWORD	pointer to ???
	 22h	DWORD	pointer to IFS open file structure (see #01661)
	 26h	BYTE	subfunction
	 27h	BYTE	unused???
	 28h	WORD	???
	 2Ah	WORD	???
	 2Ch	WORD	???
	 2Eh	BYTE	???
	 2Fh	BYTE	???
	---class 05h function 12h---
	 17h 15 BYTEs	unused???
	 26h	WORD	PSP segment
	 28h	BYTE	type of process termination
	 29h	BYTE	unused???
	---class 05h function 13h---
	 17h 15 BYTEs	unused???
	 26h	WORD	PSP segment
---request class 06h---
 16h	DWORD	returned pointer to string corresponding to error code at 03h
 1Ah	BYTE	returned ???
 1Bh	BYTE	unused
---request class 07h---
 16h	DWORD	pointer to IFS open file structure (see #01661)
 1Ah	BYTE	???
 1Bh	BYTE	unused???
SeeAlso: #01659,#01658,#01661

Format of IFS open file structure:
Offset	Size	Description	(Table 01661)
 00h	WORD	???
 02h	WORD	device info word
 04h	WORD	file open mode
 06h	WORD	???
 08h	WORD	file attributes
 0Ah	WORD	owner's network machine number
 0Ch	WORD	owner's PSP segment
 0Eh	DWORD	file size
 12h	DWORD	current offset in file
 16h	WORD	file time
 18h	WORD	file date
 1Ah 11 BYTEs	filename in FCB format
 25h	WORD	???
 27h	WORD	hash value of SFT address
		(low word of linear address + segment&F000h)
 29h  3 WORDs	network info from SFT
 2Fh	WORD	???

Format of one item in DOS 4.0+ list of special program names:
Offset	Size	Description	(Table 01662)
 00h	BYTE	length of name (00h = end of list)
 01h  N BYTEs	name in format name.ext
 N    2 BYTEs	DOS version to return for program (major,minor)
		(see AH=30h,INT 2F/AX=122Fh)
---DOS 4 only---
 N+2	BYTE	number of times to return fake version number (FFh = always)
Note:	if the name of the executable for the program making the DOS "get
	  version" call matches one of the names in this list, DOS returns the
	  specified version rather than the true version number

Top
2153 - INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK TO DRIVE PARAM BLOCK
INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK TO DRIVE PARAM BLOCK
	AH = 53h
	DS:SI -> BIOS Parameter Block (see #01663)
	ES:BP -> buffer for Drive Parameter Block (see #01395 at AH=32h)
	    DBP drive byte must be set to valid drive (Windows95-OSR2)
	---Windows95---
	CX = signature 4558h ('EX') for FAT32 extended BPB/DPB (see #01664)
	DX = signature 4152h ('AR') for FAT32 extended BPB/DPB
Return: ES:BP buffer filled
Notes:	for DOS 3.0+, the cluster at which to start searching is set to 0000h
	  and the number of free clusters is set to FFFFh (unknown)
	if the number of sectors per cluster is set to zero, MS-DOS will hang
	  at startup because it computes the internally-used shift count by
	  shifting this value right until the carry flag is set; since this
	  will never happen when the field is zero, MS-DOS hangs
	not supported by Windows NT 3.1

Format of BIOS Parameter Block:
Offset	Size	Description	(Table 01663)
 00h	WORD	number of bytes per sector
 02h	BYTE	number of sectors per cluster
 03h	WORD	number of reserved sectors at start of disk
 05h	BYTE	number of FATs
 06h	WORD	number of entries in root directory
 08h	WORD	total number of sectors
		for DOS 4.0+, set to zero if partition >32M, then set DWORD at
		  15h to actual number of sectors
 0Ah	BYTE	media ID byte (see #01356)
 0Bh	WORD	number of sectors per FAT
---DOS 2.13---
 0Dh	WORD	number of sectors per track
 0Fh	WORD	number of heads
 11h	WORD	number of hidden sectors
---DOS 3.0+ ---
 0Dh	WORD	number of sectors per track
 0Fh	WORD	number of heads
 11h	DWORD	number of hidden sectors
 15h 11 BYTEs	reserved
---DOS 4.0+ ---
 15h	DWORD	total number of sectors if word at 08h contains zero
 19h  6 BYTEs	???
 1Fh	WORD	number of cylinders
 21h	BYTE	device type
 22h	WORD	device attributes (removable or not, etc)
---DR DOS 5+ ---
 15h	DWORD	total number of sectors if word at 08h contains zero
 19h  6 BYTEs	reserved
---European MS-DOS 4.00---
 15h	DWORD	total number of sectors if word at 08h contains zero
		(however, this DOS does not actually implement >32M partitions)
SeeAlso: #01395,#01664

Format of Extended BIOS Parameter Block:
Offset	Size	Description	(Table 01664)
 00h 25 BYTEs	same as standard DOS 4-6 BPB (see #01663)
 19h	DWORD	sectors per FAT if WORD at 0Bh is 0000h
 1Dh	WORD	extended flags
		bit 7: do not mirror active FAT to inactive FATs
		bits 6-4: reserved (0)
		bits 3-0: the 0-based FAT number of the active FAT
		    (if mirroring disabled)
 1Fh	WORD	file system version (high byte=major, low byte=minor)
		0000h = Win95-OSR2
 21h	DWORD	starting cluster number of root directory
 25h	WORD	file system information sector number (see also #01788)
		FFFFh if none
 27h	WORD	sector number of backup boot sector (FFFFh if none)
 29h  6 WORDs	reserved
SeeAlso: #01560,#01787

Top
2154 - INT 21 - DOS 2+ - GET VERIFY FLAG
INT 21 - DOS 2+ - GET VERIFY FLAG
	AH = 54h
Return: AL = verify flag
	    00h off
	    01h on (all disk writes verified after writing)
SeeAlso: AH=2Eh

Top
2155 - INT 21 - DOS 2+ internal - CREATE CHILD PSP
INT 21 - DOS 2+ internal - CREATE CHILD PSP
	AH = 55h
	DX = segment at which to create new PSP
	SI = (DOS 3.0+) value to place in memory size field at DX:[0002h]
Return: AL destroyed
Notes:	creates a "child" PSP rather than making an exact copy of the current
	  PSP; the new PSP's parent pointer is set to the current PSP and the
	  reference count for each inherited file is incremented
	(DOS 2.0+) sets current PSP to DX
	(DOS 3.0+) marks "no inherit" file handles as closed in child PSP
	this function is implemented using the same code as AH=26h, so unlike
	  other DOS 2+ functions, it does not return status in CF, instead
	  returning status in AL as DOS 1.x functions do (but it never puts an
	  explicit return value in AL)
SeeAlso: AH=26h,AH=50h

Top
2156 - INT 21 - DOS 2+ - "RENAME" - RENAME FILE
INT 21 - DOS 2+ - "RENAME" - RENAME FILE
	AH = 56h
	DS:DX -> ASCIZ filename of existing file (no wildcards, but see below)
	ES:DI -> ASCIZ new filename (no wildcards)
	CL = attribute mask (server call only, see below)
Return: CF clear if successful
	CF set on error
	    AX = error code (02h,03h,05h,11h) (see #01680)
Notes:	allows move between directories on same logical volume
	this function does not set the archive attribute
	  (see #01420 at AX=4301h), which results in incremental backups not
	  backing up the file under its new name
	open files should not be renamed
	(DOS 2.x only) this function renames file by creating a new directory
	  entry with the new name, then marking the old entry deleted
	(DOS 3.0+) allows renaming of directories
	(DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
	  error 12h (no more files) is returned on success, and both source and
	  destination specs must be canonical (as returned by AH=60h).
	  Wildcards in the destination are replaced by the corresponding char
	  of each source file being renamed.  Under DOS 3.x, the call will fail
	  if the destination wildcard is *.* or equivalent; under DR DOS 5.0,
	  the call will fail with error code 03h if any wildcards are used.
	  When invoked via AX=5D00h, only those files matching the attribute
	  mask in CL are renamed.
	under the FlashTek X-32 DOS extender, the old-name pointer is in DS:EDX
	  and the new-name pointer is in ES:EDI (DS must equal ES)
BUG:	(DR DOS 3.41) when invoked via AX=5D00h, this function will generate
	  a new directory entry with the new name (including any wildcards)
	  which can only be removed with a sector editor
SeeAlso: AH=17h,AX=4301h,AX=43FFh/BP=5053h,AX=5D00h,AH=60h,AX=7156h
SeeAlso: AX=F257h/SF=04h

Top
215700 - INT 21 - DOS 2+ - GET FILE'S LAST-WRITTEN DATE AND TIME
INT 21 - DOS 2+ - GET FILE'S LAST-WRITTEN DATE AND TIME
	AX = 5700h
	BX = file handle
Return: CF clear if successful
	    CX = file's time (see #01665)
	    DX = file's date (see #01666)
	CF set on error
	    AX = error code (01h,06h) (see #01680)
Note:	under DR DOS 3.41 and 5.0, this function returns 0 (no date/time) for
	  character devices; MS-DOS returns date and time of opening
SeeAlso: AX=5701h,AX=5704h"Windows95"

Bitfields for file time:
Bit(s)	Description	(Table 01665)
 15-11	hours (0-23)
 10-5	minutes
 4-0	seconds/2

Bitfields for file date:
Bit(s)	Description	(Table 01666)
 15-9	year - 1980
 8-5	month
 4-0	day

Top
215701 - INT 21 - DOS 2+ - SET FILE'S LAST-WRITTEN DATE AND TIME
INT 21 - DOS 2+ - SET FILE'S LAST-WRITTEN DATE AND TIME
	AX = 5701h
	BX = file handle
	CX = new time (see #01665)
	DX = new date (see #01666)
Return: CF clear if successful
	CF set on error
	    AX = error code (01h,06h) (see #01680)
SeeAlso: AX=5700h,AX=5705h"Windows95",AX=5707h"Windows95"

Top
215702 - INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTES FOR FILE
INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTES FOR FILE
	AX = 5702h
	BX = file handle
	CX = size of result buffer or 0000h
	DS:SI -> EAP list (see #01667)
	ES:DI -> buffer for returned EAV list (see #01670)
Return: CF clear if successful
	    CX = size of returned data
	CF set on error
	    AX = error code (see #01680)
Desc:	get the current value of one or more extended attributes
Notes:	if CX=0000h on entry, ES:DI is ignored and no data is actually
	  returned, only the amount of data which is available
	the default DOS 4 behavior is to return a single word of 0000h (no
	  structures) in the result buffer if CX>=0002h on entry; this
	  functionality was apparently never released to the public
SeeAlso: AX=5703h,AX=5704h,AH=6Eh,INT 2F/AX=112Dh

Format of EAP (extended attribute properties) list:
Offset	Size	Description	(Table 01667)
 00h	WORD	number of EAP structures following
 02h	var	array of EAP structures (see #01668)
SeeAlso: #01670

Format of EAP (extended attribute property) structure:
Offset	Size	Description	(Table 01668)
 00h	BYTE	attribute type
		01h boolean (either 00h or 01h)
		02h number (BYTE, WORD, or DWORD)
		03h string
		04h date stamp
		05h time stamp
 01h	WORD	EAP flags (see #01669)
 03h	BYTE	size of reference string (name)
 04h  N BYTEs	reference string

Bitfields for EAP flags:
Bit(s)	Description	(Table 01669)
 12	unchangeable
 13	ignore
 14	unchangeable
 15	used by COMMAND.COM for code page, but not understood by ATTRIB

Format of EAV (extended attribute value) list:
Offset	Size	Description	(Table 01670)
 00h	WORD	number of EAV structures following
 02h	var	array of Extended Attribute Value structures (see #01671)
SeeAlso: #01667

Format of Extended Attribute Value structures:
Offset	Size	Description	(Table 01671)
 00h  4 BYTEs	???
 04h	BYTE	size of reference string
 05h	WORD	size of value
 07h	var	reference string
	var	value

Top
215703 - INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTE PROPERTIES
INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTE PROPERTIES
	AX = 5703h
	BX = file handle
	CX = size of result buffer or 0000h
	ES:DI -> result buffer
Return: CF clear if successful
	    CX = size of returned data
	CF set on error
	    AX = error code (see #01680)
	ES:DI -> zero word (DOS 4.0) if CX >= 2 on entry
Desc:	get a list of the extended attributes which are defined for the
	  specified file
Notes:	if CX=0000h on entry, ES:DI is ignored and no data is actually
	  returned, only the amount of data which is available
	the default DOS 4 behavior is to return a trivial EAP list consisting
	  of the single word 0000h (no EAP structures) if CX>=0002h on entry;
	  this functionality was apparently never released to the public
SeeAlso: AX=5702h,AX=5704h,AH=6Eh,INT 2F/AX=112Dh

Top
215704 - INT 21 - DOS 4.x only - SET EXTENDED ATTRIBUTES
INT 21 - DOS 4.x only - SET EXTENDED ATTRIBUTES
	AX = 5704h
	BX = file handle
	ES:DI -> EAV list (see #01670)
Return: CF clear if successful
	CF set on error
	    AX = error code (see #01680)
Note:	the default DOS 4 behavior is to do nothing and return successfully;
	  this functionality was apparently never released to the public
SeeAlso: AX=5702h,AX=5703h,INT 2F/AX=112Dh

Top
215704 - INT 21 - MS-DOS 7/Windows95 - GET LAST ACCESS DATE AND TIME
INT 21 - MS-DOS 7/Windows95 - GET LAST ACCESS DATE AND TIME
	AX = 5704h
	BX = file handle
Return: CF clear if successful
	    DX = last access date (see #01666)
	    CX = last access time (currently always 0000h)
	CF set on error
	    AX = error code
SeeAlso: AX=5701h,AX=5705h,AX=5706h

Top
215705 - INT 21 - MS-DOS 7/Windows95 - SET LAST ACCESS DATE AND TIME
INT 21 - MS-DOS 7/Windows95 - SET LAST ACCESS DATE AND TIME
	AX = 5705h
	BX = file handle
	CX = new last-access time (currently not supported, must be 0000h)
	DX = new last-access date (see #01666)
Return: CF clear if successful
	CF set on error
	    AX = error code
SeeAlso: AX=5700h,AX=5704h"Windows95",AX=5707h

Top
215706 - INT 21 - MS-DOS 7/Windows95 - GET CREATION DATE AND TIME
INT 21 - MS-DOS 7/Windows95 - GET CREATION DATE AND TIME
	AX = 5706h
	BX = file handle
Return: CF clear if successful
	    CX = creation time (see #01665)
	    DX = creation date (see #01666)
	    SI = number of 10-millisecond units past time in CX (0-199)
	CF set on error
	    AX = error code
SeeAlso: AX=5701h,AX=5704h"Windows95",AX=5707h

Top
215707 - INT 21 - MS-DOS 7/Windows95 - SET CREATION DATE AND TIME
INT 21 - MS-DOS 7/Windows95 - SET CREATION DATE AND TIME
	AX = 5707h
	BX = file handle
	CX = new creation time (see #01665)
	DX = new creation date (see #01666)
	SI = new creation time: 10-millisecond units past time in CX (0-199)
Return: CF clear if successful
	CF set on error
	    AX = error code
SeeAlso: AX=5700h,AX=5705h,AX=5706h

Top
2158 - INT 21 - DOS 2.11+ - GET OR SET MEMORY ALLOCATION STRATEGY
INT 21 - DOS 2.11+ - GET OR SET MEMORY ALLOCATION STRATEGY
	AH = 58h
	AL = subfunction
	    00h get allocation strategy
		Return: AX = current strategy (see #01679)
	    01h set allocation strategy
		BL = new allocation strategy (see #01679)
		BH = 00h (DOS 5+)
Return: CF clear if successful
	CF set on error
	    AX = error code (01h) (see #01680)
Notes:	the Set subfunction accepts any value in BL for DOS 3.x and 4.x;
	  2 or greater means last fit
	the Get subfunction returns the last value set
	setting an allocation strategy involving high memory does not
	  automatically link in the UMB memory chain; this must be done
	  explicitly with AX=5803h in order to actually allocate high memory
	a program which changes the allocation strategy should restore it
	  before terminating
	Toshiba MS-DOS v2.11 supports subfunctions 00h and 01h, as does the
	  TI Professional MS-DOS v2.13
	DR DOS 3.41 reportedly reverses subfunctions 00h and 01h
SeeAlso: AH=48h,AH=49h,AH=4Ah,INT 2F/AX=4310h"XMS",INT 67/AH=3Fh

(Table 01679)
Values for DOS memory allocation strategy:
 00h low memory first fit
 01h low memory best fit
 02h low memory last fit
---DOS 5+ ---
 40h high memory first fit
 41h high memory best fit
 42h high memory last fit
 80h first fit, try high then low memory
 81h best fit, try high then low memory
 82h last fit, try high then low memory

Top
2158 - INT 21 - DOS 5+ - GET OR SET UMB LINK STATE
INT 21 - DOS 5+ - GET OR SET UMB LINK STATE
	AH = 58h
	AL = subfunction
	    02h get UMB link state
		Return: AL = current link state
			    00h UMBs not part of DOS memory chain
			    01h UMBs in DOS memory chain
	    03h set UMB link state
		BX = new link state
		    0000h remove UMBs from DOS memory chain
		    0001h add UMBs to DOS memory chain
Return: CF clear if successful
	CF set on error
	    AX = error code (01h) (see #01680)
Notes:	a program which changes the UMB link state should restore it before
	  terminating
	UMBs will only be available if CONFIG.SYS contains the line DOS=UMB,
	  the UMBs have been linked into the memory chain with AX=5803h, and
	  the allocation strategy has been set to include high memory with
	  AX=5801h
SeeAlso: #01687,#02766 at INT 2F/AX=4310h

Top
2159--BX0000 - INT 21 - DOS 3.0+ - GET EXTENDED ERROR INFORMATION
INT 21 - DOS 3.0+ - GET EXTENDED ERROR INFORMATION
	AH = 59h
	BX = 0000h
Return: AX = extended error code (see #01680)
	BH = error class (see #01682)
	BL = recommended action (see #01683)
	CH = error locus (see #01684)
	ES:DI may be pointer (see #01681, #01680)
	CL, DX, SI, BP, and DS destroyed
Notes:	functions available under DOS 2.x map the true DOS 3.0+ error code into
	  one supported under DOS 2.x
	you should call this function to retrieve the true error code when an
	  FCB or DOS 2.x call returns an error
	under DR DOS 5.0, this function does not use any of the DOS-internal
	  stacks and may thus be called at any time
SeeAlso: AH=59h/BX=0001h,AX=5D0Ah,INT 2F/AX=122Dh,INT 24

(Table 01680)
Values for DOS extended error code:
---DOS 2.0+ ---
 00h (0)   no error
 01h (1)   function number invalid
 02h (2)   file not found
 03h (3)   path not found
 04h (4)   too many open files (no handles available)
 05h (5)   access denied
 06h (6)   invalid handle
 07h (7)   memory control block destroyed
 08h (8)   insufficient memory
 09h (9)   memory block address invalid
 0Ah (10)  environment invalid (usually >32K in length)
 0Bh (11)  format invalid
 0Ch (12)  access code invalid
 0Dh (13)  data invalid
 0Eh (14)  reserved
 0Eh (14)  (PTS-DOS 6.51+, S/DOS 1.0+) fixup overflow
 0Fh (15)  invalid drive
 10h (16)  attempted to remove current directory
 11h (17)  not same device
 12h (18)  no more files
---DOS 3.0+ (INT 24 errors)---
 13h (19)  disk write-protected
 14h (20)  unknown unit
 15h (21)  drive not ready
 16h (22)  unknown command
 17h (23)  data error (CRC)
 18h (24)  bad request structure length
 19h (25)  seek error
 1Ah (26)  unknown media type (non-DOS disk)
 1Bh (27)  sector not found
 1Ch (28)  printer out of paper
 1Dh (29)  write fault
 1Eh (30)  read fault
 1Fh (31)  general failure
 20h (32)  sharing violation
 21h (33)  lock violation
 22h (34)  disk change invalid (ES:DI -> media ID structure)(see #01681)
 23h (35)  FCB unavailable
 23h (35)  (PTS-DOS 6.51+, S/DOS 1.0+) bad FAT
 24h (36)  sharing buffer overflow
 25h (37)  (DOS 4.0+) code page mismatch
 26h (38)  (DOS 4.0+) cannot complete file operation (EOF / out of input)
 27h (39)  (DOS 4.0+) insufficient disk space
 28h-31h   reserved
---OEM network errors (INT 24)---
 32h (50)  network request not supported
 33h (51)  remote computer not listening
 34h (52)  duplicate name on network
 35h (53)  network name not found
 36h (54)  network busy
 37h (55)  network device no longer exists
 38h (56)  network BIOS command limit exceeded
 39h (57)  network adapter hardware error
 3Ah (58)  incorrect response from network
 3Bh (59)  unexpected network error
 3Ch (60)  incompatible remote adapter
 3Dh (61)  print queue full
 3Eh (62)  queue not full
 3Fh (63)  not enough space to print file
 40h (64)  network name was deleted
 41h (65)  network: Access denied
	  (DOS 3.0+ [maybe 3.3+???]) codepage switching not possible
	    (see also INT 21/AX=6602h,INT 2F/AX=AD42h)
 42h (66)  network device type incorrect
 43h (67)  network name not found
 44h (68)  network name limit exceeded
 45h (69)  network BIOS session limit exceeded
 46h (70)  temporarily paused
 47h (71)  network request not accepted
 48h (72)  network print/disk redirection paused
 49h (73)  network software not installed
	    (LANtastic) invalid network version
 4Ah (74)  unexpected adapter close
	    (LANtastic) account expired
 4Bh (75)  (LANtastic) password expired
 4Ch (76)  (LANtastic) login attempt invalid at this time
 4Dh (77)  (LANtastic v3+) disk limit exceeded on network node
 4Eh (78)  (LANtastic v3+) not logged in to network node
 4Fh (79)  reserved
---end of errors reportable via INT 24---
 50h (80)  file exists
 51h (81)  (undoc) duplicated FCB
 52h (82)  cannot make directory
 53h (83)  fail on INT 24h
---network-related errors (non-INT 24)---
 54h (84)  (DOS 3.3+) too many redirections / out of structures
 55h (85)  (DOS 3.3+) duplicate redirection / already assigned
 56h (86)  (DOS 3.3+) invalid password
 57h (87)  (DOS 3.3+) invalid parameter
 58h (88)  (DOS 3.3+) network write fault
 59h (89)  (DOS 4.0+) function not supported on network / no process slots
	      available
 5Ah (90)  (DOS 4.0+) required system component not installed / not frozen
 5Bh (91)  (DOS 4.0+,NetWare4) timer server table overflowed
 5Ch (92)  (DOS 4.0+,NetWare4) duplicate in timer service table
 5Dh (93)  (DOS 4.0+,NetWare4) no items to work on
 5Fh (95)  (DOS 4.0+,NetWare4) interrupted / invalid system call
 64h (100) (MSCDEX) unknown error
 64h (100) (DOS 4.0+,NetWare4) open semaphore limit exceeded
 65h (101) (MSCDEX) not ready
 65h (101) (DOS 4.0+,NetWare4) exclusive semaphore is already owned
 66h (102) (MSCDEX) EMS memory no longer valid
 66h (102) (DOS 4.0+,NetWare4) semaphore was set when close attempted
 67h (103) (MSCDEX) not High Sierra or ISO-9660 format
 67h (103) (DOS 4.0+,NetWare4) too many exclusive semaphore requests
 68h (104) (MSCDEX) door open
 68h (104) (DOS 4.0+,NetWare4) operation invalid from interrupt handler
 69h (105) (DOS 4.0+,NetWare4) semaphore owner died
 6Ah (106) (DOS 4.0+,NetWare4) semaphore limit exceeded
 6Bh (107) (DOS 4.0+,NetWare4) insert drive B: disk into A: / disk changed
 6Ch (108) (DOS 4.0+,NetWare4) drive locked by another process
 6Dh (109) (DOS 4.0+,NetWare4) broken pipe
 6Eh (110) (DOS 5.0+,NetWare4) pipe open/create failed
 6Fh (111) (DOS 5.0+,NetWare4) pipe buffer overflowed
 70h (112) (DOS 5.0+,NetWare4) disk full
 71h (113) (DOS 5.0+,NetWare4) no more search handles
 72h (114) (DOS 5.0+,NetWare4) invalid target handle for dup2
 73h (115) (DOS 5.0+,NetWare4) bad user virtual address / protection violation
 74h (116) (DOS 5.0+) VIOKBD request
 74h (116) (NetWare4) error on console I/O
 75h (117) (DOS 5.0+,NetWare4) unknown category code for IOCTL
 76h (118) (DOS 5.0+,NetWare4) invalid value for verify flag
 77h (119) (DOS 5.0+,NetWare4) level four driver not found by DOS IOCTL
 78h (120) (DOS 5.0+,NetWare4) invalid / unimplemented function number
 79h (121) (DOS 5.0+,NetWare4) semaphore timeout
 7Ah (122) (DOS 5.0+,NetWare4) buffer too small to hold return data
 7Bh (123) (DOS 5.0+,NetWare4) invalid character or bad file-system name
 7Ch (124) (DOS 5.0+,NetWare4) unimplemented information level
 7Dh (125) (DOS 5.0+,NetWare4) no volume label found
 7Eh (126) (DOS 5.0+,NetWare4) module handle not found
 7Fh (127) (DOS 5.0+,NetWare4) procedure address not found
 80h (128) (DOS 5.0+,NetWare4) CWait found no children
 81h (129) (DOS 5.0+,NetWare4) CWait children still running
 82h (130) (DOS 5.0+,NetWare4) invalid operation for direct disk-access handle
 83h (131) (DOS 5.0+,NetWare4) attempted seek to negative offset
 84h (132) (DOS 5.0+,NetWare4) attempted to seek on device or pipe
---JOIN/SUBST errors---
 85h (133) (DOS 5.0+,NetWare4) drive already has JOINed drives
 86h (134) (DOS 5.0+,NetWare4) drive is already JOINed
 87h (135) (DOS 5.0+,NetWare4) drive is already SUBSTed
 88h (136) (DOS 5.0+,NetWare4) can not delete drive which is not JOINed
 89h (137) (DOS 5.0+,NetWare4) can not delete drive which is not SUBSTed
 8Ah (138) (DOS 5.0+,NetWare4) can not JOIN to a JOINed drive
 8Bh (139) (DOS 5.0+,NetWare4) can not SUBST to a SUBSTed drive
 8Ch (140) (DOS 5.0+,NetWare4) can not JOIN to a SUBSTed drive
 8Dh (141) (DOS 5.0+,NetWare4) can not SUBST to a JOINed drive
 8Eh (142) (DOS 5.0+,NetWare4) drive is busy
 8Fh (143) (DOS 5.0+,NetWare4) can not JOIN/SUBST to same drive
 90h (144) (DOS 5.0+,NetWare4) directory must not be root directory
 91h (145) (DOS 5.0+,NetWare4) can only JOIN to empty directory
 92h (146) (DOS 5.0+,NetWare4) path is already in use for SUBST
 93h (147) (DOS 5.0+,NetWare4) path is already in use for JOIN
 94h (148) (DOS 5.0+,NetWare4) path is in use by another process
 95h (149) (DOS 5.0+,NetWare4) directory previously SUBSTituted
 96h (150) (DOS 5.0+,NetWare4) system trace error
 97h (151) (DOS 5.0+,NetWare4) invalid event count for DosMuxSemWait
 98h (152) (DOS 5.0+,NetWare4) too many waiting on mutex
 99h (153) (DOS 5.0+,NetWare4) invalid list format
 9Ah (154) (DOS 5.0+,NetWare4) volume label too large
 9Bh (155) (DOS 5.0+,NetWare4) unable to create another TCB
 9Ch (156) (DOS 5.0+,NetWare4) signal refused
 9Dh (157) (DOS 5.0+,NetWare4) segment discarded
 9Eh (158) (DOS 5.0+,NetWare4) segment not locked
 9Fh (159) (DOS 5.0+,NetWare4) invalid thread-ID address
-----
 A0h (160) (DOS 5.0+) bad arguments
 A0h (160) (NetWare4) bad environment pointer
 A1h (161) (DOS 5.0+,NetWare4) invalid pathname passed to EXEC
 A2h (162) (DOS 5.0+,NetWare4) signal already pending
 A3h (163) (DOS 5.0+) uncertain media
 A3h (163) (NetWare4) ERROR_124 mapping
 A4h (164) (DOS 5.0+) maximum number of threads reached
 A4h (164) (NetWare4) no more process slots
 A5h (165) (NetWare4) ERROR_124 mapping
 B0h (176) (MS-DOS 7.0) volume is not locked
 B1h (177) (MS-DOS 7.0) volume is locked in drive
 B2h (178) (MS-DOS 7.0) volume is not removable
 B4h (180) (MS-DOS 7.0) lock count has been exceeded
 B4h (180) (NetWare4) invalid segment number
 B5h (181) (MS-DOS 7.0) a valid eject request failed
 B5h (181) (DOS 5.0-6.0,NetWare4) invalid call gate
 B6h (182) (DOS 5.0+,NetWare4) invalid ordinal
 B7h (183) (DOS 5.0+,NetWare4) shared segment already exists
 B8h (184) (DOS 5.0+,NetWare4) no child process to wait for
 B9h (185) (DOS 5.0+,NetWare4) NoWait specified and child still running
 BAh (186) (DOS 5.0+,NetWare4) invalid flag number
 BBh (187) (DOS 5.0+,NetWare4) semaphore does not exist
 BCh (188) (DOS 5.0+,NetWare4) invalid starting code segment
 BDh (189) (DOS 5.0+,NetWare4) invalid stack segment
 BEh (190) (DOS 5.0+,NetWare4) invalid module type (DLL can not be used as
	      application)
 BFh (191) (DOS 5.0+,NetWare4) invalid EXE signature
 C0h (192) (DOS 5.0+,NetWare4) EXE marked invalid
 C1h (193) (DOS 5.0+,NetWare4) bad EXE format (e.g. DOS-mode program)
 C2h (194) (DOS 5.0+,NetWare4) iterated data exceeds 64K
 C3h (195) (DOS 5.0+,NetWare4) invalid minimum allocation size
 C4h (196) (DOS 5.0+,NetWare4) dynamic link from invalid Ring
 C5h (197) (DOS 5.0+,NetWare4) IOPL not enabled
 C6h (198) (DOS 5.0+,NetWare4) invalid segment descriptor privilege level
 C7h (199) (DOS 5.0+,NetWare4) automatic data segment exceeds 64K
 C8h (200) (DOS 5.0+,NetWare4) Ring2 segment must be moveable
 C9h (201) (DOS 5.0+,NetWare4) relocation chain exceeds segment limit
 CAh (202) (DOS 5.0+,NetWare4) infinite loop in relocation chain
 CBh (203) (NetWare4) environment variable not found
 CCh (204) (NetWare4) not current country
 CDh (205) (NetWare4) no signal sent
 CEh (206) (NetWare4) file name not 8.3
 CFh (207) (NetWare4) Ring2 stack in use
 D0h (208) (NetWare4) meta expansion is too long
 D1h (209) (NetWare4) invalid signal number
 D2h (210) (NetWare4) inactive thread
 D3h (211) (NetWare4) file system information not available
 D4h (212) (NetWare4) locked error
 D5h (213) (NetWare4) attempted to execute non-family API call in DOS mode
 D6h (214) (NetWare4) too many modules
 D7h (215) (NetWare4) nesting not allowed
 E6h (230) (NetWare4) non-existent pipe, or bad operation
 E7h (231) (NetWare4) pipe is busy
 E8h (232) (NetWare4) no data available for nonblocking read
 E9h (233) (NetWare4) pipe disconnected by server
 EAh (234) (NetWare4) more data available
 FFh (255) (NetWare4) invalid drive
Note:	there is a report that some Microsoft documentation shifts all DOS
	  error codes in the range BCh (188) through CAh (202) up by one
	  compared to what is listed here; that is probably a documentation
	  error
SeeAlso: #01682,#01683,#01684,#01961

Format of media ID structure:
Offset	Size	Description	(Table 01681)
 00h 12 BYTEs	ASCIZ volume label of required disk
 0Ch	DWORD	serial number (DOS 4.0+)
SeeAlso: #01680

(Table 01682)
Values for DOS Error Class:
 01h (1)  out of resource (storage space or I/O channels)
 02h (2)  temporary situation (file or record lock)
 03h (3)  authorization / permission problem (denied access)
 04h (4)  internal system error (system software bug)
 05h (5)  hardware failure
 06h (6)  system failure (configuration file missing or incorrect)
 07h (7)  application program error
 08h (8)  not found
 09h (9)  bad format
 0Ah (10) locked
 0Bh (11) media error
 0Ch (12) already exists / collision with existing item
 0Dh (13) unknown / other
 0Eh (14) (undoc) cannot
 0Fh (15) (undoc) time
SeeAlso: #01680,#01683,#01684

(Table 01683)
Values for DOS Suggested Action:
 01h	retry
 02h	delayed retry (after pause)
 03h	prompt user to reenter input
 04h	abort after cleanup
 05h	immediate abort ("panic")
 06h	ignore
 07h	retry after user intervention
SeeAlso: #01680,#01682,#01684

(Table 01684)
Values for DOS Error Locus:
 01h	unknown or not appropriate
 02h	block device (disk error)
 03h	network related
 04h	serial device (timeout)
 04h	(PTS-DOS 6.51+ & S/DOS 1.0+) character device
 05h	memory related
SeeAlso: #01680,#01682,#01683

Top
2159--BX0001 - INT 21 - European MS-DOS 4.0 - GET HARD ERROR INFORMATION
INT 21 - European MS-DOS 4.0 - GET HARD ERROR INFORMATION
	AH = 59h
	BX = 0001h
Return: ES:DI -> hard error information packet (see #01685) for most recent
		hard (critical) error
SeeAlso: AH=59h/BX=0000h,AH=95h,INT 24

Format of European MS-DOS 4.0 hard error information packet:
Offset	Size	Description	(Table 01685)
 00h	WORD	contents of AX at system entry
 02h	WORD	Process ID which encountered error
 04h	WORD	contents of AX at time of error
 06h	BYTE	error type
		00h physical I/O error
		01h disk change request
		02h file sharing violation
		03h FCB problem
		04h file locking violation
		05h bad FAT
		06h network detected error
 07h	BYTE	INT 24 error code
 08h	WORD	extended error code (see #01680)
 0Ah	DWORD	pointer to associated device

Top
215A - INT 21 - DOS 3.0+ - CREATE TEMPORARY FILE
INT 21 - DOS 3.0+ - CREATE TEMPORARY FILE
	AH = 5Ah
	CX = file attribute (see #01420 at AX=4301h)
	DS:DX -> ASCIZ path ending with a '\' + 13 zero bytes to receive the
		generated filename
Return: CF clear if successful
	    AX = file handle opened for read/write in compatibility mode
	    DS:DX pathname extended with generated name for temporary file
	CF set on error
	    AX = error code (03h,04h,05h) (see #01680)
Desc:	creates a file with a unique name which must be explicitly deleted
Notes:	under the FlashTek X-32 DOS extender, the path pointer is in DS:EDX
	MS-DOS 3.0-4.0 and DR DOS 3.4-5.0 generate the filename as a sequence
	  of hex digits based on the current date and time; MS-DOS 6+,
	  DR DOS 6, and Novell DOS 7 use letters A-P in place of hex digits
	MS-DOS 5.0 and DR DOS 3.41/5.0 will insert a missing trailing backslash
	  before appending the generated filename, but due to this, an empty
	  string results in a file in the root directory
BUGS:	COMPAQ DOS 3.31 hangs if the pathname is at XXXXh:0000h; it apparently
	  wraps around to the end of the segment
	MS-DOS 5.00 revisions A and B and PC-DOS 5.00 revision A reportedly
	  hang the system if the specified path is the root directory and the
	  root directory is full (no free directory entries)
	Mark Incley <mincley@krisalis.demon.co.uk> reports that this function
	  hangs in MS-DOS 6.2x if the name includes two consecutive path
	  separators (e.g. C:\\ )
SeeAlso: AH=3Ch,AH=5Bh

Top
215B - INT 21 - DOS 3.0+ - CREATE NEW FILE
INT 21 - DOS 3.0+ - CREATE NEW FILE
	AH = 5Bh
	CX = file attribute (see #01420 at AX=4301h)
	DS:DX -> ASCIZ filename
Return: CF clear if successful
	    AX = file handle opened for read/write in compatibility mode
	CF set on error
	    AX = error code (03h,04h,05h,50h) (see #01680)
Notes:	unlike AH=3Ch, this function will fail if the specified file exists
	  rather than truncating it; this permits its use in creating semaphore
	  files because it is an atomic "test and set" operation
	under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
SeeAlso: AH=3Ch,AH=5Ah

Top
215C - INT 21 - DOS 3.0+ - "FLOCK" - RECORD LOCKING
INT 21 - DOS 3.0+ - "FLOCK" - RECORD LOCKING
	AH = 5Ch
	AL = subfunction
	    00h lock region of file
	    01h unlock region of file
	BX = file handle
	CX:DX = start offset of region within file
	SI:DI = length of region in bytes
Return: CF clear if successful
	CF set on error
	    AX = error code (01h,06h,21h,24h) (see #01680)
Notes:	error returned unless SHARE or network installed
	an unlock call must specify the same region as some prior lock call
	locked regions become entirely inaccessible to other processes
	duplicate handles created with AH=45h or AH=46h inherit locks, but
	  handles inherited by child processes (see AH=4Bh) do not
	under DR DOS 3.41 and 5.0, if a process opens a file without the no-
	  inherit flag and then starts a child, any locks set by the parent
	  are ignored, and the child will only get an error if it tries to
	  lock an area previously locked by the parent process.	 Under Novell
	  DOS 7, this function is fully supported as in MS-DOS.
SeeAlso: AX=440Bh,AH=BCh,AH=BEh,INT 2F/AX=110Ah,INT 2F/AX=110Bh

Top
215D00 - INT 21 U - DOS 3.1+ internal - SERVER FUNCTION CALL
INT 21 U - DOS 3.1+ internal - SERVER FUNCTION CALL
	AX = 5D00h
	DS:DX -> DOS parameter list (see #01686)
	DPL contains all register values for a call to INT 21h
Return: as appropriate for function being called
Notes:	does not check AH.  Out of range values will crash the system
	executes using specified computer ID and process ID
	sharing delay loops skipped
	a special sharing mode is enabled to handle FCBs opened across network
	wildcards are enabled for DELETE (AH=41h) and RENAME (AH=56h) under
	  MS-DOS; under DR DOS 3.41, wildcards corrupt the filesystem; and
	  under DR DOS 5.0-6.0, the call returns error code 03h due to improper
	  support for the server function call (refer to BUGS: section below)
	an extra file attribute parameter is enabled for OPEN (AH=3Dh),
	  DELETE (AH=41h), and RENAME (AH=56h)
	functions which take filenames require canonical names (as returned
	  by AH=60h); this is apparently to prevent multi-hop file forwarding
BUGS:	the OS/2 2.0 DOS Boot Session incorrectly maps DOS drive letters,
	  seemingly ignoring HPFS drives
	DR DOS 5.0-6.0 merely recursively call INT 21 after loading the
	  registers from the DPL, leading to problems for peer-to-peer
	  networks
SeeAlso: AH=3Dh,AH=41h,AH=56h,AH=60h

Format of DOS parameter list:
Offset	Size	Description	(Table 01686)
 00h	WORD	AX
 02h	WORD	BX
 04h	WORD	CX
 06h	WORD	DX
 08h	WORD	SI
 0Ah	WORD	DI
 0Ch	WORD	DS
 0Eh	WORD	ES
 10h	WORD	reserved (0)
 12h	WORD	computer ID (0 = current system)
 14h	WORD	process ID (PSP segment on specified computer)
Note:	under Windows Enhanced mode, the computer ID is normally the virtual
	  machine ID (see INT 2F/AX=1683h), though this can reportedly be
	  changed by setting UniqueDOSPSP= in SYSTEM.INI

Top
215D01 - INT 21 U - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
INT 21 U - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
	AX = 5D01h
	DS:DX -> DOS parameter list (see #01686), only computer ID and
		  process ID fields used
Return: CF set on error
	    AX = error code (see #01680)
	CF clear if successful
Notes:	flushes buffers and updates directory entries for each file which has
	  been written to; if remote file, calls INT 2F/AX=1107h
	the computer ID and process ID are stored but ignored under DOS 3.3
	not supported by DR DOS 3.41 and 5.0; returns error code 01h.  Fully
	  supported by Novell DOS 7
SeeAlso: AH=0Dh,AH=68h,INT 2F/AX=1107h

Top
215D02 - INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE FILE BY NAME
INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE FILE BY NAME
	AX = 5D02h
	DS:DX -> DOS parameter list (see #01686), only fields DX, DS,
		  computer ID, and process ID used
	DPL's DS:DX -> ASCIZ name of file to close
Return: CF set on error
	    AX = error code (see #01680)
	CF clear if successful
Notes:	error unless SHARE is loaded (calls [SysFileTable-28h])
	  (see #01636 at AH=52h)
	name must be canonical fully-qualified, such as returned by AH=60h
	not supported by DR DOS 3.41 and 5.0; returns error code 01h
	not supported by Novell DOS 7, although in Update 15 it is reported
	  to no longer return an error code
SeeAlso: AX=5D03h,AX=5D04h,AH=3Eh,AH=60h

Top
215D03 - INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN COMPUTER
INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN COMPUTER
	AX = 5D03h
	DS:DX -> DOS parameter list (see #01686), only computer ID used
Return: CF set on error
	    AX = error code (see #01680)
	CF clear if successful
Notes:	error unless SHARE is loaded (calls [SysFileTable-30h])
	  (see #01636 at AH=52h)
	not supported by DR DOS 3.41 and 5.0; returns error code 01h
	not supported by Novell DOS 7 (at least through Update 4; may be
	  supported in Update 15)
SeeAlso: AX=5D02h,AX=5D04h

Top
215D04 - INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN PROCESS
INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN PROCESS
	AX = 5D04h
	DS:DX -> DOS parameter list (see #01686), only computer ID and
		  process ID fields used
Return: CF set on error
	    AX = error code (see #01680)
	CF clear if successful
Notes:	error unless SHARE is loaded (calls [SysFileTable-2Ch])
	   (see #01636 at AH=52h)
	not supported by DR DOS 3.41 and 5.0; returns error code 01h
	not supported by Novell DOS 7
SeeAlso: AX=5D02h,AX=5D03h,INT 2F/AX=111Dh

Top
215D05 - INT 21 U - DOS 3.1+ internal - SHARE.EXE - GET OPEN FILE LIST ENTRY
INT 21 U - DOS 3.1+ internal - SHARE.EXE - GET OPEN FILE LIST ENTRY
	AX = 5D05h
	DS:DX -> DOS parameter list (see #01686)
	DPL's BX = index of sharing record (see #01637 at AH=52h)
	DPL's CX = index of SFT in sharing record's SFT list
Return: CF clear if successful
	    ES:DI -> ASCIZ filename
	    BX = network machine number of SFT's owner
	    CX = number of locks held by SFT's owner
	CF set if either index out of range
	    AX = 0012h (no more files)
Notes:	error unless SHARE is loaded (calls [SysFileTable-18h])
	  (see #01636 at AH=52h)
	names are always canonical fully-qualified, such as returned by AH=60h
	not supported by DR DOS 3.41 and 5.0 and Novell DOS 7, but does not
	  return an error, instead destroying AX
SeeAlso: AH=5Ch,AH=60h

Top
215D06 - INT 21 U - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
INT 21 U - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
	AX = 5D06h
Return: CF set on error
	   AX = error code (see #01680)
	CF clear if successful
	    DS:SI -> nonreentrant data area (includes all three DOS stacks)
		(critical error flag is first byte) (see #01687)
	    CX = size in bytes of area which must be swapped while in DOS
	    DX = size in bytes of area which must always be swapped
Notes:	the Critical Error flag is used in conjunction with the InDOS flag
	  (see AH=34h) to determine when it is safe to enter DOS from a TSR
	setting CritErr flag allows use of functions 50h/51h from INT 28h under
	  DOS 2.x by forcing use of correct stack
	swapping the data area allows reentering DOS unless DOS is in a
	  critical section delimited by INT 2A/AH=80h and INT 2A/AH=81h,82h
	under DOS 4.0, AX=5D0Bh should be used instead of this function
	SHARE and other DOS utilities consult the byte at offset 04h in the
	  DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
	  in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
	DR DOS 3.41+ supports this function, but the SDA format beyond the
	  first 18h bytes is completely different from MS-DOS
BUG:	calling this function with certain values in DX crashes Novell DOS 7.0
	  prior to Update 14
SeeAlso: AX=5D0Bh,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h

Format of DOS 3.10-3.30 Swappable Data Area:
Offset	Size	Description	(Table 01687)
 -34	BYTE	(DOS 3.10+) printer echo flag (00h off, FFh active)
 -31	BYTE	(DOS 3.30) current switch character
 -30	BYTE	current memory allocation strategy (see AH=58h)
 -28	BYTE	(DOS 3.30) incremented on each INT 21/AX=5E01h call
 -27 16 BYTEs	(DOS 3.30) machine name set by INT 21/AX=5E01h
 -11  5 WORDs	zero-terminated list of offsets which need to be patched to
		  enable critical-section calls (see INT 2A/AH=80h)
 -1	BYTE	unused padding
---start of actual SDA---
 00h	BYTE	critical error flag ("ErrorMode")
 01h	BYTE	InDOS flag (count of active INT 21 calls)
 02h	BYTE	drive on which current critical error occurred, or FFh
		(DR DOS sets to drive number during INT 24, 00h otherwise)
 03h	BYTE	locus of last error
 04h	WORD	extended error code of last error
 06h	BYTE	suggested action for last error
 07h	BYTE	class of last error
 08h	DWORD	ES:DI pointer for last error
 0Ch	DWORD	current DTA (Disk Transfer Address)
		note: may point into SDA during the DOS EXEC function
		  (see AH=4Bh), so programs which swap the SDA must be
		  prepared to move the DTA to a private buffer if they
		  might be invoked during an EXEC
 10h	WORD	current PSP
 12h	WORD	stores SP across an INT 23
 14h	WORD	return code from last process termination (zerod after reading
		  with AH=4Dh)
 16h	BYTE	current drive
 17h	BYTE	extended break flag
---remainder need only be swapped if in DOS---
 18h	WORD	value of AX on call to INT 21
 1Ah	WORD	PSP segment for sharing/network
 1Ch	WORD	network machine number for sharing/network (0000h = us)
 1Eh	WORD	first usable memory block found when allocating memory
 20h	WORD	best usable memory block found when allocating memory
 22h	WORD	last usable memory block found when allocating memory
 24h	WORD	memory size in paragraphs (used only during initialization)
 26h	WORD	last entry checked during directory search
 28h	BYTE	flag: INT 24 returned Fail
 29h	BYTE	flags: allowable INT 24 actions (passed to INT 24 in AH)
 2Ah	BYTE	directory flag (00h directory, 01h file)
 2Bh	BYTE	flag: FFh if Ctrl-Break termination, 00h otherwise
 2Ch	BYTE	flag: allow embedded blanks in FCB
 2Dh	BYTE	padding (unused)
 2Eh	BYTE	day of month
 2Fh	BYTE	month
 30h	WORD	year - 1980
 32h	WORD	number of days since 01jan1980
 34h	BYTE	day of week (0 = Sunday)
 35h	BYTE	flag: console swapped during read from device
 36h	BYTE	flag: safe to call INT 28 if nonzero
 37h	BYTE	flag: if nonzero, INT 24 Abort turned into INT 24 Fail
		(set only during process termination)
 38h 26 BYTEs	device driver request header (see #02597 at INT 2F/AX=0802h)
 52h	DWORD	pointer to device driver entry point (used in calling driver)
 56h 22 BYTEs	device driver request header for I/O calls
 6Ch 14 BYTEs	device driver request header for disk status check
 7Ah	DWORD	pointer to device I/O buffer???
 7Eh	WORD	???
 80h	WORD	???
 82h	BYTE	type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
 83h	BYTE	padding (unused)
 84h  3 BYTEs	24-bit user number (see AH=30h)
 87h	BYTE	OEM number (see #01394 at AH=30h)
 88h	WORD	offset to error code conversion table for INT 25/INT 26
 8Ah  6 BYTEs	CLOCK$ transfer record (see #01688)
 90h	BYTE	device I/O buffer for single-byte I/O functions
 91h	BYTE	padding??? (unused)
 92h 128 BYTEs	buffer for filename
112h 128 BYTEs	buffer for filename
192h 21 BYTEs	findfirst/findnext search data block (see #01626 at AH=4Eh)
1A7h 32 BYTEs	directory entry for found file (see #01352 at AH=11h)
1C7h 81 BYTEs	copy of current directory structure for drive being accessed
218h 11 BYTEs	FCB-format filename for device name comparison
223h	BYTE	terminating NUL for above filename
224h 11 BYTEs	wildcard destination specification for rename (FCB format)
22Fh	BYTE	terminating NUL for above spec
230h	BYTE	???
231h	WORD	destination file/directory starting sector
233h  5 BYTEs	???
238h	BYTE	extended FCB file attribute
239h	BYTE	type of FCB (00h regular, FFh extended)
23Ah	BYTE	directory search attributes
23Bh	BYTE	file open/access mode
23Ch	BYTE	file found/delete flag
		bit 0: file found
		bit 4: file deleted
23Dh	BYTE	flag: device name found on rename, or file not found
23Eh	BYTE	splice flag (file name and directory name together)
23Fh	BYTE	flag indicating how DOS function was invoked
		(00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
240h	BYTE	sector position within cluster
241h	BYTE	flag: translate sector/cluster (00h no, 01h yes)
242h	BYTE	flag: 00h if read, 01h if write
243h	BYTE	current working drive number
244h	BYTE	cluster factor
245h	BYTE	flag: cluster split mode
246h	BYTE	line edit (AH=0Ah) insert mode flag (nonzero = on)
247h	BYTE	canonicalized filename referred to existing file/dir if FFh
248h	BYTE	volume ID flag
249h	BYTE	type of process termination (00h-03h) (see AH=4Dh)
24Ah	BYTE	file create flag (00h = no, search only)
24Bh	BYTE	value with which to replace first byte of deleted file's name
		  (normally E5h, but 00h as described under INT 21/AH=13h)
24Ch	DWORD	pointer to Drive Parameter Block for critical error invocation
		temp: used during process termination
250h	DWORD	pointer to stack frame containing user registers on INT 21
254h	WORD	stores SP across INT 24
256h	DWORD	pointer to DOS Drive Parameter Block for ???
25Ah	WORD	saving partial cluster number
25Ch	WORD	temp: sector of work current cluster
25Eh	WORD	high part of cluster number (only low byte referenced)
260h	WORD	??? temp
262h	BYTE	Media ID byte returned by AH=1Bh,1Ch
263h	BYTE	padding (unused)
264h	DWORD	pointer to device header when filename is character device
268h	DWORD	pointer to current SFT
26Ch	DWORD	pointer to current directory structure for drive being accessed
270h	DWORD	pointer to caller's FCB
274h	WORD	number of SFT to which file being opened will refer
276h	WORD	temporary storage for file handle
278h	DWORD	pointer to a JFT entry in process handle table
		  (see #01378 at AH=26h)
27Ch	WORD	offset in DOS DS of first filename argument
27Eh	WORD	offset in DOS DS of second filename argument
280h	WORD	offset of last component in pathname or FFFFh
282h	WORD	offset of transfer address to add
284h	WORD	last relative cluster within file being accessed
286h	WORD	temp: absolute cluster number being accessed
288h	WORD	directory sector number
28Ah	WORD	??? current cluster number
28Ch	WORD	current relative sector number within file
28Eh	WORD	current sector number
290h	WORD	current byte offset within sector
292h	DWORD	current offset in file
296h	DWORD	temp: file byte count
29Ah	WORD	temp: file byte count
29Ch	WORD	free file cluster entry
29Eh	WORD	last file cluster entry
2A0h	WORD	next file cluster number
2A2h	DWORD	number of bytes appended to file
2A6h	DWORD	pointer to current work disk buffer
2AAh	DWORD	pointer to working SFT
2AEh	WORD	used by INT 21 dispatcher to store caller's BX
2B0h	WORD	used by INT 21 dispatcher to store caller's DS
2B2h	WORD	temporary storage while saving/restoring caller's registers
2B4h	DWORD	pointer to prev call frame (offset 250h) if INT 21 reentered
		also switched to for duration of INT 24
2B8h 21 BYTEs	FindFirst search data for source file(s) of a rename operation
		(see #01626 at AH=4Eh)
2CDh 32 BYTEs	directory entry for file being renamed (see #01352 at AH=11h)
2EDh 331 BYTEs	critical error stack
   403h	 35 BYTEs scratch SFT
438h 384 BYTEs	disk stack (functions greater than 0Ch, INT 25,INT 26)
5B8h 384 BYTEs	character I/O stack (functions 01h through 0Ch)
---DOS 3.2,3.3x only---
738h	BYTE	device driver lookahead flag (usually printer)
		(see AH=64h"DOS 3.2+")
739h	BYTE	volume change flag
73Ah	BYTE	flag: virtual open
73Bh	BYTE	???
Note:	the only fields which remain valid BETWEEN calls to INT 21h are those
	  in the initial "swap-always" portion of the SDA
SeeAlso: #01690

Format of CLOCK$ transfer record:
Offset	Size	Description	(Table 01688)
 00h	WORD	number of days since 1-Jan-1980
 02h	BYTE	minutes
 03h	BYTE	hours
 04h	BYTE	hundredths of second
 05h	BYTE	seconds

Top
215D07 - INT 21 U - DOS 3.1+ network - GET REDIRECTED PRINTER MODE
INT 21 U - DOS 3.1+ network - GET REDIRECTED PRINTER MODE
	AX = 5D07h
Return: DL = mode
	    00h redirected output is combined
	    01h redirected output in separate print jobs
Note:	MS-DOS and DR DOS 3.41/5.0 simply push AX on the stack and call
	  INT 2F/AX=1125h
SeeAlso: AX=5D08h,AX=5D09h,INT 2F/AX=1125h

Top
215D08 - INT 21 U - DOS 3.1+ network - SET REDIRECTED PRINTER MODE
INT 21 U - DOS 3.1+ network - SET REDIRECTED PRINTER MODE
	AX = 5D08h
	DL = mode
	    00h redirected output is combined
	    01h redirected output placed in separate jobs, start new print job
		now
Return:	nothing
Note:	MS-DOS and DR DOS 3.41/5.0 simply push AX on the stack and call
	  INT 2F/AX=1125h
SeeAlso: AX=5D07h,AX=5D09h,INT 2F/AX=1125h

Top
215D09 - INT 21 U - DOS 3.1+ network - FLUSH REDIRECTED PRINTER OUTPUT
INT 21 U - DOS 3.1+ network - FLUSH REDIRECTED PRINTER OUTPUT
	AX = 5D09h
Return:	nothing
Desc:	forces redirected printer output to be printed, and starts a new print
	  job
Notes:	MS-DOS and DR DOS 3.41/5.0 simply push AX on the stack and call
	  INT 2F/AX=1125h
	this function is also supported by 10Net, which calls it Terminate All
	  Spool Jobs, and does not flush if in "combine" mode
SeeAlso: AX=5D07h,AX=5D08h,INT 2F/AX=1125h

Top
215D0A - INT 21 - DOS 3.1+ - SET EXTENDED ERROR INFORMATION
INT 21 - DOS 3.1+ - SET EXTENDED ERROR INFORMATION
	AX = 5D0Ah
	DS:DX -> 11-word DOS parameter list (see #01686)
Return: nothing.  next call to AH=59h will return values from fields AX,BX,CX,
	  DX,DI, and ES in corresponding registers
Notes:	documented for DOS 5+, but undocumented in earlier versions
	the MS-DOS Programmer's Reference incorrectly states that this call was
	  introduced in DOS 4, and fails to mention that the ERROR structure
	  passed to this function is a DOS parameter list.
BUGS:	DR DOS 3.41 and 5.0 read the value for ES from the DS field of the
	  DPL; fortunately, MS-DOS ignores the DS field, allowing a generic
	  routine which sets both DS and ES fields to the same value
	Novell DOS 7 (through at least Update 4) does not save the pointer,
	  which is always reported as 0000h:0000h by AH=59h; Update 15 fully
	  supports this function
SeeAlso: AH=59h/BX=0000h

Top
215D0B - INT 21 OU - DOS 4.x only - internal - GET DOS SWAPPABLE DATA AREAS
INT 21 OU - DOS 4.x only - internal - GET DOS SWAPPABLE DATA AREAS
	AX = 5D0Bh
Return: CF set on error
	    AX = error code (see #01680)
	CF clear if successful
	    DS:SI -> swappable data area list (see #01689)
Notes:	copying and restoring the swappable data areas allows DOS to be
	  reentered unless it is in a critical section delimited by calls to
	  INT 2A/AH=80h and INT 2A/AH=81h,82h
	SHARE and other DOS utilities consult the byte at offset 04h in the
	  DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
	  in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
	DOS 5+ use the SDA format listed below, but revert back to the DOS 3.x
	  call for finding the SDA (see #01687); Novell DOS 7 does not support
	  this function, either.
SeeAlso: AX=5D06h,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h,INT 2F/AX=1203h

Format of DOS 4.x swappable data area list:
Offset	Size	Description	(Table 01689)
 00h	WORD	count of data areas
 02h  N BYTEs	"count" copies of data area record
		Offset	Size	Description
		 00h	DWORD	address
		 04h	WORD	length and type
				bit 15 set if swap always, clear if swap in DOS
				bits 14-0: length in bytes
SeeAlso: #01690

Format of DOS 4.0-6.0 swappable data area:
Offset	Size	Description	(Table 01690)
 -34	BYTE	printer echo flag (00h off, FFh active)
 -31	BYTE	current switch character (ignored by DOS 5+)
 -30	BYTE	current memory allocation strategy (see AH=58h)
 -28	BYTE	incremented on each INT 21/AX=5E01h call
 -27 16 BYTEs	machine name set by INT 21/AX=5E01h
 -11  5 WORDs	zero-terminated list of offsets which need to be patched to
		  enable critical-section calls (see INT 2A/AH=80h)
		(all offsets are 0D0Ch, but this list is still present for
		  DOS 3.x compatibility)
 -1	BYTE	unused padding
Note:	the above data is not actually part of the SDA, and is much more likely
	  to change between DOS versions/OEMs than data in the SDA itself
---start of actual SDA---
 00h	BYTE	critical error flag ("ErrorMode")
 01h	BYTE	InDOS flag (count of active INT 21 calls)
 02h	BYTE	drive on which current critical error occurred or FFh
		(DR DOS 3.41/5.0 set this to 00h when no critical error)
 03h	BYTE	locus of last error
 04h	WORD	extended error code of last error
 06h	BYTE	suggested action for last error
 07h	BYTE	class of last error
 08h	DWORD	ES:DI pointer for last error
 0Ch	DWORD	current DTA (Disk Transfer Address)
		note: may point into SDA during the DOS EXEC function
		  (see AH=4Bh), so programs which swap the SDA must be
		  prepared to move the DTA to a private buffer if they
		  might be invoked during an EXEC
 10h	WORD	current PSP
 12h	WORD	stores SP across an INT 23
 14h	WORD	return code from last process termination (zerod after reading
		  with AH=4Dh)
 16h	BYTE	current drive
 17h	BYTE	extended break flag
 18h	BYTE	flag: code page switching
 19h	BYTE	flag: copy of previous byte in case of INT 24 Abort
---remainder need only be swapped if in DOS---
 1Ah	WORD	value of AX on call to INT 21
		Note:	does not contain correct value on functions 00h-0Ch,
			  50h, 51h, 59h, or 62h			
 1Ch	WORD	PSP segment for sharing/network (0000h = local)
 1Eh	WORD	network machine number for sharing/network (0000h = local)
 20h	WORD	first usable memory block found when allocating memory
 22h	WORD	best usable memory block found when allocating memory
 24h	WORD	last usable memory block found when allocating memory
 26h	WORD	memory size in paragraphs (used only during initialization)
 28h	WORD	last entry checked during directory search
 2Ah	BYTE	flag: nonzero if INT 24 Fail
 2Bh	BYTE	flags: allowable INT 24 responses (passed to INT 24 in AH)
 2Ch	BYTE	flag: do not set directory if nonzero
 2Dh	BYTE	flag: program aborted by ^C
 2Eh	BYTE	flag: allow embedded blanks in FCB
		may also allow use of "*" wildcard in FCBs
 2Fh	BYTE	padding (unused)
 30h	BYTE	day of month
 31h	BYTE	month
 32h	WORD	year - 1980
 34h	WORD	number of days since 01jan1980
 36h	BYTE	day of week (0 = Sunday)
 37h	BYTE	flag: console swapped during read from device
 38h	BYTE	flag: safe to call INT 28 if nonzero
 39h	BYTE	flag: abort currently in progress, turn INT 24 Abort into Fail
 3Ah 30 BYTEs	device driver request header (see #02597 at INT 2F/AX=0802h) for
		  device calls
 58h	DWORD	pointer to device driver entry point (used in calling driver)
 5Ch 22 BYTEs	device driver request header for I/O calls
 72h 14 BYTEs	device driver request header for disk status check (also
		  includes following eight bytes for some calls)
 80h	DWORD	pointer to device I/O buffer
 84h	WORD	part of request header at 72h
 86h	WORD	part of request header at 72h (0)
 88h	BYTE	type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
 89h	DWORD	start offset of file region to lock/unlock
 8Dh	DWORD	length of file region to lock/unlock
 91h	BYTE	padding (unused)
 92h  3 BYTEs	24-bit user number (see AH=30h)
 95h	BYTE	OEM number (see #01394 at AH=30h)
 96h  6 BYTEs	CLOCK$ transfer record (see #01688 at AX=5D06h)
 9Ch	BYTE	device I/O buffer for single-byte I/O functions
 9Dh	BYTE	padding
 9Eh 128 BYTEs	buffer for filename
11Eh 128 BYTEs	buffer for filename (rename destination name)
19Eh 21 BYTEs	findfirst/findnext search data block (see #01626 at AH=4Eh)
1B3h 32 BYTEs	directory entry for found file (see #01394 at AH=11h)
1D3h 88 BYTEs	copy of current directory structure for drive being accessed
22Bh 11 BYTEs	FCB-format filename for device name comparison
236h	BYTE	terminating NUL for above filename
237h 11 BYTEs	wildcard destination specification for rename (FCB format)
242h	BYTE	terminating NUL for above filespec
243h	BYTE	padding???
244h	WORD	destination starting sector (cluster???)
246h  5 BYTEs	extra space to allow a directory entry to be stored starting
		  at offset 22Bh
24Bh	BYTE	extended FCB file attributes
24Ch	BYTE	type of FCB (00h regular, FFh extended)
24Dh	BYTE	directory search attributes
24Eh	BYTE	file open/access mode
24Fh	BYTE	flag: nonzero if file was deleted
250h	BYTE	flag: device name found on rename, or file not found
251h	BYTE	flag: splice file name and directory name together
252h	BYTE	flag indicating how DOS function was invoked
		(00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
253h	BYTE	sector position within cluster
254h	BYTE	flag: translating sector/cluster
255h	BYTE	flag: 00h if read, 01h if write
256h	BYTE	current working drive number
257h	BYTE	cluster factor
258h	BYTE	"sda_CLUSSPLIT" flag: cluster split between two FAT sectors
259h	BYTE	line edit (AH=0Ah) insert mode flag (nonzero = on)
25Ah	BYTE	canonicalized filename referred to existing file/dir if FFh
25Bh	BYTE	volume ID flag
25Ch	BYTE	type of process termination (00h-03h) (see AH=4Dh)
25Dh	BYTE	unused (padding for alignment)
25Eh	BYTE	file create flag (00h = no, search only)
25Fh	BYTE	value for deleted file's first byte: 00h to delete all, else E5
260h	DWORD	pointer to Drive Parameter Block for critical error invocation
264h	DWORD	pointer to stack frame containing user registers on INT 21
268h	WORD	stores SP across INT 24
26Ah	DWORD	pointer to DOS Drive Parameter Block for ???
26Eh	WORD	segment of disk buffer
270h	DWORD	saving partial cluster number
274h	WORD	"sda_PREREAD" 00h if preread, 01h if optional
276h	WORD	temporary used in allocating disk space
278h	BYTE	Media ID byte returned by AH=1Bh,1Ch
279h	BYTE	unused
27Ah	DWORD	pointer to device header if filename is character device
27Eh	DWORD	pointer to current SFT
282h	DWORD	pointer to current directory structure for drive being accessed
286h	DWORD	pointer to caller's FCB
28Ah	WORD	SFT index to which file being opened will refer
28Ch	WORD	temporary storage for file handle
28Eh	DWORD	pointer to JFT entry (for file being opened) in process handle
		  table (see #01378 at AH=26h)
292h	WORD	"sda_WFP_START" offset in DOS DS of first filename argument
294h	WORD	"sda_REN_WFP" offset in DOS DS of second filename argument
296h	WORD	offset of last component in pathname or FFFFh
298h	WORD	offset of transfer address to add
29Ah	WORD	last relative cluster within file being accessed
29Ch	WORD	temp: absolute cluster number being accessed
29Eh	DWORD	directory sector number
2A2h	WORD	directory cluster number
2A4h	DWORD	current relative sector number within file
2A8h	DWORD	current sector number (number of previously written sectors)
2ACh	WORD	current byte offset within sector
2AEh	DWORD	current offset in file
2B2h	WORD	number of bytes in first sector
2B4h	WORD	bytes in partial last sector
2B6h	WORD	number of whole sectors
2B8h	WORD	free file cluster entry
2BAh	WORD	last file cluster entry
2BCh	WORD	next file cluster number
2BEh	DWORD	number of bytes appended to file
2C2h	DWORD	pointer to current work disk buffer
2C6h	DWORD	pointer to working SFT
2CAh	WORD	used by INT 21 dispatcher to store caller's BX
2CCh	WORD	used by INT 21 dispatcher to store caller's DS
2CEh	WORD	temporary storage while saving/restoring caller's registers
2D0h	DWORD	pointer to prev call frame (offset 264h) if INT 21 reentered
		also switched to for duration of INT 24
2D4h	WORD	open mode/action for INT 21/AX=6C00h
2D6h	BYTE	extended open conditional flag
		set to 00h by INT 21h dispatcher, 02h when a read is
		  performed, and 01h or 03h by INT 21/AX=6C00h
2D7h	WORD	extended open I/O mode
2D9h	DWORD	stored ES:DI for AX=6C00h
2DDh	WORD	extended file open action code (see #01770 at AX=6C00h)
2DFh	WORD	extended file open attributes (see #01769 at AX=6C00h)
2E1h	WORD	extended file open file mode (see AX=6C00h)
2E3h	DWORD	pointer to filename to open (see AX=6C00h)
2E7h	WORD	high word of 32-bit sector number, or temp data buffer size
		   from disk buffer
2E9h	WORD	"sda_OffsetMagicPatch"
2EBh	BYTE	disk full on >32M partition when set to 01h
2ECh	WORD	stores DS during call to [List-of-Lists + 37h]
2EEh	WORD	temporary storage (various uses)
2F0h	BYTE	storage for drive error
2F1h	WORD	DOS 3.4 (European MS-DOS 4.00) bit flags
2F3h	DWORD	pointer to user-supplied filename
2F7h	DWORD	pointer to user-supplied rename destination filename
2FBh	WORD	stores SS during call to [List-of-Lists + 37h] and INT 25,26 
2FDh	WORD	stores SP during call to [List-of-Lists + 37h] and INT 25,26
2FFh	BYTE	flag, nonzero if stack switched in calling [List-of-Lists+37h]
300h 21 BYTEs	FindFirst search data for source file(s) of a rename operation
		(see #01626 at AH=4Eh)
315h 32 BYTEs	directory entry for file being renamed (see #01352 at AH=11h)
335h 331 BYTEs	critical error stack
480h 384 BYTEs	disk stack (functions greater than 0Ch, INT 25,INT 26)
600h 384 BYTEs	character I/O stack (functions 01h through 0Ch)
780h	BYTE	device driver lookahead flag (usually printer)
		(see AH=64h"DOS 3.2+")
781h	BYTE	volume change flag
782h	BYTE	flag: virtual file open
783h	BYTE	fastseek drive
784h	WORD	fastseek first cluster number
786h	WORD	fastseek logical cluster number
788h	WORD	fastseek returned logical cluster number
78Ah	WORD	temporary location of DOS@SYSINIT
---MSDOS 7.1+ (FAT32)---
78Ch 47 BYTEs	???
7BBh	BYTE	flag: absolute disk read/write type
		00h = INT 25/INT 26
		01h = INT 21/AX=7305h
7BCh	WORD	high word of directory cluster number at offset 2A2h
7BEh	WORD	high word of cluster number at offset 29Ch
7C0h	WORD	high word of next file cluster number at offset 2BCh
7C2h	WORD	high word of last relative cluster number at offset 29Ah
7C4h	WORD	high word of temp at offset 276h
7C6h	WORD	high word of offset 244h
7C8h	WORD	high word of EBX
7CAh	WORD	high word of EDX used by "PACK"
7CCh	WORD	high word of EDI used by "UNPACK"
7CEh	WORD	high word of EBX used by "SETDIRSRCH"
7D0h	WORD	high word of ECX used by "FREECLUSTER"
7D2h	WORD	high word of EDI used by "GETEOF"
7D4h  3 WORDs	???
Note:	the only fields which remain valid BETWEEN calls to INT 21h are those
	  in the initial "swap-always" portion of the SDA
SeeAlso: #01687,#01689

Top
215E00 - INT 21 - DOS 3.1+ network - GET MACHINE NAME
INT 21 - DOS 3.1+ network - GET MACHINE NAME
	AX = 5E00h
	DS:DX -> 16-byte buffer for ASCII machine name
Return: CF clear if successful
	    CH = validity
		00h name invalid
		nonzero valid
		    CL = NetBIOS number for machine name
		    DS:DX buffer filled with blank-paded name
	CF set on error
	    AX = error code (01h) (see #01680 at AH=59h)
Note:	supported by OS/2 v1.3+ compatibility box, PC-NFS
SeeAlso: AX=5E01h

Top
215E01CH00 - INT 21 - DOS 3.1+ network - SET MACHINE NAME
INT 21 - DOS 3.1+ network - SET MACHINE NAME
	AX = 5E01h
	CH = 00h undefine name (make it invalid)
	   <> 0	 define name
	CL = name number
	DS:DX -> 15-character blank-padded ASCIZ name
SeeAlso: AX=5E00h

Top
215E02 - INT 21 - DOS 3.1+ network - SET NETWORK PRINTER SETUP STRING
INT 21 - DOS 3.1+ network - SET NETWORK PRINTER SETUP STRING
	AX = 5E02h
	BX = redirection list index (see AX=5F02h)
	CX = length of setup string
	DS:SI -> setup string
Return: CF clear if successful
	CF set on error
	    AX = error code (01h) (see #01680 at AH=59h/BX=0000h)
Note:	also supported by 10NET v5.0
SeeAlso: AX=5E03h,INT 2F/AX=111Fh

Top
215E03 - INT 21 - DOS 3.1+ network - GET NETWORK PRINTER SETUP STRING
INT 21 - DOS 3.1+ network - GET NETWORK PRINTER SETUP STRING
	AX = 5E03h
	BX = redirection list index (see AX=5F02h)
	ES:DI -> 64-byte buffer for setup string
Return: CF clear if successful
	    CX = length of setup string
	    ES:DI buffer filled
	CF set on error
	    AX = error code (01h) (see #01680 at AH=59h/BX=0000h)
Note:	also supported by 10NET v5.0, but 10NET is documented as using DS:SI
	  instead of ES:DI
SeeAlso: AX=5E02h,INT 2F/AX=111Fh

Top
215E04 - INT 21 - DOS 3.1+ network - SET PRINTER MODE
INT 21 - DOS 3.1+ network - SET PRINTER MODE
	AX = 5E04h
	BX = redirection list index (see AX=5F02h)
	DX = mode
	    bit 0: set if binary, clear if text (tabs expanded to blanks)
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
Notes:	calls INT 2F/AX=111Fh with 5E04h on stack
	supported by DR DOS 3.41+
SeeAlso: AX=5E05h"DOS",INT 2F/AX=111Fh

Top
215E05 - INT 21 - DOS 3.1+ network - GET PRINTER MODE
INT 21 - DOS 3.1+ network - GET PRINTER MODE
	AX = 5E05h
	BX = redirection list index (see AX=5F02h)
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    DX = printer mode (see AX=5E04h)
Notes:	calls INT 2F/AX=111Fh with 5E05h on stack
	supported by DR DOS 3.41+
SeeAlso: AX=5E04h"DOS",INT 2F/AX=111Fh

Top
215F00 - INT 21 - DOS 3.1+ network - GET REDIRECTION MODE
INT 21 - DOS 3.1+ network - GET REDIRECTION MODE
	AX = 5F00h
	BL = redirection type
	    03h printer
	    04h disk drive
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    BH = redirection state
		00h off
		01h on
Note:	calls INT 2F/AX=111Eh with AX on top of the stack
SeeAlso: AX=5F01h,INT 2F/AX=111Eh

Top
215F01 - INT 21 - DOS 3.1+ network - SET REDIRECTION MODE
INT 21 - DOS 3.1+ network - SET REDIRECTION MODE
	AX = 5F01h
	BL = redirection type
	    03h printer
	    04h disk drive
	BH = redirection state
	    00h off
	    01h on
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
Notes:	when redirection is off, the local device (if any) rather than the
	  remote device is used
	calls INT 2F/AX=111Eh with AX on top of the stack
SeeAlso: AX=5F00h,INT 2F/AX=111Eh,INT 60/AX=0002h

Top
215F02 - INT 21 - DOS 3.1+ network - GET REDIRECTION LIST ENTRY
INT 21 - DOS 3.1+ network - GET REDIRECTION LIST ENTRY
	AX = 5F02h
	BX = zero-based redirection list index
	CX = driver signature
	    0000h LANtastic
	    4E57h ('NW') NetWare
	DS:SI -> 16-byte buffer for ASCIZ local device name or drive letter
		  followed by colon
	ES:DI -> 128-byte buffer for ASCIZ network name
Return: CF clear if successful
	    BH = device status
		00h valid
		01h invalid
		02h valid (connected from inside Windows for Workgroups v3.11)
	    BL = device type
		03h printer
		04h disk drive
	    CX = user data previously set with AX=5F03h
	    DS:SI and ES:DI buffers filled
	    DX,BP destroyed
	CF set on error
	    AX = error code (01h,12h) (see #01680 at AH=59h/BX=0000h)
Notes:	this function is passed through to INT 2F/AX=111Eh by the DOS kernel
	error code 12h is returned if BX is greater than the size of the list
	also supported by Banyan VINES, PC-NFS, LANtastic, and 10NET
	supported by LapLink RemoteAccess but returns the local drive letter;
	  the remote drive letter can be obtained with INT 2F/AX=Cxxxh
	  (see INT 2F/AX=C000h"LapLink")
	the returned device name may or may not include a colon, depending on
	  the network software
SeeAlso: AX=5F03h,AX=5F46h,INT 2F/AX=111Eh,INT 2F/AX=C000h"LapLink"

Top
215F03 - INT 21 - DOS 3.1+ network - REDIRECT DEVICE
INT 21 - DOS 3.1+ network - REDIRECT DEVICE
	AX = 5F03h
	BL = device type
	    03h printer
	    04h disk drive
	CX = user data to save
		0000h for LANtastic
		4E57h ("NW") for NetWare 4.0 requester
	DS:SI -> ASCIZ local device name (16 bytes max)
	ES:DI -> ASCIZ network name + ASCIZ password (128 bytes max total)
Return: CF clear if successful
	CF set on error
	    AX = error code (01h,03h,05h,08h,0Fh,12h) (see #01680 at AH=59h)
Notes:	if device type is disk drive, DS:SI must point at either a null string
	  or a string consisting the drive letter followed by a colon; if a
	  null string, the network attempts to access the destination without
	  redirecting a local drive
	the DOS kernel calls INT 2F/AX=111Eh with AX on top of the stack
	also supported by Banyan VINES, LANtastic, and 10NET
SeeAlso: AX=5F02h,AX=5F04h,INT 2F/AX=111Eh,INT 60/AX=0002h

Top
215F04 - INT 21 - DOS 3.1+ network - CANCEL REDIRECTION
INT 21 - DOS 3.1+ network - CANCEL REDIRECTION
	AX = 5F04h
	DS:SI -> ASCIZ local device name or path
	CX = 4E57h ("NW") for NetWare 4.0 requester
Return: CF clear if successful
	CF set on error
	    AX = error code (01h,03h,05h,08h,0Fh,12h) (see #01680 at AH=59h)
Notes:	the DS:SI string must be either a local device name, a drive letter
	  followed by a colon, or a network directory beginning with two
	  backslashes
	the DOS kernel calls INT 2F/AX=111Eh with AX on top of the stack
	also supported by Banyan VINES, LANtastic, and 10NET
	for NetWare, if only a server name is specified (i.e. "\\SERVER"),
	  the connection to that server will be closed
SeeAlso: AX=5F03h,INT 2F/AX=111Eh,INT 60/AX=0003h

Top
215F05 - INT 21 - DOS 4.0+ network - GET EXTENDED REDIRECTION LIST ENTRY
INT 21 - DOS 4.0+ network - GET EXTENDED REDIRECTION LIST ENTRY
	AX = 5F05h
	BX = redirection list index
	DS:SI -> buffer for ASCIZ source device name
	ES:DI -> buffer for destination ASCIZ network path
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    AX = server's network process ID handle (10NET)
	    BH = device status flag (bit 0 clear if valid)
	    BL = device type (03h if printer, 04h if drive)
	    CX = stored parameter value (user data) from AX=5F03h
	    BP = NETBIOS local session number
	    DS:SI buffer filled
	    ES:DI buffer filled
Notes:	the local session number allows sharing the redirector's session number
	if an error is caused on the NETBIOS LSN, the redirector may be unable
	  to correctly recover from errors
	the DOS kernel calls INT 2F/AX=111Eh with AX on top of the stack
	supported by DR DOS 5.0
	also supported by 10NET v5.0
SeeAlso: AX=5F06h"Network",INT 2F/AX=111Eh

Top
215F07 - INT 21 - DOS 5+ - ENABLE DRIVE
INT 21 - DOS 5+ - ENABLE DRIVE
	AX = 5F07h
	DL = drive number (0=A:)
Return: CF clear if successful
	CF set on error
	    AX = error code (0Fh) (see #01680 at AH=59h/BX=0000h)
Notes:	simply sets the "valid" bit in the drive's CDS
	this function is not supported by Novell DOS 7 through at least
	  Update 4, but support was added by Update 13
SeeAlso: AH=52h,AX=5F08h"DOS"

Top
215F08 - INT 21 - DOS 5+ - DISABLE DRIVE
INT 21 - DOS 5+ - DISABLE DRIVE
	AX = 5F08h
	DL = drive number (0=A:)
Return: CF clear if successful
	CF set on error
	    AX = error code (0Fh) (see #01680 at AH=59h/BX=0000h)
Notes:	simply clears the "valid" bit in the drive's CDS
	this function is not supported by Novell DOS 7 through at least
	  Update 4, but support was added by Update 13
SeeAlso: AH=52h,AX=5F07h"DOS"

Top
2160 - INT 21 - DOS 3.0+ - "TRUENAME" - CANONICALIZE FILENAME OR PATH
INT 21 - DOS 3.0+ - "TRUENAME" - CANONICALIZE FILENAME OR PATH
	AH = 60h
	DS:SI -> ASCIZ filename or path
	ES:DI -> 128-byte buffer for canonicalized name
Return: CF set on error
	    AX = error code
		02h invalid component in directory path or drive letter only
		03h malformed path or invalid drive letter
	    ES:DI buffer unchanged
	CF clear if successful
	    AH = 00h or 3Ah (DOS 6.1/6.2 for character device)
	    AL = destroyed (00h or 2Fh or 5Ch or last character of current
		  directory on drive)
	    buffer filled with qualified name of form D:\PATH\FILE.EXT or
	      \\MACHINE\PATH\FILE.EXT
Desc:	determine the canonical name of the specified filename or path,
	  corresponding to the undocumented TRUENAME command in COMMAND.COM
Notes:	the input path need not actually exist
	letters are uppercased, forward slashes converted to backslashes,
	  asterisks converted to appropriate number of question marks, and
	  file and directory names are truncated to 8.3 if necessary.  (DR DOS
	  3.41 and 5.0 do not expand asterisks)
	'.' and '..' in the path are resolved
	filespecs on local drives always start with "d:", those on network
	  drives always start with "\\"
	if path string is on a JOINed drive, the returned name is the one that
	  would be needed if the drive were not JOINed; similarly for a
	  SUBSTed, ASSIGNed, or network drive letter.	Because of this, it is
	  possible to get a qualified name that is not legal under the current
	  combination of SUBSTs, ASSIGNs, JOINs, and network redirections
	under DOS 3.3 through 6.00, a device name is translated differently if
	  the device name does not have an explicit directory or the directory
	  is \DEV (relative directory DEV from the root directory works
	  correctly).  In these cases, the returned string consists of the
	  unchanged device name and extension appended to the string X:/
	  (forward slash instead of backward slash as in all other cases) where
	  X is the default or explicit drive letter.
	under MS-DOS 7.0, this call returns the short name for any
	  long-filename portions of the provided pathname or filename
	functions which take pathnames require canonical paths if invoked via
	  INT 21/AX=5D00h
	supported by OS/2 v1.1 compatibility box
	NetWare 2.1x does not support characters with the high bit set; early
	  versions of NetWare 386 support such characters except in this call.
	  In addition, NetWare returns error code 3 for the path "X:\"; one
	  should use "X:\." instead.
	Novell DOS 7 reportedly has difficulty with non-MS-DOS filenames on
	  network drives, and can return "D:" instead of "SERVER/VOLUME"
	for DOS 3.3-6.0, the input and output buffers may be the same, as the
	  canonicalized name is built in an internal buffer and copied to the
	  specified output buffer as the very last step
	for DR DOS 6.0, this function is not automatically called when on a
	  network.  Device drivers reportedly cannot make this call from their
	  INIT function.  Using the same pointer for both input and output
	  buffers is not supported in the April 1992 and earlier versions of
	  DR DOS
	Windows for Workgroups 3.11, Windows95 and even MS-DOS 7.00 only
	  return the local drive path; to obtain network paths use
	  INT 21/AX=5F02h or INT 21/AX=5F46h instead
	Corel's CORELCDX and MSCDEX without the /S switch return canonical
	  names of the form "\\D.\A.\path", where "D" is the CD-ROM drive
	  letter and "A" appears to indicate the first physical CD-ROM drive;
	  MSCDEX with the /S switch returns a canonical name with embedded
	  blanks.  Novell DOS 7 NWCDEX as of the 11/16/94 update returns the
	  same canonical path as MSCDEX; earlier revisions returned
	  "Cdex.   D:\path", where "D" is the CD-ROM drive letter
	the Windows95 MSCDEX-replacement VxD returns "D:\path", even though the
	  MS-DOS 7.00 MSCDEX behaves identically to older versions (above)
BUG:	Windows95 incorrectly treats filenames where the first two characters
	  after the drive letter and colon are both slashes (either forward
	  or backward) as a UNC (network name) and requires several seconds
	  to attempt to resolve the name before returning an unchanged
	  string
SeeAlso: AX=5F02h,AX=5FB3h,AX=7160h/CL=00h,INT 2F/AX=1123h,INT 2F/AX=1221h

Top
2161 - INT 21 - DOS 3.0+ - UNUSED (RESERVED FOR NETWORK USE)
INT 21 - DOS 3.0+ - UNUSED (RESERVED FOR NETWORK USE)
	AH = 61h
Return: AL = 00h
Note:	this function does nothing and returns immediately

Top
2162 - INT 21 - DOS 3.0+ - GET CURRENT PSP ADDRESS
INT 21 - DOS 3.0+ - GET CURRENT PSP ADDRESS
	AH = 62h
Return: BX = segment of PSP for current process
Notes:	this function does not use any of the DOS-internal stacks and may
	  thus be called at any time, even during another INT 21h call
	the current PSP is not necessarily the caller's PSP
	identical to the undocumented AH=51h
SeeAlso: AH=50h,AH=51h

Top
216300 - INT 21 - DOS 2.25 only - GET LEAD BYTE TABLE ADDRESS
INT 21 - DOS 2.25 only - GET LEAD BYTE TABLE ADDRESS
	AX = 6300h
Return: CF clear if successful
	    DS:SI -> lead byte table (see #01746)
	CF set on error
	    AX = error code (01h) (see #01680 at AH=59h/BX=0000h)
Notes:	does not preserve any registers other than SS:SP
	the US version of MS-DOS 3.30 treats this as an unused function,
	  setting AL=00h and returning immediately
SeeAlso: AX=6301h,AH=07h,AH=08h,AH=0Bh

Format of double-byte character set lead byte table entry:
Offset	Size	Description	(Table 01746)
 00h  2 BYTEs	low/high ends of a range of leading byte of double-byte chars
 02h  2 BYTEs	low/high ends of a range of leading byte of double-byte chars
	...
  N   2 BYTEs	00h,00h end flag

Top
216300 - INT 21 - DOS 3.2+ - GET DOUBLE BYTE CHARACTER SET LEAD-BYTE TABLE
INT 21 - DOS 3.2+ - GET DOUBLE BYTE CHARACTER SET LEAD-BYTE TABLE
	AX = 6300h
Return: AL = error code
	    00h successful
		DS:SI -> DBCS table (see #01746)
		all other registers except CS:IP and SS:SP destroyed
	    FFh not supported
Notes:	probably identical to AH=63h/AL=00h for DOS 2.25
	the US version of MS-DOS 3.30 treats this as an unused function,
	  setting AL=00h and returning immediately, WITHOUT setting DS:SI;
	  only the Far East versions of MS-DOS 3.2 and 3.3 supported this call
	the US version of DOS 4.0+ accepts this function, but returns an empty
	  list
	IBM DOS 6.1 SYS.COM assumes that CF is set on error
SeeAlso: AX=6300h"DOS 2.25"

Top
216301 - INT 21 - DOS 2.25, DOS 3.2+ - SET KOREAN (HANGEUL) INPUT MODE
INT 21 - DOS 2.25, DOS 3.2+ - SET KOREAN (HANGEUL) INPUT MODE
	AX = 6301h
	DL = new mode
	    00h return only full characters on DOS keyboard input functions
	    01h return partially-formed (interim) characters also
Return: AL = status
	    00h successful
	    FFh invalid mode
Notes:	Novell DOS 7 simply stores DL in the caller's PSP (see #01378 at AH=26h)
	the US version of MS-DOS 3.30 treats this as an unused function,
	  setting AL=00h and returning immediately; only the Far East versions
	  of MS-DOS 3.2 and 3.3 supported this call
SeeAlso: AH=07h,AH=08h,AH=0Bh,AX=6300h,AX=6302h

Top
216302 - INT 21 - DOS 2.25, DOS 3.2+ - GET KOREAN (HANGEUL) INPUT MODE
INT 21 - DOS 2.25, DOS 3.2+ - GET KOREAN (HANGEUL) INPUT MODE
	AX = 6302h
Return: AL = status
	    00h successful
		DL = current input mode
		    00h return only full characters (clears interim flag)
		    01h return partial characters (sets interim flag)
	    FFh not supported
Notes:	Novell DOS 7 simply reads the value out of the caller's PSP, so it
	  can return values other than 00h or 01h if the last call to AX=6301h
	  used another value
	the US version of MS-DOS 3.30 treats this as an unused function,
	  setting AL=00h and returning immediately, WITHOUT setting DL; only
	  the Far East versions of MS-DOS 3.2 and 3.3 supported this call
SeeAlso: AH=07h,AH=08h,AH=0Bh,AX=6300h,AX=6301h

Top
2164 - INT 21 - DOS 3.2+ internal - SET DEVICE DRIVER LOOKAHEAD FLAG
INT 21 - DOS 3.2+ internal - SET DEVICE DRIVER LOOKAHEAD FLAG
	AH = 64h
	AL = flag
		00h (default) call device driver function 5 (non-dest read)
			before INT 21/AH=01h,08h,0Ah
	    nonzero don't call driver function 5
Return: nothing (MS-DOS)
	CF set, AX=error code??? (DR DOS 5.0, which does not support this call)
Notes:	this function is called by the DOS 3.3+ PRINT.COM
	under MS-DOS, this function does not use any of the DOS-internal stacks
	  and may thus be called at any time, even during another DOS call
SeeAlso: AH=01h,AH=08h,AH=0Ah,AX=5D06h

Top
2165 - INT 21 - DOS 3.3+ - GET EXTENDED COUNTRY INFORMATION
INT 21 - DOS 3.3+ - GET EXTENDED COUNTRY INFORMATION
	AH = 65h
	AL = info ID
	    01h get general internationalization info (see also AX=6500h)
	    02h get pointer to uppercase table
	    03h (DOS 6.2+ COUNTRY.SYS) get pointer to lowercase table
	    04h get pointer to filename uppercase table
	    05h get pointer to filename terminator table
	    06h get pointer to collating sequence table
	    07h (DOS 4.0+) get pointer to Double-Byte Character Set table
	BX = code page (FFFFh=global code page) (see #01757)
	DX = country ID (FFFFh=current country)
	ES:DI -> country information buffer (see #01750)
	CX = size of buffer (>= 5)
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    CX = size of country information returned
	    ES:DI -> country information (see #01750)
Notes:	AL=05h appears to return same info for all countries and codepages; it
	  has been documented for DOS 5+, but was undocumented in earlier
	  versions
	NLSFUNC must be installed to get info for countries other than the
	  default
	subfunctions 02h and 04h are identical under OS/2
	subfunction 03h apparently supports only codepage 866 in DOS 6.2x
SeeAlso: AH=38h,AH=70h"MS-DOS 7",INT 2F/AX=1401h,INT 2F/AX=1402h
SeeAlso: INT 2F/AX=14FEh

Format of country information:
Offset	Size	Description	(Table 01750)
 00h	BYTE	info ID
---if info ID = 01h---
 01h	WORD	size of following info in bytes
 03h	WORD	country ID (see #01400 at AH=38h)
 05h	WORD	code page (see #01757)
 07h 34 BYTEs	country-dependent info (see #01399 at AH=38h)
---if info ID = 02h---
 01h	DWORD	pointer to uppercase table (see #01751)
---if info ID = 03h---
 01h	DWORD	pointer to lowercase table (see #01752)
---if info ID = 04h---
 01h	DWORD	pointer to filename uppercase table (see #01753)
---if info ID = 05h---
 01h	DWORD	pointer to filename character table (see #01754)
---if info ID = 06h---
 01h	DWORD	pointer to collating table (see #01755)
---if info ID = 07h (DOS 4.0+)---
 01h	DWORD	pointer to DBCS lead byte table (see #01756)
SeeAlso: #01775

Format of uppercase table:
Offset	Size	Description	(Table 01751)
 00h	WORD	table size (0080h)
 02h 128 BYTEs	uppercase equivalents (if any) of chars 80h to FFh
SeeAlso: #01750,#01753

Format of lowercase table:
Offset	Size	Description	(Table 01752)
 00h	WORD	table size (0100h)
 02h 256 BYTEs	lowercase equivalents (if any) of chars 00h to FFh
SeeAlso: #01750,#01753

Format of filename uppercase table:
Offset	Size	Description	(Table 01753)
 00h	WORD	table size (0080h)
 02h 128 BYTEs	uppercase equivalents (if any) of chars 80h to FFh
SeeAlso: #01750,#01751

Format of filename terminator table:
Offset	Size	Description	(Table 01754)
 00h	WORD	table size (not counting this word)
 02h	BYTE	??? (01h for MS-DOS 3.30-6.00)
 03h	BYTE	lowest permissible character value for filename
 04h	BYTE	highest permissible character value for filename
 05h	BYTE	??? (00h for MS-DOS 3.30-6.00)
 06h	BYTE	first excluded character in range \ all characters in this
 07h	BYTE	last excluded character in range  / range are illegal
 08h	BYTE	??? (02h for MS-DOS 3.30-6.00)
 09h	BYTE	number of illegal (terminator) characters
 0Ah  N BYTEs	characters which terminate a filename:	."/\[]:|<>+=;,
Note:	partially documented for DOS 5+, but undocumented for earlier versions
SeeAlso: #01750

Format of collating table:
Offset	Size	Description	(Table 01755)
 00h	WORD	table size (0100h)
 02h 256 BYTEs	values used to sort characters 00h to FFh
SeeAlso: #01750

Format of DBCS lead byte table:
Offset	Size	Description	(Table 01756)
 00h	WORD	length of table in ranges
 02h 2N BYTEs	start/end for N lead byte ranges
	WORD	0000h	(end of table)
SeeAlso: #01750

Top
2165 - INT 21 - DOS 4.0+ - COUNTRY-DEPENDENT CHARACTER CAPITALIZATION
INT 21 - DOS 4.0+ - COUNTRY-DEPENDENT CHARACTER CAPITALIZATION
	AH = 65h
	AL = function
	    20h capitalize character
		DL = character to capitalize
		Return: DL = capitalized character
	    21h capitalize string
		DS:DX -> string to capitalize
		CX = length of string
	    22h capitalize ASCIZ string
		DS:DX -> ASCIZ string to capitalize
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
Note:	these calls have been documented for DOS 5+, but were undocumented in
	  DOS 4.x.
BUG:	Novell DOS 7 Update 15 crashes on AX=6521h when CX=0000h

Top
216523 - INT 21 U - DOS 4.0+ - DETERMINE IF CHARACTER REPRESENTS YES/NO RESPONSE
INT 21 U - DOS 4.0+ - DETERMINE IF CHARACTER REPRESENTS YES/NO RESPONSE
	AX = 6523h
	DL = character
	DH = second character of double-byte character (if applicable)
Return: CF set on error
	CF clear if successful
	    AX = type
		00h no
		01h yes
		02h neither yes nor no
Note:	supported by Novell DOS 7, though prior to Update 14, the results
	  depended on the kernel variant rather than the YESCHAR= or COUNTRY=
	  setting in CONFIG.SYS
BUG:	Novell DOS commands and tools all use internal settings rather than
	  this function, so the Yes/No responses are dependent on the specific
	  country's variant being run rather than on the COUNTRY= setting

Top
2165 - INT 21 U - DOS 4.0+ internal - COUNTRY-DEPENDENT FILENAME CAPITALIZATION
INT 21 U - DOS 4.0+ internal - COUNTRY-DEPENDENT FILENAME CAPITALIZATION
	AH = 65h
	AL = function
	    A0h capitalize filename character
		DL = character to capitalize
		Return: DL = capitalized character
	    A1h capitalize counted filename string
		DS:DX -> filename string to capitalize
		CX = length of string
	    A2h capitalize ASCIZ filename
		DS:DX -> ASCIZ filename to capitalize
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
Note:	nonfunctional in MS-DOS 4.00 through 7.10 (Win98) due to a bug (the
	  code sets a pointer depending on the high bit of AL, but doesn't
	  clear the bit before branching by function number).  Supported and
	  functional(!) in Novell DOS 7 (Update 15), as well as PC-DOS 7 and
	  OS/2 MVDM

Top
216601 - INT 21 - DOS 3.3+ - GET GLOBAL CODE PAGE TABLE
INT 21 - DOS 3.3+ - GET GLOBAL CODE PAGE TABLE
	AX = 6601h
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    BX = active code page (see #01757)
	    DX = system code page (see #01757)
SeeAlso: AX=6602h

Top
216602 - INT 21 - DOS 3.3+ - SET GLOBAL CODE PAGE TABLE
INT 21 - DOS 3.3+ - SET GLOBAL CODE PAGE TABLE
	AX = 6602h
	BX = active code page (see #01757)
	DX = system code page (active page at boot time)
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    AX = EB41h (Novell NWDOS v7.0 when NLSFUNC not installed and
		  request was for previously-active code page)
SeeAlso: AX=6601h,INT 2F/AX=14FFh

(Table 01757)
Values for code page:
 0	Reduced 7-bit ASCII			[NetWare]
 37	EBCDIC: US/Canada English (CECP)	[Windows NT 3.51+]
 38	EBCDIC: International (old)
 111	Greek
 112	Turkish
 113	Yugoslavian
 161	Arabic					[Linux]
 162	Arabic					[Linux]
 163	Arabic					[Linux]
 164	Arabic					[Linux]
 165	Arabic					[Linux]
 237	EBCDIC: Germany (CECP)
 273	EBCDIC: ??? (CECP)
 274	EBCDIC: Belgium
 275	EBCDIC: Brazilian
 277	EBCDIC: Danish/Norwegian (CECP)
 278	EBCDIC: Finnish/Swedish (CECP)
 280	EBCDIC: Italian (CECP)
 281	EBCDIC: Japanese-E
 284	EBCDIC: Latin-American/Spanish (CECP)
 285	EBCDIC: UK English (CECP)
 290	EBCDIC: Japanese Kana
 297	EBCDIC: French (CECP)
 367	US-ASCII (ISO 646-US, 7-bit)
 420	EBCDIC: Arabic 1
 423	EBCDIC: Greek
 424	EBCDIC: Hebrew
 437	US / English / PC-8 / IBM-2
 500	EBCDIC: Belgium/Switzerland (CECP)
 500	EBCDIC: International
 646	(??? reserved for ISO 646 7-bit codepages)
 667	Eastern Europe (Polish)
 668	Eastern Europe (Slavic)
 708	Arabic/Middle East
 737	Greek (2)
 775	Baltic / Baltic Rim
 819	Latin-1 (ISO 8859-1)
 850	Multilingual (Latin-1)
 851	Greek
 852	Slavic/Easter Europe (Latin-2)		[DOS 5+]
 853	Turkish (Latin-2)
 854	Spanish
 855	Cyrilic (1)
 857	Turkish
 860	Portugese
 861	Icelandic
 862	Hebrew
 863	French Canadian
 864	Arabic/Middle East
 865	Nordic (Norwegian/Danish)
 866	Russian (Cyrillic 2)
 867	Czech
 868	Arabic
 869	Greek (1)
 870	EBCDIC: Yugoslavia (Roece)
 871	EBCDIC: Icelandic
 874	Thailand
 875	EBCDIC: Greek
 880	Russian (Cyrillic GOST)
 880	EBCDIC: Cyrillic
 881	Latin 1 (ISO 8859-1)
 882	Latin 2 (ISO 8859-2)
 883	Latin 3 (ISO 8859-3)
 884	Latin 4 (ISO 8859-4)
 885	Latin 5 (ISO 8859-5)
 891	unknown
 897	Japanese (Shift-JIS)
 903	unknown
 904	unknown
 905	EBCDIC: Turkish
 912	Latin 2 (ISO 8859-2: Eastern Europe)
 913	(??? reserved for Latin 3)
 914	(??? reserved for Latin 4)
 915	Cyrillic (ISO 8859-5: Latin/Cyrillic)
 916	(??? reserved for ISO 8859-6: Latin/Arabic)
 917	(??? reserved for ISO 8859-7: Latin/Greek)
 918	EBCDIC: Arabic 2
 919	(??? reserved for ISO 8859-9: Latin 5)
 920	(??? reserved for ISO 8859-10: Latin 6/Sami)
 932	DBCS: Japanese (Shift-JIS)
 934	DBCS: Korean
 936	DBCS: Chinese (PRC/ROC, Simplified/xGB)
 938	DBCS: Taiwan
 938	DBCS: Chinese (PRC/ROC)
 942	DBCS: Japanese SAA
 944	DBCS: Korean SAA
 948	DBCS: Chinese SAA (PRC/ROC)
 949	Korean (Unified Hangul; Extended Wansung)
 950	Chinese Traditional, Big5 (Taiwan, Hong Kong)
 966	Saudi Arabian
 972	Hebrew (Israeli VT100)
 999	reserved for user-definable codepages
1004	Desktop Publishing
1026	EBCDIC: Turkish (Latin 5)
1047	EBCDIC: International (CECP, de-facto EBCDIC-US)
1250	MSWIN: Eastern Europe (Latin 2)
1251	MSWIN: Cyrillic
1252	MSWIN: English/W. Europe/Standard (Latin 1)
1253	MSWIN: Greek (GRC)
1254	MSWIN: Turkish
1255	MSWIN: Hebrew
1256	MSWIN: Arabic
1257	MSWIN: Baltic (Estonian, Latvian, Lithuanian)
1258	MSWIN: Vietnamese
1361	ANSI???: Korean (Johab)
10000	MAC: International/Standard (Roman)
10006	MAC: Greek
10007	MAC: Cyrillic
10029	MAC: Latin 2
10079	MAC: Icelandic
10081	MAC: Turkish
10646	(should be reserved for the future ISO 10646 32-bit codepage???)
65400	OS/2: reserved for Glyphs
Notes:	not all code pages are available in all versions of DOS or
	  DOS-compatibles, and many (particularly EBCDIC) have not been
	  implemented for *any* DOS to date
	CECP = 'Country Extended CodePage' by IBM.
	Unicode (UCS-2) is a 16-bit character codeset, covering all commonly
	  used characters from almost any language. Not all definitions are
	  fixed at the time of this writing. Unicode will be the future of
	  character coding for the foreseeable future, but is only the
	  "basic multilingual plane" (BMP) subset of 32-bit ISO 10646 codes
	  (UCS-4), a single character set standard covering requirements for
	  all countries and languages, which is still under construction.
	The MS Windows 'ANSI' codepage 1252 (based on the MS Windows 3.0+
	  implementation) appears to be 100% compatible with the code sets
	  used by Amiga OS and Acorn Archimedes RISC-OS and is also a linear
	  subset of the 16bit UniCode code set (UCS-2); the actual ANSI
	  codepage is defined by ISO 8859-1 (Latin 1).
	At least applications for OS/2 Warp 3 Presentation Manager can use
	  EBCDIC codepages, but the codepage ID assignments for EBCDIC
	  codepages are not known for OS/2. OS/2 SAA codepages are not
	  supported in CONFIG.SYS.  Codepage 65400 "Glyphs" is not actually a
	  codepage, but a way to directly access the first 256 of the 383
	  glyphs from the current font set.
	Novell DOS 7/DR DOS 6/Caldera OpenDOS undocumented codepage 853
	  does not necessarily match with MS-DOS' undocumented codepage 853.
	Undocumented codepages 667 and 668 can be found in Russian's PTS/DOS
	  6.51 and S/DOS 1.x DISPLAY.CPI and contain some Eastern European
	  characters.
	Novell NetWare 3.xx clients support UniCode and codepages 437, 850,
	  860, 863, 865, 897, 932, and 1252 (possibly more). NetWare 4.xx
	  clients also support 1250, 1251, 1256. Personal NetWare 1.0 (PNW),
	  as it was distributed in Europe, supports UniCode and codepages 437,
	  850 and 1252.	 Novell's Client32 for DOS/Windows supports 874, 932,
	  936, 949, 950, 1250 - 1257. For codesets not yet available, Novell
	  offers a reduced ASCII 7-bit support through a codepage 0 used as a
	  translation table to UniCode, that supports characters 32-127 except
	  92 ('\').

Format of DOS .CPI (Code Page Information) file header:
Offset	Size	Description	(Table 01758)
 00h	BYTE	ID tag
		FFh FONT file (Standard for generic display or
		      printer font files used by MS-DOS, PC-DOS, DR DOS
		      and Novell DOS)
		7Fh DRFONT file (Used by DR DOS 6.0 / Novell DOS 7 for
		      enhanced & compressed display font files. DR DOS 6.0
		      and Novell DOS 7 still support the standard FONT
		      files, thus allowing leaning of .CPI files from
		      MS-DOS to DR DOS / Novell DOS!)
 01h  7 BYTEs	ID string
		"FONT	" = FONT file (Standard for display or printer)
		"DRFONT " = DRFONT file (Enhanced compressed format used
			    by DR DOS 6.0 / Novell DOS 7 for display fonts)
 08h  8 BYTEs	reserved (0)
 10h	WORD	number of pointers (1)
 12h	BYTE	type of pointers (1)
 13h	DWORD	pointer to file offset of FontInfoHeader
		(Generally pointing to the byte just after FontFileHeader,
		     that is 0000h:0017h. Due to extra data at offset 17h, this
		     value has changed with DR DOS 6.0 / Novell DOS 7 DRFONTs!
		     "MS-DOS 4.0 programmers reference" claimed word offset
		     +15h as an endmarker (0000h), but actually it is the
		     High-Word of the pointer.)
--- Extended FontFileHeader with DR DOS 6.0 / Novell DOS 7 DRFONTs: ---
 17h	BYTE	number of fonts per codepage supported by this file
		     (N=4 with both DR DOS 6.0 / Novell DOS 7 DRFONT files)
 18h  N	BYTEs	cellsize (Height) of fonts 1..N
		the cellsize corresponds with the character boxes height,
		  but is also the count of bytes used for each of the
		  characters inside the font data (as currently all fonts
		  are organized heightx8 and 8 pixel width is just one byte).
 var  N DWORDs	file offsets of DisplayFontData.

Format of DOS .CPI file Font Information Header:
Offset	Size	Description	(Table 01759)
 00h	WORD	number of codepage entries
	var	N codepage entry headers (see #01760)
SeeAlso: #01758

Format of DOS .CPI file CodePage Entry Header:
Offset	Size	Description	(Table 01760)
 00h	WORD	size of this header (normally 1Ch)
 02h	DWORD	offset of next entry, or 0000h:0000h or FFFFh:FFFFh if last
		(if a valid "next" pointer but all of the fonts indicated in
		  the .CPI header have been processed, this field normally
		  points at an optional text area at the end of the .CPI file
		  containing copyright information)
 06h	WORD	device type
		01h display (FONT or DRFONT)
		02h printer (FONT)
 08h  8 BYTEs	blank-padded device name string
 10h	WORD	code page (see #01757)
 12h  3 WORDs	reserved (0)
 18h	DWORD	pointer to Font Data Header (see #00222)
		normally immediately follows this header
SeeAlso: #01758

Format of DOS .CPI file Font Data Header:
Offset	Size	Description	(Table 01761)
 00h	WORD	record type
		0001h FONT
		0002h DRFONT (DR DOS 6.0/Novell DOS 7 display font)
 02h	WORD	number of fonts
 04h	WORD	length of font data (display fonts)
		??? (printer fonts)
 06h	var	font data (#fonts * fontlength) bytes
SeeAlso: #01758

Format of DOS .CPI file ScreenFONT Header:
Offset	Size	Description	(Table 01762)
 00h  6 BYTEs	display-font header (see #01764)
 06h	var	display font data
SeeAlso: #01758

Format of .CPI file DRFONT Header:
Offset	Size	Description	(Table 01763)
 00h 6N BYTEs	DisplayFONT headers for N fonts (see #01764)
      M WORDs	character index table for cell offsets in font data
		currently 256 words in length
SeeAlso: #01758

Format of .CPI file DisplayFONT header:
Offset	Size	Description	(Table 01764)
 00h	BYTE	height of character cell
 01h	BYTE	width of character cell (currently always 08h)
 02h	BYTE	aspect ratio (height) (currently 00h, unused)
 03h	BYTE	aspect ratio (width) (currently 00h, unused)
 04h	WORD	number of characters per font (256)
SeeAlso: #01758

Format of .CPI file PrinterFONT header:
Offset	Size	Description	(Table 01765)
 00h	WORD	type of printer
		0001h (4201.CPI, 1050.CPI, EPS.CPI)
		0002h (4208.CPI, 5202.CPI, PPDS.CPI)
 02h	WORD	bytes per hardware/download codepage-select escape sequence
		(max 31, typically 12)
 04h  N BYTEs	escape sequence to select hardware codepage
      N BYTEs	escape sequence to select download codepage
	var	download data for printer font (including escape sequence to
		  transfer data)
SeeAlso: #01758

Top
2167 - INT 21 - DOS 3.3+ - SET HANDLE COUNT
INT 21 - DOS 3.3+ - SET HANDLE COUNT
	AH = 67h
	BX = size of new file handle table for process
Return: CF clear if successful
	CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
Desc:	adjust the size of the per-process open file table, thus raising or
	  lowering the limit on the number of files the caller can open
	  simultaneously
Notes:	if BX <= 20, no action is taken if the handle limit has not yet been
	  increased, and the table is copied back into the PSP if the limit
	  is currently > 20 handles
	for file handle tables of > 20 handles, DOS 3.30 never reuses the
	  same memory block, even if the limit is being reduced; this can lead
	  to memory fragmentation as a new block is allocated and the existing
	  one freed
	only the first 20 handles are copied to child processes in DOS 3.3-6.0
	increasing the file handles here will not, in general, increase the
	  number of files that can be opened using the runtime library of a
	  high-level language such as C
	Novell DOS 7 reportedly terminates the calling program if the JFT is
	  being reduced in size and there are any open file handles beyond
	  the portion of the JFT being retained
BUGS:	the original release of DOS 3.30 allocates a full 64K for the handle
	  table on requests for an even number of handles
	DR DOS 3.41 and 5.0 will lose track of any open file handles beyond
	  the portion of the JFT retained after the call; MS-DOS will indicate
	  error 04h if any of the JFT entries to be removed are open
SeeAlso: AH=26h,AH=86h

Top
2168 - INT 21 - DOS 3.3+ - "FFLUSH" - COMMIT FILE
INT 21 - DOS 3.3+ - "FFLUSH" - COMMIT FILE
	AH = 68h
	BX = file handle
Return: CF clear if successful
	    all data still in DOS disk buffers is written to disk immediately,
	      and the file's directory entry is updated
	CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
SeeAlso: AX=5D01h,AH=6Ah,INT 2F/AX=1107h

Top
2169 - INT 21 U - DOS 4.0+ internal - GET/SET DISK SERIAL NUMBER
INT 21 U - DOS 4.0+ internal - GET/SET DISK SERIAL NUMBER
	AH = 69h
	AL = subfunction
	    00h get serial number
	    01h set serial number
	BL = drive (0=default, 1=A, 2=B, etc)
	BH = info level (00h only for DOS; OS/2 allows other levels)
	DS:DX -> disk info (see #01766)
Return: CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	    AX destroyed
	    (AL = 00h) buffer filled with appropriate values from extended BPB
	    (AL = 01h) extended BPB on disk set to values from buffer
Notes:	does not generate a critical error; all errors are returned in AX
	error 0005h given if no extended BPB on disk
	does not work on network drives (error 0001h)
	buffer after first two bytes is exact copy of bytes 27h thru 3Dh of
	  extended BPB on disk
	this function is supported under Novell NetWare versions 2.0A through
	  3.11; the returned serial number is the one a DIR would display,
	  the volume label is the NetWare volume label, and the file system
	  is set to "FAT16".
	this function is not supported by Novell DOS 7 through Update 13, but
	  Personal NetWare 1.0 and Update 15 do support this function
	the serial number is computed from the current date and time when the
	  disk is created; the first part is the sum of the seconds/hundredths
	  and month/day, the second part is the sum of the hours/minutes and
	  year
	the volume label which is read or set is the one stored in the extended
	  BPB on disks formatted with DOS 4.0+, rather than the special root
	  directory entry used by the DIR command in COMMAND.COM (use AH=11h
	  to find that volume label)
SeeAlso: AX=440Dh"DOS 3.2+"

Format of disk info:
Offset	Size	Description	(Table 01766)
 00h	WORD	0000h (info level)
 02h	DWORD	disk serial number (binary)
 06h 11 BYTEs	volume label or "NO NAME    " if none present
 11h  8 BYTEs	(AL=00h only) filesystem type (see #01767)
Note:	under MS-DOS 7.0 or a Windows95 DOS box, the volume label field can be
	  all blanks even when a volume label has been set (the Win95
	  installation seems to blank the volume label field in the partition
	  boot sector; once LABEL has been run, the volume label is reported
	  correctly)
SeeAlso: AH=4Eh

(Table 01767)
Values for filesystem type:
 "FAT12	  "	12-bit FAT
 "FAT16	  "	16-bit FAT
 "CDROM	  "	High-Sierra CD-ROM filesystem
 "CD001	  "	ISO 9660 CD-ROM filesystem
 "CDAUDIO "	audio CD
SeeAlso: #01766

Top
216A - INT 21 U - DOS 4.0+ - COMMIT FILE
INT 21 U - DOS 4.0+ - COMMIT FILE
	AH = 6Ah
	BX = file handle
Return: CF clear if successful
	    AH = 68h
	CF set on error
	    AX = error code (06h) (see #01680 at AH=59h/BX=0000h)
Note:	identical to AH=68h in DOS 5.0-6.0; not known whether this is the case
	  in DOS 4.x
SeeAlso: AH=68h

Top
216B - INT 21 U - DOS 4.0 internal - IFS IOCTL
INT 21 U - DOS 4.0 internal - IFS IOCTL
	AH = 6Bh
	AL = subfunction
	    00h ???
		DS:SI -> Current Directory Structure???
		CL = drive (1=A:)
	    01h ???
		DS:SI -> ???
		CL = file handle???
	    02h ???
		DS:SI -> Current Directory Structure???
		DI = ???
		CX = drive (1=A:)
Return: CF set on error
	    AX = error code (see #01680 at INT 21/AH=59h/BX=0000h)
	CF clear if successful
Notes:	passed through to INT 2F/AX=112Fh with AX on top of stack
	Novell DOS 7 Update 15 returns CF set/AX=0001h (invalid function)
SeeAlso: AH=6Bh"DOS 5",INT 2F/AX=112Fh

Top
216B - INT 21 U - DOS 5+ - NULL FUNCTION
INT 21 U - DOS 5+ - NULL FUNCTION
	AH = 6Bh
Return: AL = 00h
Note:	this function does nothing and returns immediately
SeeAlso: AH=6Bh"DOS 4"

Top
216C00 - INT 21 - DOS 4.0+ - EXTENDED OPEN/CREATE
INT 21 - DOS 4.0+ - EXTENDED OPEN/CREATE
	AX = 6C00h
	BL = open mode as in AL for normal open (see also AH=3Dh)
	    bit 7: inheritance
	    bits 4-6: sharing mode
	    bit 3 reserved
	    bits 0-2: access mode
		100 read-only, do not modify file's last-access time (DOS 7.0)
	BH = flags
	    bit 6 = auto commit on every write (see also AH=68h)
	    bit 5 = return error rather than doing INT 24h
	    bit 4 = (FAT32) extended size (allow 4GB files instead of 2GB)
	CX = create attribute (see #01769)
	DL = action if file exists/does not exist (see #01770)
	DH = 00h (reserved)
	DS:SI -> ASCIZ file name
Return: CF set on error
	   AX = error code (see #01680 at AH=59h/BX=0000h)
	CF clear if successful
	   AX = file handle
	   CX = status (see #01768)
Notes:	the PC LAN Program only supports existence actions (in DL) of 01h,
	  10h with sharing=compatibility, and 12h
	DR DOS reportedly does not support this function and does not return
	  an "invalid function call" error when this function is used.
	the documented bits of BX are stored in the SFT when the file is opened
	  (see #01641,#01642)
BUG:	this function has bugs (at least in DOS 5.0 and 6.2) when used with
	  drives handled via the network redirector (INT 2F/AX=112Eh):
	    - CX (attribute) is not passed to the redirector if DL=11h,
	    - CX does not return the status, it is returned unchanged because
	      DOS does a PUSH CX/POP CX when calling the redirector.
SeeAlso: AH=3Ch,AH=3Dh,AX=6C01h,AX=7160h/CL=00h,INT 2F/AX=112Eh

(Table 01768)
Values for extended open function status:
 01h	file opened
 02h	file created
 03h	file replaced

Bitfields for file create attribute:
Bit(s)	Description	(Table 01769)
 6-15	reserved
 5	archive
 4	reserved
 3	volume label
 2	system
 1	hidden
 0	readonly

Bitfields for action:
Bit(s)	Description	(Table 01770)
 7-4	action if file does not exist
	0000 fail
	0001 create
 3-0	action if file exists
	0000 fail
	0001 open
	0010 replace/open

Top
216D - INT 21 U - DOS 5+ ROM - FIND FIRST ROM PROGRAM
INT 21 U - DOS 5+ ROM - FIND FIRST ROM PROGRAM
	AH = 6Dh
	DS:DX -> ASCIZ program name (may contain wildcrds)
Return: CF clear if found
	    Disk Transfer Area filled with ROM search structure (see #01771)
	CF set if not found
	    AX = error code
		0002h name not found in ROM
		0003h name contains colon or backslash
	---if not supported (DOS <5, MS-DOS 5+ non-ROM versions)---
	AL = 00h
Notes:	the '*' wildcard matches all remaining characters in a ROM program's
	  name; any following characters in the search mask are ignored up to
	  another asterisk, which must be matched by an asterisk in the
	  found program's name.
	the search mask and program names may contain multiple periods
SeeAlso: AH=1Ah,AH=4Eh,AH=6Eh,AX=6F00h,AX=6F02h,INT 2F/AX=160Ch

Format of ROM search structure:
Offset	Size	Description	(Table 01771)
 00h 13 BYTEs	ASCIZ name of found ROM program
 0Dh	DWORD	address at which to resume search (do not modify)
 11h	var	ASCIZ search mask passed in (do not modify)

Top
216E - INT 21 U - DOS 5+ ROM - FIND NEXT ROM PROGRAM
INT 21 U - DOS 5+ ROM - FIND NEXT ROM PROGRAM
	AH = 6Eh
	Disk Transfer Area contains result of previous FindFirst ROM
	  (see AH=6Dh)
Return: CF clear if found
	    Disk Transfer Area filled with updated ROM search structure
	      (see #01771)
	CF set if not found
	    AX = 0012h (no more matches)
	---if not supported (DOS <5, MS-DOS 5+ non-ROM versions)---
	AL = 00h
SeeAlso: AH=4Fh,AH=6Dh

Top
216F00 - INT 21 U - DOS 5+ ROM - GET ROM SCAN START ADDRESS
INT 21 U - DOS 5+ ROM - GET ROM SCAN START ADDRESS
	AX = 6F00h
Return: CF clear
	AL = 00h
	    BX = current ROM scan starting segment if function supported
SeeAlso: AH=6Dh,AX=6F01h,AX=6F02h

Top
216F01 - INT 21 U - DOS 5+ ROM - SET ROM SCAN START ADDRESS
INT 21 U - DOS 5+ ROM - SET ROM SCAN START ADDRESS
	AX = 6F01h
	BX = new ROM scan starting address
Return: CF clear
	AL = 00h
SeeAlso: AX=6F00h,AX=6F03h

Top
216F02 - INT 21 U - DOS 5+ ROM - GET EXCLUSION REGION LIST
INT 21 U - DOS 5+ ROM - GET EXCLUSION REGION LIST
	AX = 6F02h
	ES:BX -> buffer for exclusion region list (see #01773)
Return: CF clear
	AL = 00h
	ES:BX = 0000h:0000h on error, unchanged if buffer filled
Note:	for DOS versions which do not support this function, the return value
	  is AL=00h, CF unchanged, ES:BX unchanged, and the ES:BX buffer
	  unchanged
SeeAlso: AX=6F00h,AX=6F03h

Format of ROM exclusion region list:
Offset	Size	Description	(Table 01773)
 00h	WORD	number of entries
 02h 2N WORDs	start/end segments of N excluded regions

Top
216F03 - INT 21 U - DOS 5+ ROM - SET EXCLUSION REGION LIST
INT 21 U - DOS 5+ ROM - SET EXCLUSION REGION LIST
	AX = 6F03h
	DS:DX -> new exclusion region list (see #01773)
Return: CF clear
	AL = 00h
Notes:	DOS saves only the pointer and assumes that the contents of the list
	  are never changed, and that regions do not overlap
	if AL > 03h on entry, DOS returns CF set/AL=01h
SeeAlso: AX=6F01h,AX=6F02h

Top
2170 - INT 21 - MS-DOS 7 (Windows95) - GET/SET INTERNATIONALIZATION INFORMATION
INT 21 - MS-DOS 7 (Windows95) - GET/SET INTERNATIONALIZATION INFORMATION
	AH = 70h
	AL = subfunction
	    00h get ??? info
		CX = buffer size (3Ah bytes needed)
		ES:DI -> buffer
	    01h set above info
		CX = number of bytes to set
		DS:SI -> buffer containing ??? info (see #01774)
	    02h set general internationalization info (see also AX=6500h)
		DS:SI -> buffer containing info (see #01775)
		CX = buffer size in bytes (up to 26h bytes used)
		first three bytes are skipped, the rest is copied to somewhere
		  in the DOS data segment
Return: CF clear if successful
	    ES:DI buffer filled (func 00h) (see #01774)
	    CX = number of bytes actually set or returned
		  (max 003Ah for functions 00h and 01h under v7.00, 0026h for
		  function 02h)
	CF set on error
	    AX = error code
		7000h if function not supported
SeeAlso: AH=38h,AH=65h

Format of MS-DOS v7.0 ??? table:
Offset	Size	Description	(Table 01774)
 00h 58 BYTEs	??? country-specific information
		returned was (among others) "ENU USA GR"..."AM PM M/d/yy"...
		 "dddd,MMMMdd,yyyy" in the German Preview version, and "US"
		 instead of "GR" in the US build 450 version (with German
		 country setting) and the US build 950a version with US
		 country settings
SeeAlso: #01775

Format of MS-DOS v7.0 internationalization table:
Offset	Size	Description	(Table 01775)
 00h  3 BYTEs	unused (and ignored by DOS)
 03h	WORD	country ID (see #01400 at AH=38h)
 05h	WORD	code page (see #01757)
 07h	WORD	date format
 09h  5 BYTEs	ASCIZ currency symbol string
 07h  2 BYTEs	ASCIZ thousands separator
 09h  2 BYTEs	ASCIZ decimal separator
 0Bh  2 BYTEs	ASCIZ date separator
 0Dh  2 BYTEs	ASCIZ time separator
 0Fh	BYTE	currency format
		bit 2 = set if currency symbol replaces decimal point
		bit 1 = number of spaces between value and currency symbol
		bit 0 = 0 if currency symbol precedes value
			1 if currency symbol follows value
 10h	BYTE	number of digits after decimal in currency
 11h	BYTE	time format
		bit 0 = 0 if 12-hour clock
			1 if 24-hour clock
 12h	DWORD	address of case map routine
		(FAR CALL, AL = character to map to upper case [>= 80h])
 16h  2 BYTEs	ASCIZ data-list separator
 18h 10 BYTEs	reserved
Note:	this table has the identical format to the extended country information
	  retrieved via AH=65h with info ID = 01h
SeeAlso: #01399,#01750

Top
2171 - INT 21 - Windows95 - LONG FILENAME FUNCTIONS
INT 21 - Windows95 - LONG FILENAME FUNCTIONS
	AH = 71h
	AL = function
	    0Dh reset drive (see AX=710Dh)
	    39h create directory (see AX=7139h)
	    3Ah remove directory (see AX=713Ah)
	    3Bh set current directory (see AX=713Bh)
	    41h delete file (see AX=7141h)
	    43h get/set file attributes (see AX=7143h)
	    47h get current directory (see AX=7147h)
	    4Eh find first file (see AX=714Eh)
	    4Fh find next file (see AX=714Fh)
	    56h move (rename) file (see AX=7156h)
	    60h truename (see AX=7160h/CL=00h,AX=7160h/CL=02h)
	    6Ch create/open file (see AX=716Ch)
	    A0h get volume information (see AX=71A0h)
	    A1h terminate FindFirst/FindNext (see AX=71A1h)
	    A6h get file information (see AX=71A6h)
	    A7h time conversion (see AX=71A7h/BL=00h,AX=71A7h/BL=01h)
	    A8h generate short filename (see AX=71A8h)
	    A9h server create/open file (see AX=71A9h)
	    AAh create/terminate SUBST (see AX=71AAh/BH=00h,AX=71AAh/BH=02h)
Return: CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
	CF clear if successful
	    other registers as for corresponding "old" DOS function
Notes:	if error 7100h is returned, the old-style function should be called
	AX=714Eh returns a "search handle" which must be passed to AX=714Fh;
	  when the search is complete, AX=71A1h must be called to terminate
	  the search
	for compatibility with DOS versions prior to v7.00, the carry flag
	  should be set on call to ensure that it is set on exit
	Caldera's DPMS-enabled LONGNAME.EXE BETA 1 extension for DR-DOS 7
	  supports the following sub-set of LFN functions: 39h, 3Ah, 3Bh, 41h,
	  43h (BL = 0, 1 only), 47h, 4Eh, 4Fh, 56h, 60h (CL = 0, 1, 2), 6Ch,
	  A0h, A1h, A8h. BETA 2 fixes LFN directory entry checksums, which
	  were causing wrong LFNs to be attached to a file. The 8.3 short
	  names for filenames with exactly 8 chars are no longer abbreviated
	  (e.g. LONGNAME.TXT -> LONGNAME.TXT, not LONGNA~1.TXT). BETA 3 has
	  A7h (BL=0, 1) functions added, and 4Eh/4Fh can return file times
	  in both DOS and 64 bit formats, BETA 4 has support added for
	  Caldera's DRFAT32 redirector extension (see INT 2F/AX=15xxh).
	Caldera's DR-OpenDOS 7.02+ COMMAND.COM utilizes the LFN API as soon
	  as it detects it (mind, that LONGNAME.EXE can be dynamically loaded
	  and unloaded at runtime). This COMMAND.COM shell also works under
	  MS-DOS/PC DOS and in DOS boxes of Windows9x, NT, 2000, and OS/2.
	For 4DOS 6.02+ to work with 3rd party LFN providers, the Win95LFN=Yes
	  directive should be inserted into the 4DOS.INI file.
	Mike Podanoffsky's RxDOS 7.2 provides most of this API natively,
	  including functions 39h, 3Ah, 3Bh, 41h, 43h (BL = ???), 47h, 4Bh,
	  4Eh, 4Fh, 56h, 60h (CL = 0, 1, 2, no CH), 6Ch, A0h, A1h and A7h.
	  However, not all sub-functions seem to be supported yet.
SeeAlso: AH=39h,AH=3Ah,AH=3Bh,AH=41h,AX=4300h,AX=4301h,AX=4304h,AX=4306h
SeeAlso: AX=4307h,AH=47h,AH=4Eh,AH=4Fh,AH=56h,AH=6Ch,AX=714Eh,AX=714Fh

Top
21710D - INT 21 - Windows95 - RESET DRIVE
INT 21 - Windows95 - RESET DRIVE
	AX = 710Dh
	CX = action (see #01777)
	DX = drive number
Return: CF clear
Note:	for compatibility with DOS versions prior to v7.00, the carry flag
	  should be set on call to ensure that it is set on exit
SeeAlso: AH=0Dh

(Table 01777)
Values for drive reset action:
 0000h	flush filesystem buffers for drive, and reset drive
 0001h	flush filesystem buffers and cache for drive, and reset drive
 0002h	remount DriveSpace volume

Top
217139 - INT 21 - Windows95 - LONG FILENAME - MAKE DIRECTORY
INT 21 - Windows95 - LONG FILENAME - MAKE DIRECTORY
	AX = 7139h
	DS:DX -> ASCIZ long directory name (including path)
Return: CF clear if successful
	CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
Note:	for compatibility with DOS versions prior to v7.00, the carry flag
	  should be set on call to ensure that it is set on exit
SeeAlso: AH=39h,AX=713Ah,AX=713Bh,AX=43FFh/BP=5053h

Top
21713A - INT 21 - Windows95 - LONG FILENAME - REMOVE DIRECTORY
INT 21 - Windows95 - LONG FILENAME - REMOVE DIRECTORY
	AX = 713Ah
	DS:DX -> ASCIZ long name of directory to remove
Return: CF clear if successful
	CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
Note:	for compatibility with DOS versions prior to v7.00, the carry flag
	  should be set on call to ensure that it is set on exit
SeeAlso: AH=3Ah,AX=7139h

Top
21713B - INT 21 - Windows95 - LONG FILENAME - CHANGE DIRECTORY
INT 21 - Windows95 - LONG FILENAME - CHANGE DIRECTORY
	AX = 713Bh
	DS:DX -> ASCIZ long name of directory to make current
Return: CF clear if successful
	CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
Note:	for compatibility with DOS versions prior to v7.00, the carry flag
	  should be set on call to ensure that it is set on exit
SeeAlso: AH=0Eh,AH=3Bh,AX=7139h

Top
217141 - INT 21 - Windows95 - LONG FILENAME - DELETE FILE
INT 21 - Windows95 - LONG FILENAME - DELETE FILE
	AX = 7141h
	DS:DX -> ASCIZ long name of file to delete
	SI = wildcard and attributes flag
		0000h wildcards are not allowed, and search attributes are
			ignored
		0001h wildcards are allowed, and only files with matching
			names and attributes are deleted
	CL = search attributes
	CH = must-match attributes
Return: CF clear if successful
	CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
Note:	for compatibility with DOS versions prior to v7.00, the carry flag
	  should be set on call to ensure that it is set on exit
SeeAlso: AH=41h

Top
217143 - INT 21 - Windows95 - LONG FILENAME - EXTENDED GET/SET FILE ATTRIBUTES
INT 21 - Windows95 - LONG FILENAME - EXTENDED GET/SET FILE ATTRIBUTES
	AX = 7143h
	DS:DX -> ASCIZ filename
	BL = action
	    00h retrieve attributes
		Return:	CX = file attributes (see #01420)
	    01h set attributes
		CX = attributes
	    02h get physical size of compressed file
		Return: DX:AX = actual disk usage of file, in bytes
	    03h set last write date/time
		DI = new last-write date (see #01666)
		CX = new last-write time (see #01665)
	    04h get last write date/time
		Return:	CX = last write time (see #01665)
			DI = last write date (see #01666)
	    05h set last access date
		DI = new last-access date (see #01666)
	    06h get last access date
		Return:	DI = last access date (see #01666)
	    07h set creation date/time
		DI = new creation date (see #01666)
		CX = new creation time (see #01665)
		SI = hundredths (10-millisecond units past time in CX, 0-199)
	    08h get creation date/time
		Return:	CX = creation time (see #01665)
			DI = creation date (see #01666)
			SI = hundredths (10-millisecond units past time in CX)
Return: CF clear if successful
	CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
Note:	for compatibility with DOS versions prior to v7.00, the carry flag
	  should be set on call to ensure that it is set on exit
SeeAlso: AX=4300h,AX=4301h

Top
217147 - INT 21 - Windows95 - LONG FILENAME - GET CURRENT DIRECTORY
INT 21 - Windows95 - LONG FILENAME - GET CURRENT DIRECTORY
	AX = 7147h
	DL = drive number (00h = current, 01h = A:, etc.)
	DS:SI -> buffer for ASCIZ directory name
Return: CF clear if successful
	CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
Notes:	the returned pathname does not include the drive letter, colon, or
	  leading backslash, and is not necessarily a long filename -- this
	  function returns whatever path was used when changing to the
	  current directory, and may include a mixture of long and short
	  components
	the provided buffer must be at least as large as the value indicated
	  by AX=71A0h
	for compatibility with DOS versions prior to v7.00, the carry flag
	  should be set on call to ensure that it is set on exit
SeeAlso: AH=47h,AX=713Bh,AX=7160h,AX=71A0h

Top
21714E - INT 21 - Windows95 - LONG FILENAME - FIND FIRST MATCHING FILE
INT 21 - Windows95 - LONG FILENAME - FIND FIRST MATCHING FILE
	AX = 714Eh
	CL = allowable-attributes mask (see #01420 at AX=4301h)
	      (bits 0 and 5 ignored)
	CH = required-attributes mask (see #01420)
	SI = date/time format (see #01778)
	DS:DX -> ASCIZ filespec (both "*" and "*.*" match any filename)
	ES:DI -> FindData record (see #01779)
Return: CF clear if successful
	    AX = filefind handle (needed to continue search)
	    CX = Unicode conversion flags (see #01780)
	CF set on error
	    AX = error code
		7100h if function not supported
Notes:	this function is only available when IFSMgr is running, not under bare
	  MS-DOS 7
	the application should close the filefind handle with AX=71A1h as soon
	  as it has completed its search
	for compatibility with DOS versions prior to v7.00, the carry flag
	  should be set on call to ensure that it is set on exit
SeeAlso: AH=4Eh,AX=714Fh,AX=71A1h

(Table 01778)
Values for Windows95 date/time format:
 0000h	use 64-bit file time format
 0001h	use MS-DOS date/time values (see #01665,#01666) in low double-word of
	  file time QWORD (date is high word, time is low word of double-word)
SeeAlso: #01779

Format of Windows95 long filename FindData record:
Offset	Size	Description	(Table 01779)
 00h	DWORD	file attributes
		bits 0-6 standard DOS attributes (see #01420 at INT 21/AX=4301h)
		bit 8: temporary file
 04h	QWORD	file creation time (number of 100ns intervals since 1/1/1601)
 0Ch	QWORD	last access time
 14h	QWORD	last modification time
 1Ch	DWORD	file size (high 32 bits)
 20h	DWORD	file size (low 32 bits)
 24h  8 BYTEs	reserved (apparently unused)
 2Ch 260 BYTEs	ASCIZ full filename
130h 14 BYTEs	ASCIZ short filename (for backward compatibility)
Note:	under Windows95B, the ASCIZ short filename will be the empty string
	  if the directory does not contain a long filename entry for the
	  file; in that case, the application should use the full filename
SeeAlso: #01780

Bitfields for Windows95 Unicode conversion flags:
Bit(s)	Description	(Table 01780)
 0	the returned full filename contains underscores for un-convertable
	  Unicode characters
 1	the returned short filename contains underscores for un-convertable
	  Unicode characters
SeeAlso: #01779

Top
21714F - INT 21 - Windows95 - LONG FILENAME - FIND NEXT MATCHING FILE
INT 21 - Windows95 - LONG FILENAME - FIND NEXT MATCHING FILE
	AX = 714Fh
	BX = filefind handle (from AX=714Eh)
	SI = date/time format (see #01778)
	ES:DI -> buffer for FindData record (see #01779)
Return: CF clear if successful
	    AH = 4Fh (undocumented)
	    AL destroyed (becomes low byte of filefind handle in Win95B)
	    CX = Unicode conversion flags (see #01780)
	CF set on error
	    AX = error code
		7100h if function not supported
Notes:	this function is only available when IFSMgr is running, not under bare
	  MS-DOS 7
	for compatibility with DOS versions prior to v7.00, the carry flag
	  should be set on call to ensure that it is set on exit
SeeAlso: AH=4Eh,AX=714Eh,AX=71A1h,AX=71A2h

Top
217156 - INT 21 - Windows95 - LONG FILENAME - RENAME FILE
INT 21 - Windows95 - LONG FILENAME - RENAME FILE
	AX = 7156h
	DS:DX -> ASCIZ old file or directory name (long names allowed)
	ES:DI -> ASCIZ new name (long names allowed)
Return: CF clear if successful
	CF set on error
	    AX = error code
		7100h if function not supported
Note:	the file may be renamed into a different directory, but not across
	  disks
SeeAlso: AH=56h,AX=7141h,AX=43FFh/BP=5053h

Top
217160CL00 - INT 21 - Windows95 - LONG FILENAME - "TRUENAME" - CANONICALIZE PATH
INT 21 - Windows95 - LONG FILENAME - "TRUENAME" - CANONICALIZE PATH
	AX = 7160h
	CL = 00h
	CH = SUBST expansion flag
	    00h return a path containing true path for a SUBSTed drive letter
	    80h return a path containing the SUBSTed drive letter
	DS:SI -> ASCIZ filename or path (either long name or short name)
	ES:DI -> 261-byte buffer for canonicalized name
Return: CF set on error
	    AX = error code
		02h invalid component in directory path or drive letter only
		03h malformed path or invalid drive letter
	    ES:DI buffer unchanged
	CF clear if successful
	    ES:DI buffer filled with fully qualified name
	    AX destroyed
Desc:	determine the canonical name of the specified filename or path,
	  corresponding to the undocumented TRUENAME command in COMMAND.COM
Notes:	if a complete path is given, the result will be a short-form complete
	  path; otherwise, the given relative path is appended to the
	  short-form current directory name, '.'/'..'/'...'/etc. are resolved,
	  and the final result uppercased without converting any remaining
	  long-form names to short-form
	for compatibility with DOS versions prior to v7.00, the carry flag
	  should be set on call to ensure that it is set on exit
BUG:	Windows95 incorrectly treats filenames where the first two characters
	  after the drive letter and colon are both slashes (either forward
	  or backward) as a UNC (network name) and requires several seconds
	  to attempt to resolve the name before returning an unchanged
	  string
SeeAlso: AH=60h,AX=7160h/CL=01h

Top
217160CL01 - INT 21 - Windows95 - LONG FILENAME - GET SHORT (8.3) FILENAME FOR FILE
INT 21 - Windows95 - LONG FILENAME - GET SHORT (8.3) FILENAME FOR FILE
	AX = 7160h
	CL = 01h
	CH = SUBST expansion flag
	    00h return a path containing true path for a SUBSTed drive letter
	    80h return a path containing the SUBSTed drive letter
	DS:SI -> ASCIZ long filename or path
	ES:DI -> 67-byte (possibly 128-byte) buffer for short filename
Return: CF set on error
	    AX = error code
		02h invalid component in directory path or drive letter only
		03h malformed path or invalid drive letter
	    ES:DI buffer unchanged
	CF clear if successful
	    ES:DI buffer filled with equivalent short filename (full path,
		  even if relative path given, and all uppercase)
Note:	this call returns the short name for any long-filename portions of
	  the provided pathname or filename
SeeAlso: AH=60h,AX=7160h/CL=00h,AX=7160h/CL=02h

Top
217160CL02 - INT 21 - Windows95 - LONG FILENAME - GET CANONICAL LONG FILENAME OR PATH
INT 21 - Windows95 - LONG FILENAME - GET CANONICAL LONG FILENAME OR PATH
	AX = 7160h
	CL = 02h
	CH = SUBST expansion flag
	    00h return a path containing true path for a SUBSTed drive letter
	    80h return a path containing the SUBSTed drive letter
	DS:SI -> ASCIZ short filename or path
	ES:DI -> 261-byte buffer for canonicalized long name
Return: CF set on error
	    AX = error code
		02h invalid component in directory path or drive letter only
		03h malformed path or invalid drive letter
	    ES:DI buffer unchanged
	CF clear if successful
	    ES:DI buffer filled with qualified long name (can contain
		  lowercase letters)
Desc:	determine the canonical name of the specified filename or path,
	  corresponding to the undocumented TRUENAME command in COMMAND.COM
BUGS:	even though the maximum length of a complete long pathname is 260
	  characters, Windows95 returns CF set/AX=0003h even if the file
	  exists whenever the full pathname is more than 255 characters
	Windows95 incorrectly treats filenames where the first two characters
	  after the drive letter and colon are both slashes (either forward
	  or backward) as a UNC (network name) and requires several seconds
	  to attempt to resolve the name before returning an unchanged
	  string
SeeAlso: AH=60h,AX=7160h/CL=00h,AX=7160h/CL=01h

Top
21716C - INT 21 - Windows95 - LONG FILENAME - CREATE OR OPEN FILE
INT 21 - Windows95 - LONG FILENAME - CREATE OR OPEN FILE
	AX = 716Ch
	BX = access mode and sharing flags (see #01782,also AX=6C00h)
	CX = attributes
	DX = action (see #01781)
	DS:SI -> ASCIZ filename
	DI = alias hint (number to append to short filename for disambiguation)
Return: CF clear if successful
	    AX = file handle
	    CX = action taken
		0001h file opened
		0002h file created
		0003h file replaced
	CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
SeeAlso: AX=6C00h,AX=7141h,AX=7156h,AX=71A9h

Bitfields for Windows95 long-name open action:
Bit(s)	Description	(Table 01781)
 0	open file (fail if file does not exist)
 1	truncate file if it already exists (fail if file does not exist)
 4	create new file if file does not already exist (fail if exists)
Note:	the only valid combinations of multiple flags are bits 4&0 and 4&1

Bitfields for Windows95 file access/sharing modes:
Bit(s)	Description	(Table 01782)
 2-0	file access mode
	000 read-only
	001 write-only
	010 read-write
	100 read-only, do not modify file's last-access time
 6-4	file sharing modes
 7	no-inherit flag
 8	do not buffer data (requires that all reads/writes be exact physical
	  sectors)
 9	do not compress file even if volume normally compresses files
 10	use alias hint in DI as numeric tail for short-name alias
 12-11	unused??? (0)
 13	return error code instead of generating INT 24h if critical error
	  while opening file
 14	commit file after every write operation
SeeAlso: #01402

Top
2171A0 - INT 21 - Windows95 - LONG FILENAME - GET VOLUME INFORMATION
INT 21 - Windows95 - LONG FILENAME - GET VOLUME INFORMATION
	AX = 71A0h
	DS:DX -> ASCIZ root name (e.g. "C:\")
	ES:DI -> buffer for file system name
	CX = size of ES:DI buffer
Return: CF clear if successful
	    AX destroyed (0000h and 0200h seen)
	    BX = file system flags (see #01783)
	    CX = maximum length of file name [usually 255]
	    DX = maximum length of path [usually 260]
	    ES:DI buffer filled (ASCIZ, e.g. "FAT","NTFS","CDFS")
	CF set on error
	    AX = error code
		7100h if function not supported
Notes:	for the file system name buffer, 32 bytes should be sufficient; that's
	 what is used in some sample code by Walter Oney from Microsoft.
	this function accesses the disk the first time it is called
BUG:	this function returns DX=0000h for CD-ROM drives under Win95 SP1
SeeAlso: AX=714Eh,AX=7160h/CL=00h

Bitfields for long filename volume information flags:
Bit(s)	Description	(Table 01783)
 0	searches are case sensitive
 1	preserves case in directory entries
 2	uses Unicode characters in file and directory names
 3-13	reserved (0)
 14	supports DOS long filename functions
 15	volume is compressed

Top
2171A1 - INT 21 - Windows95 - LONG FILENAME - "FindClose" - TERMINATE DIRECTORY SEARCH
INT 21 - Windows95 - LONG FILENAME - "FindClose" - TERMINATE DIRECTORY SEARCH
	AX = 71A1h
	BX = filefind handle (from AX=714Eh)
Return: CF clear if successful
	CF set on error
	   AX = error code
		7100h if function not supported
Notes:	this function must be called after starting a search with AX=714Eh,
	  to indicate that the search handle returned by that function will
	  no longer be used
	this function is only available when IFSMgr is running, not under bare
	  MS-DOS 7
SeeAlso: AH=4Eh,AX=714Eh,AX=714Fh

Top
2171A2 - INT 21 U - Windows95 - internal - LONG FILENAME - FIND NEXT MATCHING FILE
INT 21 U - Windows95 - internal - LONG FILENAME - FIND NEXT MATCHING FILE
	AX = 71A2h
	BX = filefind handle (from AX=714Eh)
	SI = date/time format (see #01778)
	ES:DI -> buffer for FindData record (see #01779)
Return: CF clear if successful
	    AX = 71A2h
	    CX = Unicode conversion flags (see #01780)
	CF set on error
	    AX = error code
		7100h if function not supported
Notes:	this function is only available when IFSMgr is running, not under bare
	  MS-DOS 7; it is functionally identical to AX=714Fh
	documented as "for internal use by Windows 95 only"

Top
2171A3 - INT 21 U - Windows95 - internal
INT 21 U - Windows95 - internal
	AX = 71A3h
	???
Return: ???
Note:	documented as "for internal use by Windows 95 only"

Top
2171A4 - INT 21 U - Windows95 - internal
INT 21 U - Windows95 - internal
	AX = 71A4h
	???
Return: ???
Note:	documented as "for internal use by Windows 95 only"

Top
2171A5 - INT 21 U - Windows95 - internal
INT 21 U - Windows95 - internal
	AX = 71A5h
	???
Return: ???
Note:	documented as "for internal use by Windows 95 only"

Top
2171A6 - INT 21 - Windows95 - LONG FILENAME - GET FILE INFO BY HANDLE
INT 21 - Windows95 - LONG FILENAME - GET FILE INFO BY HANDLE
	AX = 71A6h
	BX = file handle
	DS:DX -> buffer for file information (see #01784)
	CF set
Return: CF clear if successful
	    file information record filled
	CF set on error
	    AX = error code
		7100h if function not supported
SeeAlso: AX=71A7h/BL=00h

Format of Windows95 file information:
Offset	Size	Description	(Table 01784)
 00h	DWORD	file attributes
 04h	QWORD	creation time (0 = unsupported)
 0Ch	QWORD	last access time (0 = unsupported)
 14h	QWORD	last write time
 1Ch	DWORD	volume serial number
 20h	DWORD	high 32 bits of file size
 24h	DWORD	low 32 bits of file size
 28h	DWORD	number of links to file
 2Ch	DWORD	unique file identifier (high 32 bits)
 30h	DWORD	unique file identifier (low 32 bits)
Note:	the file identifer and volume serial number together uniquely identify
	  a file while it is open; the identifier may change when the system
	  is restarted or the file is first opened

Top
2171A7BL00 - INT 21 - Windows95 - LONG FILENAME - FILE TIME TO DOS TIME
INT 21 - Windows95 - LONG FILENAME - FILE TIME TO DOS TIME
	AX = 71A7h
	BL = 00h
	DS:SI -> QWORD file time
Return: CF clear if successful
	    CX = DOS time (see #01665)
	    DX = DOS date (see #01666)
	    BH = hundredths (10-millisecond units past time in CX)
	CF set on error
	    AX = error code
		7100h if function not supported
Desc:	convert Win95 64-bit file time (UTC) into DOS-style date and time
	  (local timezone)
Note:	the conversion fails if the file time's value is outside the range
	  01jan1980 and 31dec2107
SeeAlso: AX=71A6h,AX=71A7h/BL=01h

Top
2171A7BL01 - INT 21 - Windows95 - LONG FILENAME - DOS TIME TO FILE TIME
INT 21 - Windows95 - LONG FILENAME - DOS TIME TO FILE TIME
	AX = 71A7h
	BL = 01h
	CX = DOS time (see #01665)
	DX = DOS date (see #01666)
	BH = hundredths (10-millisecond units past time in CX)
	ES:DI -> buffer for QWORD file time
Return: CF clear if successful
	    ES:DI buffer filled
	CF set on error
	    AX = error code
		7100h if function not supported
Desc:	convert DOS-style date and time (local timezone) into Win95 64-bit
	  file time (UTC)
SeeAlso: AX=71A6h,AX=71A7h/BL=00h

Top
2171A8 - INT 21 - Windows95 - LONG FILENAME - GENERATE SHORT FILENAME
INT 21 - Windows95 - LONG FILENAME - GENERATE SHORT FILENAME
	AX = 71A8h
	DS:SI -> ASCIZ long filename (no path allowed!)
	ES:DI -> buffer for ASCIZ short filename
	DH = short name's format
	    00h 11-char directory entry/FCB filename format
	    01h DOS 8.3
	DL = character sets
	    bits 7-4: short name's character set (see #01785)
	    bits 3-0: long name's character set (see #01785)
Return: CF clear if successful
	    ES:DI buffer filled
	CF set on error
	    AX = error code
		7100h if function not supported
Note:	this function uses the same algorithm as the filesystem except that
	  the returned name never has a numeric tail for disambiguation
SeeAlso: AX=7160h/CL=00h,AX=7160h/CL=02h,AX=71A7h/BL=00h

(Table 01785)
Values for Windows95 filename character set:
 00h	Windows ANSI
 01h	current OEM character set
 02h	Unicode

Top
2171A9 - INT 21 - Windows95 - LONG FILENAME - SERVER CREATE OR OPEN FILE
INT 21 - Windows95 - LONG FILENAME - SERVER CREATE OR OPEN FILE
	AX = 71A9h
	BX = access mode and sharing flags (see #01782,also AX=6C00h)
	CX = attributes
	DX = action (see #01781)
	DS:SI -> ASCIZ filename
	DI = alias hint (number to append to short filename for disambiguation)
Return: CF clear if successful
	    AX = global file handle
	    CX = action taken
		0001h file opened
		0002h file created
		0003h file replaced
	CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
Note:	for use by real-mode servers only
SeeAlso: AX=6C00h,AX=716Ch

Top
2171AABH00 - INT 21 - Windows95 - LONG FILENAME - CREATE SUBST
INT 21 - Windows95 - LONG FILENAME - CREATE SUBST
	AX = 71AAh
	BH = 00h
	BL = drive number (00h = default, 01h = A:, etc.)
	DS:DX -> ASCIZ pathname to associate with drive letter
Return: CF clear if successful
	CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
SeeAlso: AX=71AAh/BH=01h,AX=71AAh/BH=02h,INT 2F/AX=1000h,#01643

Top
2171AABH01 - INT 21 - Windows95 - LONG FILENAME - TERMINATE SUBST
INT 21 - Windows95 - LONG FILENAME - TERMINATE SUBST
	AX = 71AAh
	BH = 01h
	BL = drive number (01h = A:, etc.)
Return: CF clear if successful
	CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
Note:	the specified drive number may not be 00h (default), and presumably not
	  the current drive either
SeeAlso: AX=71AAh/BH=00h,AX=71AAh/BH=02h,INT 2F/AX=1000h,#01643

Top
2171AABH02 - INT 21 - Windows95 - LONG FILENAME - QUERY SUBST
INT 21 - Windows95 - LONG FILENAME - QUERY SUBST
	AX = 71AAh
	BH = 02h
	BL = drive number (01h = A:, etc.)
	DS:DX -> buffer for ASCIZ pathname associated with drive letter
Return: CF clear if successful
	    DS:DX buffer filled
	CF set on error
	    AX = error code (see #01680)
		7100h if function not supported
Note:	the specified drive number may not be 00h (default drive)
SeeAlso: AX=71AAh/BH=00h,AX=71AAh/BH=01h,INT 2F/AX=1000h,#01643

Top
2172 - INT 21 - Windows95 beta - LFN-FindClose
INT 21 - Windows95 beta - LFN-FindClose
	AH = 72h
	details not available
Return:	CF clear if successful
	CF set on error
	    AX = error code (see #01680)
		7200h if function not supported (e.g. under bare MS-DOS 7)
Note:	this function was present in beta versions of Windows95, but is
	  probably not present in the release version
SeeAlso: AX=71A1h

Top
2173 - INT 21 - MS-DOS 7 - DRIVE LOCKING AND FLUSHING
INT 21 - MS-DOS 7 - DRIVE LOCKING AND FLUSHING
	AH = 73h
	DL = drive (0=current, 1=A:, etc.)
	CL = which flag to get or set
	    00h drive flag???
	    01h drive's dirty-buffers flag
	AL = subfunction
	    00h get indicated flag
	    01h set ???
		CH = new value for indicated flag
		    bit 1: ??? (CL=00h only)
		    bit 3: dirty buffers exist for selected drive (CL=01h only)
Return: CF clear if successful
	    for AL=00h:
		AL = value of CL on entry
		for CL=00h: AH = new flag and 06h (i.e. bits 1 and 2 used)
		for CL=01h: AH = new flag and 08h (i.e. bit 3 used)
		(flag being taken from a table of bytes)
	CF set on error
	    AX = error code (01h,0Fh,etc.) (see #01680)
		7300h if function not supported
Note:	these two subfunctions are available even when only the MS-DOS kernel
	  is running

Top
217302 - INT 21 - Windows95 - FAT32 - "Get_ExtDPB" - GET EXTENDED DPB
INT 21 - Windows95 - FAT32 - "Get_ExtDPB" - GET EXTENDED DPB
	AX = 7302h
	DL = drive number (00h=default, 01h=A:, etc.)
	ES:DI -> buffer for returned data (see #01786)
	CX = length of buffer (003Fh for Windows95)
	SI = signature (undocumented, must be F1A6h to get device driver
	      address and next-DBP pointer) (see #01787)
Return: CF clear if successful
	    ES:DI buffer filled
	CF set on error
	    AX = error code
	       0018h bad buffer length
SeeAlso: AX=7303h,AX=7304h,AH=1Fh,AH=32h

Format of Get_ExtDPB data buffer:
Offset	Size	Description	(Table 01786)
 00h	WORD	(call) length of following data (003Dh)
 02h 61 BYTEs	(ret) drive parameter block (DPB) (see #01787)
 
Format of Extended Drive Parameter Block:
Offset	Size	Description	(Table 01787)
 00h 24 BYTEs	standard DOS 4+ DPB
 18h	BYTE	"dpb_flags" (undocumented)
		FFh force media check
 19h	DWORD	pointer to next DPB (see note)
 1Dh	WORD	cluster at which to start search for free space when writing,
		usually the last cluster allocated
 1Fh	WORD	number of free clusters on drive, FFFFh = unknown
 21h	WORD	high word of free cluster count
 23h	WORD	active FAT/mirroring
		bit 7: do not mirror active FAT to inactive FATs
		bits 6-4: reserved (0)
		bits 3-0: the 0-based FAT number of the active FAT
		    (only meaningful if mirroring disabled)		
 25h	WORD	sector number of file system information sector, or
		  FFFFh for none (see also #01788)
 27h	WORD	sector number of backup boot sector, or FFFFh for none
 29h	DWORD	first sector number of the first cluster
 2Dh	DWORD	maximum cluster number
 31h	DWORD	number of sectors occupied by FAT
 35h	DWORD	cluster number of start of root directory
 39h	DWORD	cluster number at which to start searching for free space
Notes:	except for offset 18h, all of the first 33 bytes are identical to
	  the standard DOS 4-6 DPB
	unless the proper value is given in SI on entry to "Get_ExtDBP", the
	  next-DPB pointer and device driver address are set to 0000h:0000h
SeeAlso: #01786,#01395 at AH=32h,#01664

Format of File System Information structure:
Offset	Size	Description	(Table 01788)
 00h	DWORD	signature 61417272h
 04h	DWORD	number of free clusters (FFFFFFFFh if unknown)
 08h	DWORD	most recently allocated cluster
 0Ch 12 BYTEs	reserved
SeeAlso: #01787

Top
217303 - INT 21 - Windows95 - FAT32 - GET EXTENDED FREE SPACE ON DRIVE
INT 21 - Windows95 - FAT32 - GET EXTENDED FREE SPACE ON DRIVE
	AX = 7303h
	DS:DX -> ASCIZ string for drive ("C:\" or "\\SERVER\Share")
	ES:DI -> buffer for extended free space structure (see #01789)
	CX = length of buffer for extended free space
Return: CF clear if successful
	    ES:DI buffer filled
	CF set on error
	    AX = error code
Notes:	on DOS versions which do not support the FAT32 calls, this function
	  returns CF clear/AL=00h (which is the DOS v1+ method for reporting
	  unimplemented functions)
	under DOS 7.x (i.e. "MSDOS Mode" under Windows95), the ASCIZ string
	  pointed at by DS:DX *must* include the drive letter, or this function
	  will return CF set/AX=0015h (invalid drive).	In a DOS box, omitting
	  the drive letter (DS:DX -> "\") results in the free space for the
	  current default drive, as expected
BUG:	this function returns a maximum of 2GB free space even on an FAT32
	  partition larger than 2GB under some versions of Win95 and Win98,
	  apparently by limiting the number of reported free clusters to no
	  more than 64K -- but only in a DOS window if a TSR has hooked INT 21h
SeeAlso: AX=7302h,AX=7304h,AX=7305h,AH=36h

Format of extended free space structure:
Offset	Size	Description	(Table 01789)
 00h	WORD	(ret) size of returned structure
 02h	WORD	(call) structure version (0000h)
		(ret) actual structure version (0000h)
 04h	DWORD	number of sectors per cluster (with adjustment for compression)
 08h	DWORD	number of bytes per sector
 0Ch	DWORD	number of available clusters
 10h	DWORD	total number of clusters on the drive
 14h	DWORD	number of physical sectors available on the drive, without
		  adjustment for compression
 18h	DWORD	total number of physical sectors on the drive, without
		  adjustment for compression
 1Ch	DWORD	number of available allocation units, without adjustment
		  for compression
 20h	DWORD	total allocation units, without adjustment for compression
 24h  8 BYTEs	reserved

Top
217304 - INT 21 - Windows95 - FAT32 - Set DPB TO USE FOR FORMATTING
INT 21 - Windows95 - FAT32 - Set DPB TO USE FOR FORMATTING
	AX = 7304h
	DL = drive number (00h=default, 01h=A:, etc.)
	CX = size of buffer (must be at least 18h)
	ES:DI -> buffer for Set_DPBforFormat structure (see #01790)
Return: CF clear if successful
	    ES:DI buffer updated
	CF set on error
	    AX = error code (18h = bad length in CX)
SeeAlso: AX=7302h,AX=7303h,AX=7305h

Format of Set_DPBforFormat structure:
Offset	Size	Description	(Table 01790)
 00h	WORD	(call) size
 02h	WORD	(call) structure version???  (0000h)
		(ret) ???
 04h	DWORD	(call) function number
		00h invalidate DPB counts
		01h rebuild DPB from BPB
		02h force media change (next access to drive rebuild DPB)
		03h get/set active FAT number and mirroring
		04h get/set root directory cluster number
---function 00h---
 08h	DWORD	new DPB free count (00000000h=no change, FFFFFFFFh=unknown)
 0Ch	DWORD	new DPB next-free (00000000h=no change, FFFFFFFFh=unknown)
 10h	DWORD	unused
 14h	DWORD	unused
---function 01h---
 08h	DWORD	unused???
 0Ch	DWORD	(call) -> BIOS Parameter Block from which to rebuild DPB
 10h	DWORD	unused
 14h	DWORD	unused
---function 02h---
 08h	DWORD	unused
 0Ch	DWORD	unused
 10h	DWORD	unused
 14h	DWORD	unused
---function 03h---
 08h	DWORD	(call) new active FAT/mirroring state, or FFFFFFFFh to get
		bits 3-0: the 0-based FAT number of the active FAT
		bits 6-4: reserved (0)
		bit 7: do not mirror active FAT to inactive FATs
 0Ch	DWORD	(ret) previous active FAT/mirroring state (as above)
 10h	DWORD	unused
 14h	DWORD	unused
---function 04h---
 08h	DWORD	(call) new root directory cluster number
		    FFFFFFFFh to get current
 0Ch	DWORD	(ret) previous root directory cluster number
 10h	DWORD	unused
 14h	DWORD	unused

Top
217305CXFFFF - INT 21 - Windows95 - FAT32 - EXTENDED ABSOLUTE DISK READ/WRITE
INT 21 - Windows95 - FAT32 - EXTENDED ABSOLUTE DISK READ/WRITE
	AX = 7305h
	CX = FFFFh
	DL = drive number (01h=A:, etc.)
	SI = read/write mode flags (see #01791)
	DS:BX -> disk I/O packet (see #02548 at INT 25)
Return: CF clear if successful
	CF set on error
	    AX = error code
Note:	one can not specify the default drive (DL=00h) for this function.
SeeAlso: AX=7302h,AX=7304h,INT 25,INT 26

Bitfields for Extended Absolute Disk Read/Write mode flags:
Bit(s)	Description	(Table 01791)
 0	direction (0=read, 1=write)
 12-1	reserved (0)
 14-13	write type (should be 00 on reads)
	00 unknown data
	01 FAT data
	10 directory data
	11 file data
 15	reserved (0)

Top
2180 - INT 21 - European MS-DOS 4.0 - "AEXEC" - EXECUTE PROGRAM IN BACKGROUND
INT 21 - European MS-DOS 4.0 - "AEXEC" - EXECUTE PROGRAM IN BACKGROUND
	AH = 80h
	CX = mode
	    0000h place child in zombie mode on exit to preserve exit code
	    0001h discard child process and exit code on termination
	DS:DX -> ASCIZ full program name
	ES:BX -> parameter block (as for AX=4B00h)
Return: CF clear if successful
	    AX = Command Subgroup ID (CSID)
	CF set on error
	    AX = error code (see #01680 at AH=59h/BX=0000h)
Program: European MS-DOS 4.0 was written for Siemens in Germany and then used
	  by several other European OEMs; its release falls between mainstream
	  versions 3.2 and 3.3
Desc:	asynchronously execute a program, creating a new process for it
Notes:	this function is called by the DETACH command
	there is a system-wide limit of 32 processes
	the CSID is used to identify all processes that have been spawned by
	  a given process, whether directly or indirectly
	programs to be run in the background must use the new executable format
	  (see #01596 at AH=4Bh)
	background processes may only perform asynchronous (background) EXECs,
	  either this function or AX=4B04h
	background processes may execute INT 11, INT 12, INT 21, INT 2A, and
	  INT 2F at any time; they may execute INT 10 and INT 16 only while
	  they have opened a popup screen via INT 2F/AX=1401h; no other
	  interrupts may be executed from the background
	background processes may not use drive B: or overlay their code
	  segments
	see AX=8700h for an installation check
	the "NE" new executable format made its first appearance in European
	  MS-DOS 4.0
SeeAlso: AH=4Bh,AH=87h,INT 2F/AX=1400h"POPUP"

Top
2181 - INT 21 - European MS-DOS 4.0 - "FREEZE" - STOP A PROCESS
INT 21 - European MS-DOS 4.0 - "FREEZE" - STOP A PROCESS
	AH = 81h
	BX = flag (00h freeze command subtree, 01h only specified process)
	CX = Process ID of head of command subtree
Return: CF clear if successful
	CF set on error
	    AX = error code (no such process)
Desc:	temporarily suspend a process or a process and all of its children
Note:	if BX=0001h, this call will not return until the process is actually
	  frozen, which may not be until after it unblocks from an I/O
	  operation
SeeAlso: AH=82h,AH=89h,AX=8E00h,INT 15/AX=101Dh

Top
2182 - INT 21 - European MS-DOS 4.0 - "RESUME" - RESTART A PROCESS
INT 21 - European MS-DOS 4.0 - "RESUME" - RESTART A PROCESS
	AH = 82h
	BX = flag (00h resume command subtree, 01h only specified process)
	CX = Process ID of head of command subtree
Return: CF clear if successful
	CF set on error
	    AX = error code (no such process)
Desc:	restart a previously-suspended process or a process and all of its
	  children
SeeAlso: AH=81h,INT 15/AX=101Eh

Top
2183 - INT 21 - European MS-DOS 4.0 - "PARTITION" - GET/SET FOREGROUND PARTITION SIZE
INT 21 - European MS-DOS 4.0 - "PARTITION" - GET/SET FOREGROUND PARTITION SIZE
	AH = 83h
	AL = function
	    00h get size
	    01h set new size
		BX = new size in paragraphs
Return: CF clear if successful
	    BX = current size (function 00h) or old size (function 01h)
	CF set on error
	    AX = error code (01h,07h,0Dh)(see #01680 at AH=59h/BX=0000h)
Desc:	specify or determine how much memory may be allocated by the foreground
	  process
Note:	if the partition size is set to 0000h, no partition management is done
	  and all memory allocation is compatible with DOS 3.2.
	the partition size can be changed regardless of what use is being made
	  of the changed memory; subsequent allocations will follow the
	  partition rules (foreground processes may allocate only foreground
	  memory; background processes allocate background memory first, then
	  foreground memory)
SeeAlso: AH=48h,AH=4Ah

Top
218400 - INT 21 - European MS-DOS 4.0 - "CREATMEM" - CREATE A SHARED MEMORY AREA
INT 21 - European MS-DOS 4.0 - "CREATMEM" - CREATE A SHARED MEMORY AREA
	AX = 8400h
	BX = size in bytes (0000h = 65536)
	CX = flags
	    bit 6: zero-initialize segment
	DS:DX -> ASCIZ name (must begin with "\SHAREMEM\")
Return: CF clear if successful
	    AX = segment address of shared memory global object
	CF set on error
	    AX = error code (06h,08h) (see #01680 at AH=59h/BX=0000h)
Desc:	create an area of memory which may be accessed by multiple processes
Notes:	shared memory objects are created as special files (thus the
	  restriction on the name)
	on successful creation, the reference count is set to 1
SeeAlso: AX=8401h,AX=8402h,INT 15/AX=DE19h

Top
218401 - INT 21 - European MS-DOS 4.0 - "GETMEM" - OBTAIN ACCESS TO SHARED MEMORY AREA
INT 21 - European MS-DOS 4.0 - "GETMEM" - OBTAIN ACCESS TO SHARED MEMORY AREA
	AX = 8401h
	CX = flags
	    bit 7: writable segment (ignored by MS-DOS 4.0)
	DS:DX -> ASCIZ name (must begin with "\SHAREMEM\")
Return: CF clear if successful
	    AX = segment address of shared memory global object
	    CX = size in bytes
	CF set on error
	    AX = error code (invalid name)
Desc:	get address of a previously-created area of memory which may be
	  accessed by multiple processes
Note:	this call increments the reference count for the shared memory area
SeeAlso: AX=8400h,AX=8402h

Top
218402 - INT 21 - European MS-DOS 4.0 - "RELEASEMEM" - FREE SHARED MEMORY AREA
INT 21 - European MS-DOS 4.0 - "RELEASEMEM" - FREE SHARED MEMORY AREA
	AX = 8402h
	BX = handle (segment address of shared memory object)
Return: CF clear if successful
	CF set on error
	    AX = error code (no such name)
Desc:	indicate that the specified area of shared memory will no longer be
	  used by the caller
Note:	the reference count is decremented and the shared memory area is
	  deallocated if the new reference count is zero
SeeAlso: AX=8400h,AX=8401h,INT 15/AX=DE19h

Top
2185 - INT 21 U - European MS-DOS 4.0 - ???
INT 21 U - European MS-DOS 4.0 - ???
	AH = 85h
	???
Return: ???

Top
2186 - INT 21 - European MS-DOS 4.0 - "SETFILETABLE" - INSTALL NEW FILE HANDLE TABLE
INT 21 - European MS-DOS 4.0 - "SETFILETABLE" - INSTALL NEW FILE HANDLE TABLE
	AH = 86h
	BX = total number of file handles in new table
Return: CF clear if successful
	CF set on error
	    AX = error code (06h,08h) (see #01680 at AH=59h/BX=0000h)
Desc:	adjust the size of the per-process open file table, thus raising or
	  lowering the limit on the number of files the caller can open
	  simultaneously
Notes:	any currently-open files are copied to the new table
	if the table is increased beyond the default 20 handles, only the
	  first 20 will be inherited by child processes
	error 06h is returned if the requested number of handles exceeds
	  system limits or would require closing currently-open files
SeeAlso: AH=26h,AH=67h

Top
2187 - INT 21 - European MS-DOS 4.0 - "GETPID" - GET PROCESS IDENTIFIER
INT 21 - European MS-DOS 4.0 - "GETPID" - GET PROCESS IDENTIFIER
	AH = 87h
Return: AX = PID
	BX = parent process's PID
	CX = Command Subgroup ID (CSID)
Program: European MS-DOS 4.0 was written for Siemens in Germany and then used
	  by several other European OEMs; its release falls between mainstream
	  versions 3.2 and 3.3
Desc:	determine an identifier by which to access the calling process
Notes:	called by MS C v5.1 getpid() function
	this function apparently must return AX=0001h for INT 21/AH=80h to
	  succeed
	one possible check for European MS-DOS 4.0 is to issue this call with
	  AL=00h and check whether AL is nonzero on return
SeeAlso: AH=30h,AH=62h,AH=80h
Index:	installation check;European MS-DOS 4.0

Top
2188 - INT 21 U - European MS-DOS 4.0 - ???
INT 21 U - European MS-DOS 4.0 - ???
	AH = 88h
	???
Return: ???
SeeAlso: AH=87h

Top
2189 - INT 21 - European MS-DOS 4.0 - SLEEP
INT 21 - European MS-DOS 4.0 - SLEEP
	AH = 89h
	CX = time in milliseconds or 0000h to give up time slice
Return: CF clear if successful
	    CX = 0000h
	CF set on error
	    AX = error code (interrupted system call)
	    CX = sleep time remaining
Desc:	suspend the calling process for the specified duration
Notes:	the sleep interval is rounded up to the next higher increment of the
	  scheduler clock, and may be extended further if other processes are
	  running
	this call may be interrupted by signals (see AH=8Dh)
	reportedly called by Microsoft C 4.0 startup code
	background processes have higher priority than the foreground process,
	  and should thus periodically yield the CPU
SeeAlso: AH=81h,INT 15/AX=1000h,INT 2F/AX=1680h,INT 7A/BX=000Ah

Top
218A - INT 21 - European MS-DOS 4.0 - "CWAIT" - WAIT FOR CHILD TO TERMINATE
INT 21 - European MS-DOS 4.0 - "CWAIT" - WAIT FOR CHILD TO TERMINATE
	AH = 8Ah
	BL = range (00h command subtree, 01h any child)
	BH = suspend flag
	    00h suspend if children exist but none are dead
	    01h return if no dead children
	CX = Process ID of head of command subtree
Return: CF clear if successful
	    AH = termination type (see #01792)
	    AL = return code from child or aborting signal
	    BX = PID of child (0000h if no dead children)
	CF set on error
	    AX = error code (no child,interrupted system call)
Desc:	get return code from an asynchronously-executed child program,
	  optionally waiting if no return code is available
SeeAlso: AH=4Bh,AH=4Dh,AH=80h,AH=8Dh

(Table 01792)
Values for termination type:
 00h	normal termination
 01h	aborted by Control-C
 02h	aborted by I/O error
 03h	terminate and stay resident
 04h	aborted by signal
 05h	aborted by program error

Top
218B - INT 21 U - European MS-DOS 4.0 - ???
INT 21 U - European MS-DOS 4.0 - ???
	AH = 8Bh
	???
Return: ???
SeeAlso: AH=87h

Top
218C - INT 21 - European MS-DOS 4.0 - SET SIGNAL HANDLER
INT 21 - European MS-DOS 4.0 - SET SIGNAL HANDLER
	AH = 8Ch
	AL = signal number (see #01793)
	BL = action (see #01794)
	DS:DX -> signal handler (see #01795)
Return: CF clear if successful
	    AL = previous action
	    ES:BX -> previous signal handler
	CF set on error
	    AX = error code (01h,invalid SigNumber or Action)
		  (see #01680 at AH=59h/BX=0000h)
Desc:	set the routine which will be invoked on a number of exceptional
	  conditions
Note:	all signals will be sent to the most recently installed handler
SeeAlso: AH=8Dh

(Table 01793)
Values for European MS-DOS 4.0 signal number:
 01h	SIGINTR		Control-C or user defined interrupt key
 08h	SIGTERM		program termination
 09h	SIGPIPE		broken pipe
 0Dh	SIGUSER1	reserved for user definition
 0Eh	SIGUSER2	reserved for user definition

(Table 01794)
Values for signal action:
 00h	SIG_DFL		terminate process on receipt
 01h	SIG_IGN		ignore signal
 02h	SIG_GET		signal is accepted
 03h	SIG_ERR		sender gets error
 04h	SIG_ACK		acknowledge received signal and clear it, but don't
			  change current setting

(Table 01795)
Values signal handler is called with:
	AL = signal number (see #01793)
	AH = signal argument
Return: RETF, CF set: terminate process
	RETF, CF clear, ZF set: abort any interrupted system call with an error
	RETF, CF clear, ZF clear: restart any interrupted system call
	IRET: restart any interrupted system call
Note:	the signal handler may also perform a nonlocal GOTO by resetting the
	  stack pointer and jumping; before doing so, it should dismiss the
	  signal by calling this function with BL=04h

Top
218D - INT 21 - European MS-DOS 4.0 - SEND SIGNAL
INT 21 - European MS-DOS 4.0 - SEND SIGNAL
	AH = 8Dh
	AL = signal number (see #01793)
	BH = signal argument
	BL = action
	    00h send to entire command subtree
	    01h send only to specified process
	DX = Process ID
Return: CF clear if successful
	CF set on error
	    AX = error code (01h,06h)(see #01680 at AH=59h/BX=0000h)
Desc:	invoke the exceptional-condition handler for the specified process
Note:	error 06h may be returned if one or more of the affected processes
	  have an error handler for the signal
SeeAlso: AH=8Ch

Top
218E00BH00 - INT 21 - European MS-DOS 4.0 - "SETPRI" - GET/SET PROCESS PRIORITY
INT 21 - European MS-DOS 4.0 - "SETPRI" - GET/SET PROCESS PRIORITY
	AX = 8E00h
	BH = 00h
	BL = action
	    00h set priority for command subtree
	    01h set priority for specified process only
	CX = Process ID
	DH = 00h
	DL = change in priority (00h to get priority)
Return: CF clear if successful
	    DL = process priority
	    DH destroyed
	CF set on error
	    AX = error code (01h,no such process)(see #01680 at AH=59h)
Desc:	specify or determine the execution priority of the specified process
	  or the process and all of its children
SeeAlso: AH=81h

Top
218F - INT 21 U - European MS-DOS 4.0 - ???
INT 21 U - European MS-DOS 4.0 - ???
	AH = 8Fh
	???
Return: ???
SeeAlso: AH=87h

Top
2190 - INT 21 U - European MS-DOS 4.0 - ???
INT 21 U - European MS-DOS 4.0 - ???
	AH = 90h
	???
Return: ???
SeeAlso: AH=87h

Top
2191 - INT 21 U - European MS-DOS 4.0 - ???
INT 21 U - European MS-DOS 4.0 - ???
	AH = 91h
	???
Return: ???
SeeAlso: AH=87h

Top
2192 - INT 21 U - European MS-DOS 4.0 - ???
INT 21 U - European MS-DOS 4.0 - ???
	AH = 92h
	???
Return: ???
SeeAlso: AH=87h

Top
2193 - INT 21 - European MS-DOS 4.0 - "PIPE" - CREATE A NEW PIPE
INT 21 - European MS-DOS 4.0 - "PIPE" - CREATE A NEW PIPE
	AH = 93h
	CX = size in bytes
Return: CF clear if successful
	    AX = read handle
	    BX = write handle
	CF set on error
	    AX = error code (08h) (see #01680 at AH=59h/BX=0000h)
Desc:	create a communications channel which may be used for interprocess
	  data and command exchanges
SeeAlso: AH=3Ch,AH=3Fh"DOS",AH=40h"DOS",AH=84h

Top
2194 - INT 21 U - European MS-DOS 4.0 - ???
INT 21 U - European MS-DOS 4.0 - ???
	AH = 94h
	???
Return: ???
SeeAlso: AH=87h

Top
2195 - INT 21 - European MS-DOS 4.0 - HARD ERROR PROCESSING
INT 21 - European MS-DOS 4.0 - HARD ERROR PROCESSING
	AH = 95h
	AL = new state
	   00h enabled
	   01h disabled, automatically fail hard errors
Return: AX = previous setting
Desc:	specify whether hard (critical) errors should automatically fail the
	  system call or invoke an INT 24
SeeAlso: INT 24,INT 21/AH=59h/BX=0001h

Top
2196 - INT 21 U - European MS-DOS 4.0 - ???
INT 21 U - European MS-DOS 4.0 - ???
	AH = 96h
	???
Return: ???

Top
2197 - INT 21 U - European MS-DOS 4.0 - ???
INT 21 U - European MS-DOS 4.0 - ???
	AH = 97h
	???
Return: ???

Top
2198 - INT 21 U - European MS-DOS 4.0 - ???
INT 21 U - European MS-DOS 4.0 - ???
	AH = 98h
	???
Return: ???

Top
2199 - INT 21 u - European MS-DOS 4.0 - "PBLOCK" - BLOCK A PROCESS
INT 21 u - European MS-DOS 4.0 - "PBLOCK" - BLOCK A PROCESS
	AH = 99h
	DS:BX -> memory location to block on
	CX = timeout in milliseconds
	DH = nonzero if interruptable
Return: CF clear if awakened by event
	    AX = 0000h
	CF set if unusual wakeup
	    ZF set if timeout, clear if interrupted by signal
	    AX = nonzero
Desc:	suspend calling process until another process sends a "restart" signal
	  or a timeout occurs
SeeAlso: AH=9Ah,INT 2F/AX=0802h

Top
219A - INT 21 u - European MS-DOS 4.0 - "PRUN" - UNBLOCK A PROCESS
INT 21 u - European MS-DOS 4.0 - "PRUN" - UNBLOCK A PROCESS
	AH = 9Ah
	DS:BX -> memory location processes may have blocked on
Return: AX = number of processes awakened
	ZF set if no processes awakened
Program: European MS-DOS 4.0 was written for Siemens in Germany and then used
	  by several other European OEMs; its release falls between mainstream
	  versions 3.2 and 3.3
Desc:	restart all processes waiting for the specified "restart" signal
SeeAlso: AH=99h,INT 2F/AX=0802h

Top
21F8 - INT 21 - DOS v2.11-2.13 - SET OEM INT 21 HANDLER
INT 21 - DOS v2.11-2.13 - SET OEM INT 21 HANDLER
	AH = F8h
	DS:DX -> OEM INT 21 handler for functions F9h to FFh
		 FFFFh:FFFFh disables OEM handler
Notes:	this function is known to be supported by Toshiba T1000 ROM MS-DOS
	  v2.11, Sanyo MS-DOS v2.11, and TI Professional Computer DOS v2.13
	at least potentially this is still available with (OEM versions??? of)
	  MS-DOS 6.0.
	calls to AH=F9h through AH=FFH will return AL=00h if no handler set
	the user handler is called immediately on entry to the main DOS INT 21h
	  function dispatcher with interrupts disabled and all registers and
	  stack exactly as set by caller; it should exit with IRET
SeeAlso: AH=F9h"OEM"

Top
21F9 - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
INT 21 - DOS v2.11-2.13 - OEM FUNCTION
	AH = F9h
Return: AL = 00h if no OEM function handler installed (see AH=F8h"OEM")
SeeAlso: AH=F8h"OEM",AH=FAh"OEM"

Top
21FA - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
INT 21 - DOS v2.11-2.13 - OEM FUNCTION
	AH = FAh
Return: AL = 00h if no OEM function handler installed (see AH=F8h"OEM")
SeeAlso: AH=F8h"OEM",AH=F9h"OEM",AH=FBh"OEM"

Top
21FB - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
INT 21 - DOS v2.11-2.13 - OEM FUNCTION
	AH = FBh
Return: AL = 00h if no OEM function handler installed (see AH=F8h"OEM")
SeeAlso: AH=F8h"OEM",AH=FAh"OEM",AH=FCh"OEM"

Top
21FC - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
INT 21 - DOS v2.11-2.13 - OEM FUNCTION
	AH = FCh
Return: AL = 00h if no OEM function handler installed (see AH=F8h"OEM")
SeeAlso: AH=F8h"OEM",AH=FBh"OEM",AH=FDh"OEM"

Top
21FD - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
INT 21 - DOS v2.11-2.13 - OEM FUNCTION
	AH = FDh
Return: AL = 00h if no OEM function handler installed (see AH=F8h"OEM")
SeeAlso: AH=F8h"OEM",AH=FCh"OEM",AH=FEh"OEM"

Top
21FE - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
INT 21 - DOS v2.11-2.13 - OEM FUNCTION
	AH = FEh
Return: AL = 00h if no OEM function handler installed (see AH=F8h"OEM")
SeeAlso: AH=F8h"OEM",AH=FDh"OEM",AH=FFh"OEM"

Top
21FF - INT 21 - DOS v2.11-2.13 - OEM FUNCTION
INT 21 - DOS v2.11-2.13 - OEM FUNCTION
	AH = FFh
Return: AL = 00h if no OEM function handler installed (see AH=F8h"OEM")
SeeAlso: AH=F8h"OEM",AH=FEh"OEM"

Top
22 - INT 22 - DOS 1+ - PROGRAM TERMINATION ADDRESS
INT 22 - DOS 1+ - PROGRAM TERMINATION ADDRESS
Desc:	this vector specifies the address of the routine which is to be given
	  control after a program is terminated; it should never be called
	  directly, since it does not point at an interrupt handler
Notes:	this vector is restored from the DWORD at offset 0Ah in the PSP during
	  termination, and then a FAR JMP is performed to the address in INT 22
	normally points at the instruction immediately following INT 21/AH=4Bh
	  call which loaded the current program
SeeAlso: INT 20,INT 21/AH=00h,INT 21/AH=31h,INT 21/AH=4Ch

Top
23 - INT 23 - DOS 1+ - CONTROL-C/CONTROL-BREAK HANDLER
INT 23 - DOS 1+ - CONTROL-C/CONTROL-BREAK HANDLER
---DOS 1.x---
Return: AH = 00h abort program
	if all registers preserved, restart DOS call
---DOS 2+---
	CF clear
Return: all registers preserved
	return via RETF with CF set or (MS-DOS 1,DR DOS) RETF 2 with CF set
	    DOS will abort program with errorlevel 0
	else (RETF/RETF 2 with CF clear or IRET with CF ignored)
	    interrupted DOS call is restarted
Notes:	this interrupt is invoked whenever DOS detects a ^C or ^Break; it
	  should never be called directly
	MS-DOS 1.25 also invokes INT 23 on a divide overflow (INT 00)
	MS-DOS remembers the stack pointer before calling INT 23, and if it is
	  not the same on return, pops and discards the top word; this is what
	  permits a return with RETF as well as IRET or RETF 2
	MS-DOS 2.1+ ignores the returned CF if SP is the same on return as it
	  was when DOS called INT 23, so RETF 2 will not terminate the program
	Novell DOS 7 always pops a word if CF is set on return, so one should
	  not return with RETF 2 and CF set or IRET with the stored flags' CF
	  set
	any DOS call may safely be made within the INT 23 handler, although
	  the handler must check for a recursive invocation if it does
	  call DOS
SeeAlso: INT 1B,INT 21/AH=92h"PTS-DOS"

Top
24 - INT 24 C - DOS 1+ - CRITICAL ERROR HANDLER
INT 24 C - DOS 1+ - CRITICAL ERROR HANDLER
Notes:	invoked when a critical (usually hardware) error is encountered by DOS
	  (see #02543); should never be called directly
	when DOS terminates a program, it copies the previous value of the
	  INT 24 vector out of the PSP (see #01378) and into the interrupt
	  vector table
SeeAlso: INT 21/AH=95h,INT 21/AH=59h/BX=0000h,INT 21/AH=92h"PTS-DOS"

(Table 02543)
Values critical error handler is called with:
	AH = type and processing flags (see #02544)
	AL = drive number if AH bit 7 clear
	BP:SI -> device driver header (see #01646 at INT 21/AH=52h)
		(BP:[SI+4] bit 15 set if character device)
	DI low byte contains error code if AH bit 7 set (see #02545)
	STACK:	DWORD	return address for INT 24 call
		WORD	flags pushed by INT 24
		WORD	original AX on entry to INT 21
		WORD	BX
		WORD	CX
		WORD	DX
		WORD	SI
		WORD	DI
		WORD	BP
		WORD	DS
		WORD	ES
		DWORD	return address for INT 21 call
		WORD	flags pushed by INT 21
Return: AL = action code (see #02546)
	SS,SP,DS,ES,BX,CX,DX preserved
Notes:	the only DOS calls the handler may make are INT 21/AH=01h-0Ch,30h,59h
	if the handler returns to the application by popping the stack, DOS
	  will be in an unstable state until the first call with AH > 0Ch
	for DOS 3.1+, IGNORE (AL=00h) is turned into FAIL (AL=03h) on network
	  critical errors
	if IGNORE specified but not allowed, it is turned into FAIL
	if RETRY specified but not allowed, it is turned into FAIL
	if FAIL specified but not allowed, it is turned into ABORT
	(DOS 3.0+) if a critical error occurs inside the critical error
	  handler, the DOS call is automatically failed (AL set to 03h and
	  the INT 24 call skipped)
	The initial critical error handler is located in the kernel and
	  always results in FAIL. However, by default it is replaced by
	  the critical error handler in the command interpreter when it
	  loads. This can be suppressed (e.g. for BBS systems) by loading
	  the primary DOS 3.00+ COMMAND.COM shell with the undocumented
	  option /F 'Fail'. This syntax is also supported with PTS/DOS 6.51+,
	  S/DOS 1.0+, and DR-OpenDOS 7.02+ (1997-11-13) COMMAND.COM, as well
	  as 4DOS.COM/NDOS.COM.	 OpenDOS 7.01+ COMMAND.COM (1997-03-21)
	  introduced this under /N, which is still supported by newer releases
	  (although it has a slightly different meaning now).
BUG:	DR DOS COMMAND.COM before 1998-05-07 caused incorrect error messages
	  to occur if the error code had a non-zero MSB (e.g. NWCDEX's
	  "IO error reading from device" instead of the correct
	  "not ready error").  This was fixed with the DR-OpenDOS 7.03
	  COMMAND.COM now passing the full error code to any critical error
	  handlers.

Bitfields for critical error type and processing flags:
Bit(s)	Description	(Table 02544)
 7	class
	=0  disk I/O error
	=1  -- if block device, bad FAT image in memory
	    -- if char device, error code in DI
 6	unused
 5	Ignore allowed (DOS 3.0+)
 4	Retry allowed (DOS 3.0+)
 3	Fail allowed (DOS 3.0+)
 2-1	disk area of error
	00 = DOS area	01 = FAT
	10 = root dir	11 = data area
 0	set if write, clear if read
Note:	Abort is always allowed
SeeAlso: #02545,#02546

(Table 02545)
Values for critical error code:
 00h   (0)  write-protection violation attempted
 01h   (1)  unknown unit for driver
 02h   (2)  drive not ready
 03h   (3)  unknown command given to driver
 04h   (4)  data error (bad CRC)
 05h   (5)  bad device driver request structure length
 06h   (6)  seek error
 07h   (7)  unknown media type (non-DOS disk)
 08h   (8)  sector not found
 09h   (9)  printer out of paper
 0Ah  (10)  write fault
 0Bh  (11)  read fault
 0Ch  (12)  general failure
 0Dh  (13)  (DOS 3.0+, "multitasking" DOS, PTS-DOS & S/DOS) sharing violation
 0Eh  (14)  (DOS 3.0+) lock violation
 0Fh  (15)  invalid disk change / wrong disk
 10h  (16)  (DOS 3.0+) FCB unavailable
 10h  (16)  uncertain media
 11h  (17)  (DOS 3.0+) sharing buffer overflow
 11h  (17)  character call interrupted
 12h  (18)  (DOS 4.0+) code page mismatch
 13h  (19)  (DOS 4.0+) out of input
 14h  (20)  (DOS 4.0+) insufficient disk space
Note:	Critical error codes 00h..0Ch are the traditional codes reported
	  through INT 24.  These code assignments are mapped to error codes
	  13h..1Fh reported by INT21/AH=59h (see #01680).  Similarly, the
	  DOS 3.x critical error codes 0Dh..11h are mapped to INT21/AH=59h
	  error codes 20h..24h, however, the DOS 4.0+ critical error codes are
	  not mapped.
BUG:	Paragon Technology Systems' S/DOS 1.0 sources (a stripped down issue
	  of PTS-DOS 6.51 with sources on CD) erroneously list DOS INT 24
	  error	codes 12h..14h as 11h..13h, however, since the sources do not
	  make use of these defines, this seems to be only a documentation
	  error.
SeeAlso: #02544,#02546,#01680

(Table 02546)
Values for critical error handler action code:
 00h	ignore error and continue processing request
 01h	retry operation
 02h	terminate program as though INT 21/AH=4Ch called (INT 20h for DOS 1.x)
 03h	fail system call in progress (DOS 3+)
SeeAlso: #02544,#02546

Top
25 - INT 25 - DOS 1+ - ABSOLUTE DISK READ (except partitions > 32M)
INT 25 - DOS 1+ - ABSOLUTE DISK READ (except partitions > 32M)
	AL = drive number (00h = A:, 01h = B:, etc)
	CX = number of sectors to read (not FFFFh)
	DX = starting logical sector number (0000h - highest sector on drive)
	DS:BX -> buffer for data
Return: CF clear if successful
	CF set on error
	    AH = status (see #02547)
	    AL = error code (same as passed to INT 24 in DI)
	    AX = 0207h if more than 64K sectors on drive -- use new-style call
	may destroy all other registers except segment registers
Notes:	original flags are left on stack, and must be popped by caller
	this call bypasses the DOS filesystem
	examination of CPWIN386.CPL indicates that if this call fails with
	  error 0408h on an old-style (<32M) call, one should retry the
	  call with the high bit of the drive number in AL set
	Novell DOS 7 decides whether the old-style or new-style (>32M) version
	  of INT 25 must be used solely on the basis of the partition's size,
	  thus forcing use of the new-style call even for data in the first
	  32M of the partition
	PC Tools MIRROR as shipped with MS-DOS 5.0+ checks several signatures
	  at the beginning of INT 25h and INT 26h before it starts to patch
	  these vectors. The signatures it looks for are 83h, F9h, FFh, 74h
	  (CMP CX,-01; JZ ????) at offset +1 from the INT 25h/26h entry points
	  and 2Eh, FFh, 2Eh (JMP DWORD PTR CS:[????]) at the location pointed
	  to by the JZ ????. If it finds these signatures it will use the
	  target address of the far jump for its sub-sequent checks, otherwise
	  it will just take the previous interrupt entry points when scanning
	  for FAh, 2Eh, 8Ch, 16h (CLI; MOV CS:????,SS) or FAh, 2Eh, 89h, 26h
	  (CLI; MOV CS:????,SP) right at the beginning. Hence, it seems the
	  first two checks are to trace through a specific INT 25h/26h
	  filter. However, the purpose of the whole patch is unknown.
	A method to detect the actual assignments of logical drive numbers
	 to physical BIOS drive units (for example to detect the boot drive),
	 is to temporarily mount an INT 13h handler recording the used DL
	 drive unit for any INT 13/AH=02h read operations and discarding any
	 attempts to access actual floppy drives.  Then call INT 25h for
	 all the appropriate DOS drives and watch the results recorded by
	 the INT 13h interceptor.
	Although all registers except segment registers may be destroyed
	 some software depends on some of the registers being preserved.
	 For example some Flash disk drivers requires that DX is not trashed.
	 DR-DOS 7.03 takes care of this.
BUGS:	DOS 3.1 through 3.3 set the word at ES:[BP+1Eh] to FFFFh if AL is an
	  invalid drive number
	DR DOS 3.41 will return with a jump instead of RETF, leaving the
	  wrong number of bytes on the stack; use the huge-partition version
	  (INT 25/CX=FFFFh) for all partition sizes under DR DOS 3.41
	DR DOS 6.0 original issues 05/1991 & 08/1991 reported wrong error
	  codes for "drive not ready" and "write protect". This was fixed
	  with the DR DOS BDOS patch "PAT321" (1992/02/19, XDIR /C: 947Bh),
	  and later "full" rebuilds (see INT 21/AX=4452h for details).
SeeAlso: INT 13/AH=02h,INT 25/CX=FFFFh,INT 26,INT 21/AX=7305h,INT 21/AH=90h"PTS"

(Table 02547)
Values for disk I/O status:
 80h	device failed to respond (timeout)
 40h	seek operation failed
 20h	controller failed
 10h	data error (bad CRC)
 08h	DMA failure
 04h	requested sector not found
 03h	write-protected disk (INT 26 only)
 02h	bad address mark
 01h	bad command

Top
25----CXFFFF - INT 25 - DOS 3.31+ - ABSOLUTE DISK READ (32M-2047M hard-disk partition)
INT 25 - DOS 3.31+ - ABSOLUTE DISK READ (32M-2047M hard-disk partition)
	CX = FFFFh
	AL = drive number (0=A, 1=B, etc)
	DS:BX -> disk read packet (see #02548)
Return: CF clear if successful
	CF set on error
	    AH = status (see #02547)
	    AL = error code (same as passed to INT 24 in DI)
	    AX = 0207h for FAT32 drive -- use INT 21/AX=7305h
	may destroy all other registers except segment registers; Win9X always
	  sets SI to 0000h due to an apparent coding bug
Notes:	partition is potentially >32M (and requires this form of the call) if
	  bit 1 of the device attribute word in the device driver is set
	original flags are left on stack, and must be removed by caller
	this call bypasses the DOS filesystem
	for FAT32 drives (which may be up to 2TB in size), use INT 21/AX=7305h
SeeAlso: INT 13/AH=02h,INT 25,INT 26/CX=FFFFh,INT 21/AX=7305h

Format of disk read packet:
Offset	Size	Description	(Table 02548)
 00h	DWORD	sector number
 04h	WORD	number of sectors to read
 06h	DWORD	transfer address
SeeAlso: #02552

Top
26 - INT 26 - DOS 1+ - ABSOLUTE DISK WRITE (except partitions > 32M)
INT 26 - DOS 1+ - ABSOLUTE DISK WRITE (except partitions > 32M)
	AL = drive number (00h = A:, 01h = B:, etc)
	CX = number of sectors to write (not FFFFh)
	DX = starting logical sector number (0000h - highest sector on drive)
	DS:BX -> data to write
Return: CF clear if successful
	CF set on error
	    AH = status (see #02547)
	    AL = error code (same as passed to INT 24 in DI)
	    AX = 0207h if more than 64K sectors on drive -- use new-style call
	may destroy all other registers except segment registers
Notes:	original flags are left on stack, and must be popped by caller
	this call bypasses the DOS filesystem, though DOS 5+ invalidates any
	  disk buffers referencing sectors which are written with this call
	examination of CPWIN386.CPL indicates that if this call fails with
	  error 0408h on an old-style (<32M) call, one should retry the
	  call with the high bit of the drive number in AL set
	Novell DOS 7 decides whether the old-style or new-style (>32M) version
	  of INT 26 must be used solely on the basis of the partition's size,
	  thus forcing use of the new-style call even for data in the first
	  32M of the partition
	Windows98 will display an error message and deliberately hang the
	  system on attempted write to any hard disk if neither bit 7 of the
	  Extended Drive Info byte nor bit 6 of "DOS_FLAG" (List-of-Lists+60h)
	  is set
	Although all registers except segment registers may be destroyed
	 some software depends on some of the registers being preserved.
	 For example some Flash disk drivers requires that DX is not trashed.
	 DR-DOS 7.03 takes care of this.
BUGS:	DOS 3.1 through 3.3 set the word at ES:[BP+1Eh] to FFFFh if AL is an
	  invalid drive number
	DR DOS 3.41 will return with a jump instead of RETF, leaving the
	  wrong number of bytes on the stack; use the huge-partition version
	  (INT 26/CX=FFFFh) for all partition sizes under DR DOS 3.41
	DR DOS 6.0 original releases 05/1991 & 08/1991 reported wrong error
	  codes for "drive not ready" and "write protect". This was fixed
	  with the DR DOS BDOS patch "PAT321" (1992/02/19, XDIR /C: 947Bh)
	  and later "full" rebuilds (see INT21/AX=4452h for details).
SeeAlso: INT 13/AH=03h,INT 25,INT 26/CX=FFFFh,INT 21/AX=7305h,INT 21/AH=91h"PTS"

Top
26----CXFFFF - INT 26 - DOS 3.31+ - ABSOLUTE DISK WRITE (32M-2047M hard-disk partition)
INT 26 - DOS 3.31+ - ABSOLUTE DISK WRITE (32M-2047M hard-disk partition)
	CX = FFFFh
	AL = drive number (0=A, 1=B, etc)
	DS:BX -> disk write packet (see #02552)
Return: CF clear if successful
	CF set on error
	    AH = status (see #02547)
	    AL = error code (same as passed to INT 24 in DI)
	may destroy all other registers except segment registers
Notes:	partition is potentially >32M (and requires this form of the call) if
	  bit 1 of the device attribute word in the device driver is set
	original flags are left on stack, and must be removed by caller
	this call bypasses the DOS filesystem, though DOS 5+ invalidates any
	  disk buffers referencing sectors which are written with this call
	for FAT32 drives (which may be up to 2TB in size), use INT 21/AX=7305h
	Windows98 will display an error message and deliberately hang the
	  system on attempted write to any hard disk if neither bit 7 of the
	  Extended Drive Info byte nor bit 6 of "DOS_FLAG" (List-of-Lists+60h)
	  is set
SeeAlso: INT 13/AH=03h,INT 25/CX=FFFFh,INT 26,INT 21/AX=7305h

Format of disk write packet:
Offset	Size	Description	(Table 02552)
 00h	DWORD	sector number
 04h	WORD	number of sectors to read
 06h	DWORD	transfer address
SeeAlso: #02548

Top
27 - INT 27 - DOS 1+ - TERMINATE AND STAY RESIDENT
INT 27 - DOS 1+ - TERMINATE AND STAY RESIDENT
	DX = number of bytes to keep resident (max FFF0h)
	CS = segment of PSP
Return: never
Notes:	this is an obsolete call
	INT 22, INT 23, and INT 24 are restored from the PSP
	does not close any open files
	the minimum number of bytes which will remain resident is 110h for
	  DOS 2.x and 60h for DOS 3.0+; there is no minimum for DOS 1.x, which
	  implements this service in COMMAND.COM rather than the DOS kernel
SeeAlso: INT 21/AH=31h

Top
28 - INT 28 C - DOS 2+ - DOS IDLE INTERRUPT
INT 28 C - DOS 2+ - DOS IDLE INTERRUPT
	SS:SP = top of MS-DOS stack for I/O functions
Return: all registers preserved
Desc:	This interrupt is invoked each time one of the DOS character input
	  functions loops while waiting for input.  Since a DOS call is in
	  progress even though DOS is actually idle during such input waits,
	  hooking this function is necessary to allow a TSR to perform DOS
	  calls while the foreground program is waiting for user input.	 The
	  INT 28h handler may invoke any INT 21h function except functions
	  00h through 0Ch.
Notes:	under DOS 2.x, the critical error flag (the byte immediately after the
	  InDOS flag) must be set in order to call DOS functions 50h/51h from
	  the INT 28h handler without destroying the DOS stacks.
	calls to INT 21/AH=3Fh,40h from within an INT 28 handler may not use a
	  handle which refers to CON
	at the time of the call, the InDOS flag (see INT 21/AH=34h) is normally
	  set to 01h; if larger, DOS is truly busy and should not be reentered
	the default handler is an IRET instruction
	supported in OS/2 compatibility box
	the _MS-DOS_Programmer's_Reference_ for DOS 5.0 incorrectly documents
	  this interrupt as superseded
	the performance of NetWare Lite servers (and probably other peer-to-
	  peer networks) can be dramatically improved by calling INT 28
	  frequently from an application's idle loop
SeeAlso: INT 21/AH=34h,INT 2A/AH=84h,INT 2F/AX=1680h

Top
29 - INT 29 C - DOS 2+ - FAST CONSOLE OUTPUT
INT 29 C - DOS 2+ - FAST CONSOLE OUTPUT
	AL = character to display
Return: nothing
	BX may be destroyed by some versions of DOS 3.3
Notes:	automatically called when writing to a device with bit 4 of its device
	  driver header set (see also INT 21/AH=52h)
	COMMAND.COM v3.2 and v3.3 compare the INT 29 vector against the INT 20
	  vector and assume that ANSI.SYS is installed if the segment is larger
	the default handler under DOS 2.x and 3.x simply calls INT 10/AH=0Eh
	the default handler under DESQview 2.2 understands the <Esc>[2J
	  screen-clearing sequence, calls INT 10/AH=0Eh for all others
SeeAlso: INT 21/AH=52h,INT 2F/AX=0802h,INT 79"AVATAR.SYS"

Top
2A80 - INT 2A CU - NETWORK - BEGIN DOS CRITICAL SECTION
INT 2A CU - NETWORK - BEGIN DOS CRITICAL SECTION
	AH = 80h
	AL = critical section number (00h-0Fh) (see #02555)
Notes:	normally hooked to avoid interrupting a critical section, rather than
	  called
	the handler should ensure that none of the critical sections are
	  reentered, usually by suspending a task which attempts to reenter
	  an active critical section
	the DOS kernel does not invoke critical sections 01h and 02h unless it
	  is patched.  DOS 3.1+ contains a zero-terminated list of words
	  beginning at offset -11 from the Swappable Data Area
	  (see #01687 at INT 21/AX=5D06h); each word contains the offset within
	  the DOS data segment of a byte which must be changed from C3h (RET)
	  to 50h (PUSH AX) under DOS 3.x or from 00h to a nonzero value under
	  DOS 4.0+ to enable use of critical sections.	For DOS 4.0+, all
	  words in this list point at the byte at offset 0D0Ch.
	MS Windows patches the DOS kernel's calls to INT 2A/AH=80h-81h into
	  far calls to its own handler, and does not reflect the calls back
	  to INT 2A unless SYSTEM.INI contains ReflectDOSInt2A=1 or
	  ModifyDOSInt2A=0 in the [386Enh] section
	Novell NETX does not issue INT 2A/AH=80h and INT 2A/AH=81h calls when
	  it intercepts INT 21 calls and processes them itself
SeeAlso: AH=81h,AH=82h,AX=8700h,INT 21/AX=5D06h,INT 21/AX=5D0Bh

(Table 02555)
Values for DOS critical section number:
 01h	DOS kernel, SHARE.EXE, DOSMGR
	apparently for maintaining the integrity of DOS/SHARE/NET
	  data structures
 02h	DOS kernel, DOSMGR
	ensures that no multitasking occurs while DOS is calling an
	  installable device driver
 05h	network redirector
 06h	DOS 4.x only IFSFUNC
 08h	ASSIGN.COM
 0Ah	MSCDEX, CORELCDX
 0Fh	IBM PC LAN server (while intercepting INT 10/AH=06h,07h,0Eh)

Top
2A81 - INT 2A CU - NETWORK - END DOS CRITICAL SECTION
INT 2A CU - NETWORK - END DOS CRITICAL SECTION
	AH = 81h
	AL = critical section number (00h-0Fh) (see #02555)
Notes:	normally hooked rather than called
	the handler should reawaken any tasks which were suspended due to an
	  attempt to enter the specified critical section
	MS Windows patches the DOS kernel's calls to INT 2A/AH=80h-81h into
	  far calls to its own handler, and does not reflect the calls back
	  to INT 2A unless SYSTEM.INI contains ReflectDOSInt2A=1 or
	  ModifyDOSInt2A=0 in the [386Enh] section
SeeAlso: AH=80h,AH=82h,AX=8700h

Top
2A82 - INT 2A CU - NETWORK - END DOS CRITICAL SECTIONS 0 THROUGH 7
INT 2A CU - NETWORK - END DOS CRITICAL SECTIONS 0 THROUGH 7
	AH = 82h
Notes:	called by the INT 21h function dispatcher for function 0 and functions
	  greater than 0Ch except 59h, and on process termination
	the handler should reawaken any tasks which were suspended due to an
	  attempt to enter one of the critical sections 0 through 7
SeeAlso: AH=81h

Top
2B - INT 2B - DOS 2+ - RESERVED
INT 2B - DOS 2+ - RESERVED
Note:	this vector is not used in MS-DOS versions <= 6.22, and points at an
	  IRET instruction

Top
2B - INT 2B - IBM ROM-DOS v4.0 - ???
INT 2B - IBM ROM-DOS v4.0 - ???
	AH = function
	    00h ??? (modifies data in IBMBIO.COM)
	    01h internal operations
	    02h ???
		AL = index (00h-0Ch)
		Return: AX = ??? or (CMOS 2Dh and CMOS 2Eh)
	    03h get ??? data
		Return: AX = (CMOS 2Dh and CMOS 2Eh)
			BX = FFFFh
	    other does nothing
Note:	function 03h is called by ROMSHELL.COM; if BX != 0, then the ES:DI from
	  INT 2F/AX=1982h points at valid data
SeeAlso: INT 2F/AX=1982h

Top
2C - INT 2C - DOS 2+ - RESERVED
INT 2C - DOS 2+ - RESERVED
Note:	this vector is not used in DOS versions <= 6.00, and points at an IRET

Top
2D - INT 2D - DOS 2+ - RESERVED
INT 2D - DOS 2+ - RESERVED
Note:	this vector is not used in DOS versions <= 6.00, and points at an IRET
BUG:	RM386 v6.00-6.02 (as distributed with Helix's Netroom v3.x) contains
	  a stack bug in its protected-mode INT 2D handler which causes a crash
	  when INT 2D is invoked from V86 mode

Top
2F0800 - INT 2F U - DRIVER.SYS support - INSTALLATION CHECK
INT 2F U - DRIVER.SYS support - INSTALLATION CHECK
	AX = 0800h
Return: AL = status
	    00h not installed, OK to install
	    01h not installed, not OK to install
	    FFh installed
Desc:	determine whether the internal support code used by DRIVER.SYS is
	  present; it is always present in DOS 3.2+
Note:	supported by DR DOS 5.0 and Novell DOS 7

Top
2F0801 - INT 2F U - DRIVER.SYS support - ADD NEW BLOCK DEVICE
INT 2F U - DRIVER.SYS support - ADD NEW BLOCK DEVICE
	AX = 0801h
	DS:DI -> drive data table (see #02601,#02602,#02603)
Return: AX,BX,SI,ES destroyed
Notes:	moves down internal list of drive data tables, copying and modifying
	  the drive description flags word for tables referencing same physical
	  drive
	the data table is appended to the chain of tables
	supported by DR DOS 5.0 and Novell DOS 7
SeeAlso: AX=0803h

Top
2F0802 - INT 2F U - DRIVER.SYS support - EXECUTE DEVICE DRIVER REQUEST
INT 2F U - DRIVER.SYS support - EXECUTE DEVICE DRIVER REQUEST
	AX = 0802h
	ES:BX -> device driver request header (see #02597)
Return: request header updated as per requested operation
	STACK:	WORD	original flags from INT call (left by RETF in device
			  driver, at least in DOS 5.0-6.22)
Notes:	supported by DR DOS 5.0
	DOS 3.2 executes this function on any AL value from 02h through F7h;
	  DOS 4.0+ executes this function on AL=02h and AL=04h-F7h
	the command codes (see #02595) and structures described below apply
	  to all drivers which support the appropriate commands; this call is
	  just one of a number of ways in which a device driver request may
	  be invoked
	supported by Novell DOS 7
SeeAlso: AX=0800h,AX=0801h,AX=0803h,AX=1510h,INT 21/AH=52h,INT 21/AH=99h
SeeAlso: INT 21/AH=9Ah

(Table 02595)
Values for device driver command code:
 00h (0)  INIT
 01h (1)  MEDIA CHECK (block devices)
 02h (2)  BUILD BPB (block devices)
 03h (3)  IOCTL INPUT
 04h (4)  INPUT
 05h (5)  NONDESTRUCTIVE INPUT, NO WAIT (character devices)
 06h (6)  INPUT STATUS (character devices)
 07h (7)  INPUT FLUSH (character devices)
 08h (8)  OUTPUT
 09h (9)  OUTPUT WITH VERIFY
 0Ah (10) OUTPUT STATUS (character devices)
 0Bh (11) OUTPUT FLUSH (character devices)
 0Ch (12) IOCTL OUTPUT
 0Dh (13) (DOS 3.0+) DEVICE OPEN
 0Eh (14) (DOS 3.0+) DEVICE CLOSE
 0Fh (15) (DOS 3.0+) REMOVABLE MEDIA (block devices)
 10h (16) (DOS 3.0+) OUTPUT UNTIL BUSY (character devices)
 11h (17) (European MS-DOS 4.0) STOP OUTPUT (console screen drivers only)
 12h (18) (European MS-DOS 4.0) RESTART OUTPUT (console screen drivers only)
 13h (19) (DOS 3.2+) GENERIC IOCTL
 14h (20) (DOS 4.0, KKCFUNC) DEVICE RESTORE (character device)
 15h (21) (European MS-DOS 4.0) RESET UNCERTAIN MEDIA FLAG
 16h (22) (DOS 4.0) unknown???
 17h (23) (DOS 3.2+) GET LOGICAL DEVICE
 18h (24) (DOS 3.2+) SET LOGICAL DEVICE
 19h (25) (DOS 5.0+) CHECK GENERIC IOCTL SUPPORT
 80h (128)(CD-ROM,DRFAT32) READ LONG
 81h (129)(CD-ROM) reserved
 82h (130)(CD-ROM,DRFAT32) READ LONG PREFETCH
 83h (131)(CD-ROM,DRFAT32) SEEK
 84h (132)(CD-ROM) PLAY AUDIO
 85h (133)(CD-ROM) STOP AUDIO
 86h (134)(CD-ROM,DRFAT32) WRITE LONG
 87h (135)(CD-ROM,DRFAT32) WRITE LONG VERIFY
 88h (136)(CD-ROM) RESUME AUDIO

Bitfields for device request status:
Bit(s)	Description	(Table 02596)
 15	error
 14-11	reserved
 10	??? set by DOS kernel on entry to some driver calls
 9	busy
 8	done (may be clear on return under European MS-DOS 4.0)
 7-0	error code if bit 15 set (see #02598)

Format of device driver request header:
Offset	Size	Description	(Table 02597)
 00h	BYTE	length of request header
 01h	BYTE	subunit within device driver
 02h	BYTE	command code (see #02595)
 03h	WORD	status (filled in by device driver) (see #02596)
---DOS---
 05h  4 BYTEs	reserved (unused in DOS 2.x and 3.x)
 09h	DWORD	(European MS-DOS 4.0 only) pointer to next request header in
			  device's request queue
		(other versions) reserved (unused in DOS 2.x and 3.x)
---STARLITE architecture---
 05h	DWORD	pointer to next request header
 09h  4 BYTEs	reserved
---command code 00h---
 0Dh	BYTE	(ret) number of units
 0Eh	DWORD	(call) pointer to DOS device helper function (see #02599)
			  (European MS-DOS 4.0 only)
		(call) pointer past end of memory available to driver (DOS 5+)
		(ret) address of first free byte following driver
 12h	DWORD	(call) pointer to commandline arguments
		(ret) pointer to BPB array (block drivers) or
			  0000h:0000h (character drivers)
 16h	BYTE	(DOS 3.0+) drive number for first unit of block driver (0=A)
   ---European MS-DOS 4.0---
 17h	DWORD	pointer to function to save registers on stack
   ---DOS 5+ ---
 17h	WORD	(ret) error-message flag
		0001h MS-DOS should display error msg on init failure
---command code 01h---
 0Dh	BYTE	media descriptor
 0Eh	BYTE	(ret) media status
		00h don't know
		01h media has not changed
		FFh media has been changed
 0Fh	DWORD	(ret, DOS 3.0+) pointer to previous volume ID if the
		  OPEN/CLOSE/RM bit in device header is set and disk changed
		Note:	some drives (or controllers???) forget the change line
			  status if another drive is accessed afterwards. The
			  DOS IO.SYS layer takes care of this by not relying
			  on the reported change line status when the change 
			  line is not active and a different drive is accessed,
			  instead it reports "don't know" to the DOS kernel.
---command code 02h---
 0Dh	BYTE	media descriptor
 0Eh	DWORD	transfer address
		-> scratch sector if NON-IBM FORMAT bit in device header set
		-> first FAT sector otherwise
 12h	DWORD	pointer to BPB (set by driver) (see #01663 at INT 21/AH=53h)
---command codes 03h,0Ch---
		  (see also INT 21/AX=4402h"DOS 2+",INT 21/AX=4403h"DOS")
 0Dh	BYTE	media descriptor (block devices only)
 0Eh	DWORD	transfer address
 12h	WORD	(call) number of bytes to read/write
		(ret) actual number of bytes read or written
---command codes 04h,08h,09h (except Compaq DOS 3.31, DR DOS 6)---
 0Dh	BYTE	media descriptor (block devices only)
 0Eh	DWORD	transfer address
 12h	WORD	byte count (character devices) or sector count (block devices)
 14h	WORD	starting sector number (block devices only)
 16h	DWORD	(DOS 3.0+) pointer to volume ID if error 0Fh returned
 1Ah	DWORD	(DOS 4.0+) 32-bit starting sector number (block devices with
		  device attribute word bit 1 set only) if starting sector
		  number above is FFFFh (see INT 21/AH=52h)
---command codes 04h,08h,09h (Compaq DOS 3.31, DR DOS 6)---
 0Dh	BYTE	media descriptor (block devices only)
 0Eh	DWORD	transfer address
 12h	WORD	byte count (character devices) or sector count (block devices)
 14h	DWORD	32-bit starting sector number (block devices only)
	Note:	to reliably determine which variant of the request block for
		  functions 04h,08h,09h has been passed to the driver, check
		  the length field as well as the word at offset 14h.  If the
		  length is 1Eh and 14h=FFFFh, use the DWORD at 1Ah as the
		  starting sector number; if the length is 18h, use the DWORD
		  at 14h; otherwise, use the WORD at 14h.
---command code 05h---
 0Dh	BYTE	byte read from device if BUSY bit clear on return
---command codes 06h,07h,0Ah,0Bh,0Dh,0Eh,0Fh---
 no further fields
---command code 10h---
 0Dh	BYTE	unused
 0Eh	DWORD	transfer address
 12h	WORD	(call) number of bytes to write
		(ret) actual number of bytes written
---command codes 11h,12h---
 0Dh	BYTE	reserved
---command code 14h---
 no further fields
	Note:	This is at least true for KKCFUNC.SYS' "device restore".
		  KKCFUNC.SYS checks that INT 2Fh in the IVT still points
		  to KKCFUNC's own INT 2Fh entry point.	 In this case it
		  restores the original INT 2Fh vector, as recorded at device
		  init, into the IVT.
	SeeAlso: INT 2F/AH=4Dh
---command code 15h---
 no further fields
---command codes 13h,19h---
 0Dh	BYTE	category code
		00h-7Fh reserved for Microsoft
		00h unknown
		01h COMn: (serial) (DOS 3.3+)
		02h reserved for terminal control
		03h CON (DOS 3.3+)
		04h reserved for keyboard control
		05h LPTn:
		07h mouse (European MS-DOS 4.0)
		08h disk
		48h FAT32 disk control (MS-DOS 7.10+)
		80h-FFh reserved for OEM/user-defined
		9Eh (STARLITE) Media Access Control driver
		EDh (DR PalmDOS) login security
		SeeAlso: #01558
 0Eh	BYTE	function code
		00h (STARLITE) MAC Bind request
 0Fh	WORD	copy of DS at time of IOCTL call (apparently unused in DOS 3.3)
		SI contents (European MS-DOS 4.0)
 11h	WORD	offset of device driver header (see #01646)
		DI contents (European MS-DOS 4.0)
 13h	DWORD	pointer to parameter block from INT 21/AX=440Ch or AX=440Dh
---command codes 80h,82h---
 0Dh	BYTE	addressing mode
		00h HSG (default)
		01h Phillips/Sony Red Book
 0Eh	DWORD	transfer address (ignored for command 82h)
 12h	WORD	number of sectors to read
		(if 0 for command 82h, request is an advisory seek)
 14h	DWORD	starting sector number
		logical sector number in HSG mode
		frame/second/minute/unused in Red Book mode
		(HSG sector = minute * 4500 + second * 75 + frame - 150)
 18h	BYTE	data read mode
		00h cooked (2048 bytes per frame)
		01h raw (2352 bytes per frame, including EDC/ECC)
 19h	BYTE	interleave size (number of sectors stored consecutively)
 1Ah	BYTE	interleave skip factor
		(number of sectors between consecutive portions)
---command code 83h---
 0Dh	BYTE	addressing mode
		00h HSG (default)
		01h Phillips/Sony Red Book
 0Eh	DWORD	transfer address (ignored)
 12h	WORD	number of sectors to read (ignored)
 14h	DWORD	starting sector number (see also above)
---command code 84h---
 0Dh	BYTE	addressing mode
		00h HSG (default)
		01h Phillips/Sony Red Book
 0Eh	DWORD	starting sector number (see also above)
 12h	DWORD	number of sectors to play
---command codes 85h,88h---
 no further fields
---command codes 86h,87h---
 0Dh	BYTE	addressing mode
		00h HSG (default)
		01h Phillips/Sony Red Book
 0Eh	DWORD	transfer address (ignored in write mode 0)
 12h	WORD	number of sectors to write
 14h	DWORD	starting sector number (also see above)
 18h	BYTE	write mode
		00h mode 0 (write all zeros)
		01h mode 1 (default) (2048 bytes per sector)
		02h mode 2 form 1 (2048 bytes per sector)
		03h mode 2 form 2 (2336 bytes per sector)
 19h	BYTE	interleave size (number of sectors stored consecutively)
 1Ah	BYTE	interleave skip factor
		(number of sectors between consecutive portions)

(Table 02598)
Values for device driver error code:
 00h	write-protect violation
 01h	unknown unit
 02h	drive not ready
 03h	unknown command
 04h	CRC error
 05h	bad drive request structure length
 06h	seek error
 07h	unknown media
 08h	sector not found
 09h	printer out of paper
 0Ah	write fault
 0Bh	read fault
 0Ch	general failure
 0Dh	reserved
 0Eh	(CD-ROM) media unavailable
 0Fh	invalid disk change

(Table 02599)
Call European MS-DOS 4.0 device helper function with:
	DL = function
	    00h "SchedClock" called on each timer tick
		AL = tick interval in milliseconds
	    01h "DevDone" device I/O complete
		ES:BX -> request header
		Note:	must update status word first; may be called from
			  an interrupt handler
	    02h "PullRequest" pull next request from queue
		DS:SI -> DWORD pointer to start of device's request queue
		Return: ZF clear if pending request
			    ES:BX -> request header
			ZF set if no more requests
	    03h "PullParticular" remove specific request from queue
		DS:SI -> DWORD pointer to start of device's request queue
		ES:BX -> request header
		Return: ZF set if request header not found
	    04h "PushRequest" push the request onto the queue
		DS:SI -> DWORD pointer to start of device's request queue
		ES:BX -> request header
		interrupts disabled
	    05h "ConsInputFilter" keyboard input check
		AX = character (high byte 00h if PC ASCII character)
		Return: ZF set if character should be discarded
			ZF clear if character should be handled normally
		Note:	called by keyboard interrupt handler so DOS can scan
			  for special input characters
	    06h "SortRequest" push request in sorted order by starting sector
		DS:SI -> DWORD pointer to start of device's request queue
		ES:BX -> request header
		interrupts disabled
	    07h "SigEvent" send signal on keyboard event
		AH = event identifier
		Return: AL,FLAGS destroyed
	    09h "ProcBlock" block on event
		AX:BX = event identifier (typically a pointer)
		CX = timeout in ms or 0000h for never
		DH = interruptable flag (nonzero if pause may be interrupted)
		interrupts disabled
		Return: after corresponding ProcRun call
			CF clear if event wakeup, set if unusual wakeup
			ZF set if timeout wakeup, clear if interrupted
			AL = wakeup code, nonzero if unusual wakeup
			interrupts enabled
			BX,CX,DX destroyed
		Note:	block process and schedules another to run
	    0Ah "ProcRun" unblock process
		AX:BX = event identifier (typically a pointer)
		Return: AX = number of processes awakened
			ZF set if no processes awakened
			BX,CX,DX destroyed
	    0Bh "QueueInit" initialize/clear character queue
		DS:BX -> character queue structure (see #02600)
		Note:	the queue size field must be set before calling
	    0Dh "QueueWrite" put a character in the queue
		DS:BX -> character queue (see #02600)
		AL = character to append to end of queue
		Return: ZF set if queue is full
			ZF clear if character stored
	    0Eh "QueueRead" get a character from the queue
		DS:BX -> character queue (see #02600)
		Return: ZF set if queue is empty
			ZF clear if characters in queue
			    AL = first character in queue
	    10h "GetDOSVar" return pointer to DOS variable
		AL = index of variable
		    03h current process ID
		BX = index into variable if AL specifies an array
		CX = expected length of variable
		Return: CF clear if successful
			    DX:AX -> variable
			CF set on error
			    AX,DX destroyed
			BX,CX destroyed
		Note:	the variables may not be modified
	    14h "Yield" yield CPU if higher-priority task ready to run
		Return: FLAGS destroyed
	    1Bh "CritEnter" begin system critical section
		DS:BX -> semaphore (6 BYTEs, initialized to zero)
		Return: AX,BX,CX,DX destroyed
	    1Ch "CritLeave" end system critical section
		DS:BX -> semaphore (6 BYTEs, initialized to zero)
		Return: AX,BX,CX,DX destroyed
		Note:	must be called in the context of the process which
			  called CritEnter on the semaphore
Note:	the DWORD pointing at the request queue must be allocated by the driver
	  and initialized to 0000h:0000h.  It always points at the next request
	  to be executed

Format of European MS-DOS 4.0 character queue:
Offset	Size	Description	(Table 02600)
 00h	WORD	size of queue in bytes
 02h	WORD	index of next character out
 04h	WORD	count of characters in the queue
 06h  N BYTEs	queue buffer

Top
2F0803 - INT 2F U - DOS 4.0+ DRIVER.SYS support - GET DRIVE DATA TABLE LIST
INT 2F U - DOS 4.0+ DRIVER.SYS support - GET DRIVE DATA TABLE LIST
	AX = 0803h
Return: DS:DI -> first drive data table in list (see #02601,#02602,#02603)
Note:	not available under DR DOS 5.0, but supported by Novell DOS 7 (using
	  the MS-DOS 4+ data table format)
SeeAlso: AX=0801h

Format of DOS 3.30 drive data table:
Offset	Size	Description	(Table 02601)
 00h	DWORD	pointer to next table (offset FFFFh if last table)
 04h	BYTE	physical unit number (for INT 13)
 05h	BYTE	logical drive number (0=A:)
 06h 19 BYTEs	BIOS Parameter Block (see also INT 21/AH=53h)
		Offset	Size	Description
		 00h	WORD	bytes per sector
		 02h	BYTE	sectors per cluster, FFh if unknown
		 03h	WORD	number of reserved sectors
		 05h	BYTE	number of FATs
		 06h	WORD	number of root dir entries
		 08h	WORD	total sectors
		 0Ah	BYTE	media descriptor, 00h if unknown
		 0Bh	WORD	sectors per FAT
		 0Dh	WORD	sectors per track
		 0Fh	WORD	number of heads
		 11h	WORD	number of hidden sectors
 19h	BYTE	flags
		bit 6: 16-bit FAT instead of 12-bit FAT
 1Ah	WORD	number of DEVICE OPEN calls without corresponding DEVICE CLOSE
 1Ch 11 BYTEs	volume label or "NO NAME    " if none (always "NO NAME" for
		  fixed media)
 27h	BYTE	terminating null for volume label???
 28h	BYTE	device type (see #01561 at INT 21/AX=440Dh"DOS 3.2+")
 29h	WORD	bit flags describing drive (see #02604)
 2Bh	WORD	number of cylinders
 2Dh 19 BYTEs	BIOS Parameter Block for highest capacity supported
 40h  3 BYTEs	???
 43h  9 BYTEs	filesystem type???, default = "NO NAME	"
		(apparently only MS-DOS 3.30 fixed media, nulls for removable
		  media and PC-DOS 3.30)
 4Ch	BYTE	least-significant byte of last-accessed cylinder number
---removable media---
 4Dh	DWORD	time of last access in clock ticks (FFFFFFFFh if never)
---fixed media---
 4Dh	WORD	partition (FFFFh = primary, 0001h = extended)
 4Fh	WORD	absolute cylinder number of partition's start on physical
		  drive (always FFFFh if primary partition)
SeeAlso: #02602,#02603

Format of COMPAQ DOS 3.31 drive data table:
Offset	Size	Description	(Table 02602)
 00h	DWORD	pointer to next table (offset FFFFh if last table)
 04h	BYTE	physical unit number (for INT 13)
 05h	BYTE	logical drive number (0=A:)
 06h 25 BYTEs	BIOS Parameter Block (see #02603)
 1Fh  6 BYTEs	reserved fields from BPB above???
 25h	BYTE	flags
		bit 6: 16-bit FAT instead of 12-bit FAT
		bit 5: large volume???
 26h	WORD	device-open count???
 28h 11 BYTEs	volume label or "NO NAME    " if none (always "NO NAME" for
		  fixed media)
 33h	BYTE	terminating null for volume label
 34h	BYTE	device type (see #01561 at INT 21/AX=440Dh"DOS 3.2+")
 35h	WORD	bit flags describing drive (see #02604)
 37h	WORD	number of cylinders
 39h 25 BYTEs	BIOS parameter block for highest capacity drive supports
 52h  6 BYTEs	??? apparently always zeros
 58h	BYTE	least-significant byte of last-accessed cylinder number
---removable media---
 59h	DWORD	time of last access in clock ticks (FFFFFFFFh if never)
---fixed media---
 59h	WORD	partition (FFFFh = primary, 0001h = extended)
 5Bh	WORD	absolute cylinder number of partition's start on physical
		  drive (always FFFFh if primary partition)
SeeAlso: #02601,#02603

Format of DOS 4.0-7.0 drive data table:
Offset	Size	Description	(Table 02603)
 00h	DWORD	pointer to next table (offset FFFFh if last table)
 04h	BYTE	physical unit number (for INT 13)
 05h	BYTE	logical drive number (0=A:)
 06h 25 BYTEs	BIOS Parameter Block (see also INT 21/AH=53h)
		Offset	Size	Description
		 00h	WORD	bytes per sector
		 02h	BYTE	sectors per cluster, FFh if unknown
		 03h	WORD	number of reserved sectors
		 05h	BYTE	number of FATs
		 06h	WORD	number of root dir entries
		 08h	WORD	total sectors (refer to offset 15h if zero)
		 0Ah	BYTE	media descriptor, 00h if unknown
		 0Bh	WORD	sectors per FAT
		 0Dh	WORD	sectors per track
		 0Fh	WORD	number of heads
		 11h	DWORD	number of hidden sectors
		 15h	DWORD	total sectors if WORD at 08h is zero
 1Fh	BYTE	flags
		bit 6: 16-bit FAT instead of 12-bit
		bit 7: unsupportable disk (all accesses will return Not Ready)
 20h	WORD	device-open count
 22h	BYTE	device type (see #01561 at INT 21/AX=440Dh"DOS 3.2+")
 23h	WORD	bit flags describing drive (see #02604)
 25h	WORD	number of cylinders (for partition only, if hard disk)
 27h 25 BYTEs	BIOS Parameter Block for default (highest) capacity supported
 40h  6 BYTEs	reserved (part of BPB above)
 46h	BYTE	last track accessed
---removable media---
 47h	DWORD	time of last access in clock ticks (FFFFFFFFh if never)
---fixed media---
 47h	WORD	partition (FFFFh = primary, 0001h = extended)
		always 0001h for DOS 5+
 49h	WORD	absolute cylinder number of partition's start on physical drive
		(FFFFh if primary partition in DOS 4.x)
------
 4Bh 11 BYTEs	volume label or "NO NAME    " if none (apparently taken from
		  extended boot record rather than root directory)
 56h	BYTE	terminating null for volume label
 57h	DWORD	serial number
 5Bh  8 BYTEs	filesystem type ("FAT12	  " or "FAT16	")
 63h	BYTE	terminating null for filesystem type
SeeAlso: #02601,#02602

Bitfields for flags describing drive:
Bit(s)	Description	(Table 02604)
 0	fixed media
 1	door lock ("changeline") supported
 2	current BPB locked
 3	all sectors in a track are the same size
 4	physical drive has multiple logical units
 5	current logical drive for shared physical drive
 6	disk change detected
 7	device parameters were changed (set DASD before formatting)
	(see #01560 at INT 21/AX=440Dh"DOS 3.2+")
 8	disk reformatted (BPB of current media was changed)
 9	access flag (fixed media only, disables reads and writes)
	(see #01566 at INT 21/AX=440Dh"DOS 3.2+")

Top
2F1002CHFF - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - READ BUFFERS
INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - READ BUFFERS
	AX = 1002h
	CH = FFh (pre-read required)
	CL = buffer type (here FAT, DIR, or DATA, see below)
	AH:DX = 24 bit sector number
Return:	ES:SI -> buffer control block
Notes:	This private function is called internally by the OS kernel to
	  ask the FDOS to find the corresponding buffer.  By using the
	  INT 2F/AX=1001h FDOS hook, the call can be intercepted by external
	  system components such as the DELWATCH TSR.
	This function must under no circumstances be called by applications!
SeeAlso: INT 2F/AX=1001h,AX=1003h,AX=1008h,AX=1009h,AX=10FEh

Bitfields for Novell DOS 7 FDOS buffer type:
Bit(s)	Description	(Table 04099)
 7	remote (on a network drive)
 6	dirty (modified)
 3	data sector
 2	directory sector
 1	FAT sector

Top
2F1003 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - FLUSH BUFFERS
INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - FLUSH BUFFERS
	AX = 1003h
	BL = drive???
	BH = buffer type to flush (BF_ISFAT+BF_ISDIR+BF_ISDATA)
Return: nothing???
Notes:	This private function is called internally by the OS kernel to
	  ask the FDOS to flush all buffer.  By using the INT 2F/AX=1001h FDOS
	  hook, the call can be intercepted by external system components such
	  as the DELWATCH TSR.
	This function must under no circumstances be called by applications!
SeeAlso: INT 2F/AX=1001h,AX=1004h,AX=10FEh

Top
2F1004 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - FREE FAT CHAIN
INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - FREE FAT CHAIN
	AX = 1004h
	BX = first block to release on current drive
Return: nothing
Notes:	This private function is called internally by the OS kernel to
	  ask the FDOS to release the FAT chain.  By using the INT 2F/AX=1001h
	  FDOS hook, the call can be intercepted by external system components
	  such as the DELWATCH TSR.
	This function must under no circumstances be called by applications!
SeeAlso: INT 2F/AX=1001h,AX=1005h,AX=10FEh

Top
2F1005 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - ALLOCATE CLUSTER
INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - ALLOCATE CLUSTER
	AX = 1005h
	BX = block from which to start search (e.g. current end of file)
	    0000h = start of disk
Return: AX or BX??? = allocated cluster (already marked as End of Chain)
	    or 0000h if none available
Notes:	This private function is called internally by the OS kernel to
	  ask the FDOS to allocate disk space.  By using the
	  INT 2F/AX=1001h FDOS hook, the call can be intercepted by external
	  system components such as the DELWATCH TSR.
	This function must under no circumstances be called by applications!
SeeAlso: INT 2F/AX=1001h,AX=1004h,AX=1007h,AX=10FEh

Top
2F1006 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - NEXT CLUSTER / READ FAT???
INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - NEXT CLUSTER / READ FAT???
	AX = 1006h
	BX = current cluster number
Return:	AX or BX??? = next cluster in chain
Notes:	This private function is called internally by the OS kernel to
	  ask the FDOS to get the next cluster in a file.  By using the
	  INT 2F/AX=1001h FDOS hook, the call can be intercepted by external
	  system components such as the DELWATCH TSR.
	This function must under no circumstances be called by applications!
SeeAlso: INT 2F/AX=1001h,AX=1005h,AX=1007h,AX=10FEh

Top
2F1007 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - UPDATE FAT ENTRY / WRITE FAT???
INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - UPDATE FAT ENTRY / WRITE FAT???
	AX = 1007h
	BX = FAT entry to change
	DX = new value
Return:	nothing
Notes:	This private function is called internally by the OS kernel to
	  ask the FDOS to update the FAT.  By using the INT 2F/AX=1001h FDOS
	  hook, the call can be intercepted by external system components such
	  as the DELWATCH TSR.
	This function must under no circumstances be called by applications!
SeeAlso: INT 2F/AX=1001h,AX=1005h,AX=1006h,AX=1008h,AX=10FEh

Top
2F1008 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - FIXUP CHECKSUMS / DIR UPDATE???
INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - FIXUP CHECKSUMS / DIR UPDATE???
	AX = 1008h
	BX = segment of directory buffer
	CX = cluster to fixup (0 = root)
	DI = directory entry index (truncated to cluster if subdirectory)
	BX:SI -> directory entry (single entry for hashing)
Return:	nothing
Notes:	This private function is called internally by the OS kernel to
	  ask the FDOS to fixup hashing/checksums.  By using the
	  INT 2F/AX=1001h FDOS hook, the call can be intercepted by external
	  system components such as the DELWATCH TSR.
	This function must under no circumstances be called by applications!
SeeAlso: INT 2F/AX=1001h,AX=1007h,AX=1009h,AX=10FEh

Top
2F1009 - INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - DIRECTORY BUFFER INFO
INT 2F CU - Novell DOS 7+ FDOS EXTENSIONS - DIRECTORY BUFFER INFO
	AX = 1009h
Return: ES:DI -> 128-byte directory record buffer
	ES:SI -> directory BCB structure (see #04101)
Notes:	This private function is called internally by the OS kernel.  By using
	  the INT 2F/AX=1001h FDOS hook, the call can be intercepted by
	  external system components such as the DELWATCH TSR.
	This function must under no circumstances be called by applications!
SeeAlso: INT 2F/AX=1001h,AX=10FEh

Format of Novell DOS 7+ FDOS directory BCB:
Offset	Size	Description	(Table 04101)
 00h	BYTE	drive (FFh = invalid)
 01h	BYTE	low byte of record number
 02h	BYTE	middle byte of record number
 03h	BYTE	high byte of record number

Top
2F1200 - INT 2F U - DOS 3.0+ internal - INSTALLATION CHECK
INT 2F U - DOS 3.0+ internal - INSTALLATION CHECK
	AX = 1200h
Return: AL = FFh (for compatibility with other INT 2F functions)

Top
2F1201 - INT 2F U - DOS 3.0+ internal - CLOSE CURRENT FILE
INT 2F U - DOS 3.0+ internal - CLOSE CURRENT FILE
	AX = 1201h
	SS = DOS DS = DOS kernel data seg (must be using a DOS internal stack)
	SDA current SFT pointer -> SFT of file to close
Return: CF set on error
	ES:DI -> SFT for file
	CX undefined (new reference count of SFT in many versions)
	BX destroyed
SeeAlso: AX=1106h,AX=1227h,INT 21/AH=3Eh

Top
2F1202 - INT 2F U - DOS 3.0+ internal - GET INTERRUPT ADDRESS
INT 2F U - DOS 3.0+ internal - GET INTERRUPT ADDRESS
	AX = 1202h
	STACK: WORD vector number
Return: ES:BX -> interrupt vector (DWORD containing handler's address)
	STACK unchanged

Top
2F1203 - INT 2F U - DOS 3.0+ internal - GET DOS DATA SEGMENT
INT 2F U - DOS 3.0+ internal - GET DOS DATA SEGMENT
	AX = 1203h
Return: DS = data segment of IBMDOS.COM/MSDOS.SYS
Note:	for DOS prior to version 5.0, the data segment is the same as the code
	  segment

Top
2F1204 - INT 2F U - DOS 3.0+ internal - NORMALIZE PATH SEPARATOR
INT 2F U - DOS 3.0+ internal - NORMALIZE PATH SEPARATOR
	AX = 1204h
	STACK: WORD character to normalize
Return: AL = normalized character (forward slash turned to backslash, all
		  others unchanged)
	ZF set if path separator
	STACK unchanged

Top
2F1205 - INT 2F U - DOS 3.0+ internal - OUTPUT CHARACTER TO STANDARD OUTPUT
INT 2F U - DOS 3.0+ internal - OUTPUT CHARACTER TO STANDARD OUTPUT
	AX = 1205h
	STACK: WORD character to output
Return: STACK unchanged
Note:	can be called only from within DOS

Top
2F1206 - INT 2F U - DOS 3.0+ internal - INVOKE CRITICAL ERROR
INT 2F U - DOS 3.0+ internal - INVOKE CRITICAL ERROR
	AX = 1206h
	DI = error code
	BP:SI -> device driver header (see #01646)
	SS = DOS DS (must be using a DOS internal stack)
	STACK: WORD value to be passed to INT 24 in AX
Return: AL = 0-3 for Abort, Retry, Ignore, Fail
	STACK unchanged
SeeAlso: INT 24

Top
2F1207 - INT 2F U - DOS 3.0+ internal - MAKE DISK BUFFER MOST-RECENTLY USED
INT 2F U - DOS 3.0+ internal - MAKE DISK BUFFER MOST-RECENTLY USED
	AX = 1207h
	DS:DI -> disk buffer
Return: nothing
Desc:	move the indicated buffer to the end of the disk buffer chain (least-
	  recently used is first); under DOS 3.3, the buffer is then moved to
	  the start of the disk buffer chain if it was marked unused
Notes:	can be called only from within DOS
	this function is nearly the same as AX=120Fh
SeeAlso: AX=120Fh

Top
2F1208 - INT 2F U - DOS 3.0+ internal - DECREMENT SFT REFERENCE COUNT
INT 2F U - DOS 3.0+ internal - DECREMENT SFT REFERENCE COUNT
	AX = 1208h
	ES:DI -> SFT
Return: AX = original value of reference count
Notes:	if the reference count was 1, it is set to FFFFh ("busy", since 0
	  indicates that the SFT is not in use).  It is the caller's
	  responsibility to set the reference count to zero after cleaning up.
	used by network redirectors such as MSCDEX
SeeAlso: AX=1106h

Top
2F1209 - INT 2F U - DOS 3.0+ internal - FLUSH AND FREE DISK BUFFER
INT 2F U - DOS 3.0+ internal - FLUSH AND FREE DISK BUFFER
	AX = 1209h
	DS:DI -> disk buffer
Return: disk buffer marked unused, contents written to disk if buffer dirty
Note:	can be called only from within DOS
SeeAlso: AX=120Eh,AX=1215h

Top
2F120A - INT 2F U - DOS 3.0+ internal - PERFORM CRITICAL ERROR INTERRUPT
INT 2F U - DOS 3.0+ internal - PERFORM CRITICAL ERROR INTERRUPT
	AX = 120Ah
	DS = SS = DOS DS (must be using a DOS internal stack)
	STACK: WORD extended error code
Return: AL = user response (0=ignore, 1=retry, 2=abort, 3=fail)
	CF clear if retry, set otherwise
	STACK unchanged
Notes:	can only be called during a DOS function call, as it uses various
	  fields in the SDA to set up the registers for the INT 24
	reportedly sets current DPB's first root directory sector to 1
SeeAlso: INT 24

Top
2F120B - INT 2F U - DOS 3.0+ internal - SIGNAL SHARING VIOLATION TO USER
INT 2F U - DOS 3.0+ internal - SIGNAL SHARING VIOLATION TO USER
	AX = 120Bh
	ES:DI -> system file table entry for previous open of file
	STACK: WORD extended error code (should be 20h--sharing violation)
Return: CF clear if operation should be retried
	CF set if operation should not be retried
	    AX = error code (20h) (see #01680 at INT 21/AH=59h/BX=0000h)
	STACK unchanged
Notes:	can only be called during a DOS function call
	should only be called if an attempt was made to open an already-open
	  file contrary to the sharing rules
	invokes INT 24 if SFT file opened via FCB or in compatibility mode with
	  inheritance allowed

Top
2F120C - INT 2F U - DOS 3.0+ internal - OPEN DEVICE AND SET SFT OWNER/MODE
INT 2F U - DOS 3.0+ internal - OPEN DEVICE AND SET SFT OWNER/MODE
	AX = 120Ch
	SDA current SFT pointer -> SFT for file
	DS = DOS DS
	SS = DOS DS (must be using a DOS internal stack)
Return: ES, DI, AX destroyed
Notes:	invokes "device open" call on device driver for SFT
	changes owner of last-accessed SFT to calling process if it was opened
	  via FCB
	called by network redirectors such as MSCDEX

Top
2F120D - INT 2F U - DOS 3.0+ internal - GET DATE AND TIME
INT 2F U - DOS 3.0+ internal - GET DATE AND TIME
	AX = 120Dh
	SS = DOS DS (must be using a DOS internal stack)
Return: AX = current date in packed format (see #01666 at INT 21/AX=5700h)
	DX = current time in packed format (see #01665 at INT 21/AX=5700h)
SeeAlso: INT 21/AH=2Ah,INT 21/AH=2Ch

Top
2F120E - INT 2F U - DOS 3.0+ internal - MARK ALL DISK BUFFERS UNREFERENCED
INT 2F U - DOS 3.0+ internal - MARK ALL DISK BUFFERS UNREFERENCED
	AX = 120Eh
	SS = DOS DS (must be using a DOS internal stack)
Return: DS:DI -> first disk buffer
Notes:	clears "referenced" flag on all disk buffers
	in DOS 5+, this has become essentially a NOP, invoking the same code
	  used by AX=1224h (SHARING DELAY)
SeeAlso: AX=1209h,AX=1210h,INT 21/AH=0Dh

Top
2F120F - INT 2F U - DOS 3.0+ internal - MAKE BUFFER MOST RECENTLY USED
INT 2F U - DOS 3.0+ internal - MAKE BUFFER MOST RECENTLY USED
	AX = 120Fh
	DS:DI -> disk buffer
	SS = DOS DS (must be using a DOS internal stack)
Return: DS:DI -> next buffer in buffer list
Desc:	move the indicated buffer to the end of the disk buffer chain (least-
	  recently used is first); under DOS 3.3, the buffer is then moved to
	  the start of the disk buffer chain if it was marked unused
Note:	this function is the same as AX=1207h except that it returns a
	  pointer to the buffer following the specified buffer in the buffer
	  chain
SeeAlso: AX=1207h

Top
2F1210 - INT 2F U - DOS 3.0+ internal - FIND UNREFERENCED DISK BUFFER
INT 2F U - DOS 3.0+ internal - FIND UNREFERENCED DISK BUFFER
	AX = 1210h
	DS:DI -> first disk buffer to check
Return: ZF clear if found
	    DS:DI -> first unreferenced disk buffer
	ZF set if not found
Note:	in DOS 5+, this has become essentially a NOP, invoking the same code
	  used by AX=1224h (SHARING DELAY)
SeeAlso: AX=120Eh

Top
2F1211 - INT 2F U - DOS 3.0+ internal - NORMALIZE ASCIZ FILENAME
INT 2F U - DOS 3.0+ internal - NORMALIZE ASCIZ FILENAME
	AX = 1211h
	DS:SI -> ASCIZ filename to normalize
	ES:DI -> buffer for normalized filename
Return: destination buffer filled with uppercase filename, with slashes turned
	to backslashes
SeeAlso: AX=121Eh,AX=1221h

Top
2F1212 - INT 2F U - DOS 3.0+ internal - GET LENGTH OF ASCIZ STRING
INT 2F U - DOS 3.0+ internal - GET LENGTH OF ASCIZ STRING
	AX = 1212h
	ES:DI -> ASCIZ string
Return: CX = length of string
SeeAlso: AX=1225h

Top
2F1213 - INT 2F U - DOS 3.0+ internal - UPPERCASE CHARACTER
INT 2F U - DOS 3.0+ internal - UPPERCASE CHARACTER
	AX = 1213h
	STACK: WORD character to convert to uppercase
Return: AL = uppercase character
	STACK unchanged

Top
2F1214 - INT 2F U - DOS 3.0+ internal - COMPARE FAR POINTERS
INT 2F U - DOS 3.0+ internal - COMPARE FAR POINTERS
	AX = 1214h
	DS:SI = first pointer
	ES:DI = second pointer
Return: ZF set if pointers are equal, ZF clear if not equal
	CF clear if pointers equal, CF set if not

Top
2F1215 - INT 2F U - DOS 3.0+ internal - FLUSH BUFFER
INT 2F U - DOS 3.0+ internal - FLUSH BUFFER
	AX = 1215h
	DS:DI -> disk buffer
	SS = DOS DS (must be using a DOS internal stack)
	STACK: WORD drives for which to skip buffer
		ignore buffer if drive same as high byte, or bytes differ and
		  the buffer is for a drive OTHER than that given in low byte
Return: STACK unchanged
Note:	can be called only from within DOS
SeeAlso: AX=1209h

Top
2F1216 - INT 2F U - DOS 3.0+ internal - GET ADDRESS OF SYSTEM FILE TABLE ENTRY
INT 2F U - DOS 3.0+ internal - GET ADDRESS OF SYSTEM FILE TABLE ENTRY
	AX = 1216h
	BX = system file table entry number
Return: CF clear if successful
	    ES:DI -> system file table entry
	    BX = relative entry number in system file table containing entry
	    AX destroyed
	CF set if BX greater than FILES=
Note:	supported by DR DOS 5+
SeeAlso: AX=1220h

Top
2F1217 - INT 2F U - DOS 3.0+ internal - GET CURRENT DIRECTORY STRUCTURE FOR DRIVE
INT 2F U - DOS 3.0+ internal - GET CURRENT DIRECTORY STRUCTURE FOR DRIVE
	AX = 1217h
	SS = DOS DS (must be using a DOS internal stack)
	STACK: WORD drive (0 = A:, 1 = B:, etc)
Return: CF set on error
	    (drive > LASTDRIVE)
	CF clear if successful
	    DS:SI -> current directory structure for specified drive
	STACK unchanged
SeeAlso: AX=1219h

Top
2F1218 - INT 2F U - DOS 3.0+ internal - GET CALLER'S REGISTERS
INT 2F U - DOS 3.0+ internal - GET CALLER'S REGISTERS
	AX = 1218h
Return: DS:SI -> saved caller's AX,BX,CX,DX,SI,DI,BP,DS,ES (on stack)
Note:	only valid while within DOS

Top
2F1219 - INT 2F U - DOS 3.0+ internal - SET DRIVE???
INT 2F U - DOS 3.0+ internal - SET DRIVE???
	AX = 1219h
	SS = DOS DS (must be using a DOS internal stack)
	STACK: WORD drive (0 = default, 1 = A:, etc)
Return: ???
	STACK unchanged
Notes:	calls AX=1217h
	builds a current directory structure if inside server call
	  (INT 21/AX=5D00h)
SeeAlso: AX=1217h,AX=121Fh

Top
2F121A - INT 2F U - DOS 3.0+ internal - GET FILE'S DRIVE
INT 2F U - DOS 3.0+ internal - GET FILE'S DRIVE
	AX = 121Ah
	DS:SI -> filename
Return: AL = drive (0 = default, 1 = A:, etc, FFh = invalid)
	DS:SI -> filename without leading X: (if present)
SeeAlso: INT 21/AH=19h,INT 21/AH=60h

Top
2F121B - INT 2F U - DOS 3.0+ internal - SET YEAR/LENGTH OF FEBRUARY
INT 2F U - DOS 3.0+ internal - SET YEAR/LENGTH OF FEBRUARY
	AX = 121Bh
	CL = year - 1980
Return: AL = number of days in February
Note:	requires DS to be set to the DOS data segment
SeeAlso: INT 21/AH=2Bh"DATE"

Top
2F121C - INT 2F U - DOS 3.0+ internal - CHECKSUM MEMORY
INT 2F U - DOS 3.0+ internal - CHECKSUM MEMORY
	AX = 121Ch
	DS:SI -> start of memory to checksum
	CX = number of bytes
	DX = initial checksum
	SS = DOS DS (must be using a DOS internal stack)
Return: AX, CX destroyed
	DX = checksum
	DS:SI -> first byte after checksummed range
Notes:	used by DOS to determine day count since 1980/1/1 given a date
	supported by DR DOS 5.0+
SeeAlso: AX=121Dh

Top
2F121D - INT 2F U - DOS 3.0+ internal - SUM MEMORY
INT 2F U - DOS 3.0+ internal - SUM MEMORY
	AX = 121Dh
	DS:SI -> memory to add up
	CX = 0000h
	DX = limit
Return: AL = byte which exceeded limit
	CX = number of bytes before limit exceeded
	DX = remainder after adding first CX bytes
	DS:SI -> byte beyond the one which exceeded the limit
Notes:	used by DOS to determine year or month given day count since 1980/1/1
	supported by DR DOS 5.0+
SeeAlso: AX=121Ch

Top
2F121E - INT 2F U - DOS 3.0+ internal - COMPARE FILENAMES
INT 2F U - DOS 3.0+ internal - COMPARE FILENAMES
	AX = 121Eh
	DS:SI -> first ASCIZ filename
	ES:DI -> second ASCIZ filename
Return: ZF set if filenames equivalent, ZF clear if not
Note:	supported by DR DOS 5.0+
SeeAlso: AX=1211h,AX=1221h

Top
2F121F - INT 2F U - DOS 3.0+ internal - BUILD CURRENT DIRECTORY STRUCTURE
INT 2F U - DOS 3.0+ internal - BUILD CURRENT DIRECTORY STRUCTURE
	AX = 121Fh
	SS = DOS DS (must be using a DOS internal stack)
	STACK: WORD drive letter
Return: ES:DI -> current directory structure (will be overwritten by next call)
	STACK unchanged

Top
2F1220 - INT 2F U - DOS 3.0+ internal - GET JOB FILE TABLE ENTRY
INT 2F U - DOS 3.0+ internal - GET JOB FILE TABLE ENTRY
	AX = 1220h
	BX = file handle
Return: CF set on error
	    AL = 6 (invalid file handle)
	CF clear if successful
	    ES:DI -> JFT entry for file handle in current process
Notes:	the byte pointed at by ES:DI contains the number of the SFT for the
	  file handle, or FFh if the handle is not open
	supported by DR DOS 5.0+
SeeAlso: AX=1216h,AX=1229h

Top
2F1221 - INT 2F U - DOS 3.0+ internal - CANONICALIZE FILE NAME
INT 2F U - DOS 3.0+ internal - CANONICALIZE FILE NAME
	AX = 1221h
	DS:SI -> file name to be fully qualified
	ES:DI -> 128-byte buffer for resulting canonical file name
	SS = DOS DS (must be using a DOS internal stack)
Return: (see INT 21/AH=60h)
Note:	identical to INT 21/AH=60h
SeeAlso: AX=1123h,INT 21/AH=60h

Top
2F1222 - INT 2F U - DOS 3.0+ internal - SET EXTENDED ERROR INFO
INT 2F U - DOS 3.0+ internal - SET EXTENDED ERROR INFO
	AX = 1222h
	SS = DOS data segment
	SS:SI -> 4-byte records
		BYTE	error code, FFh = last record
		BYTE	error class, FFh = don't change
		BYTE	suggested action, FFh = don't change
		BYTE	error locus, FFh = don't change
	SDA error code set
Return: SI destroyed
	SDA error class, error locus, and suggested action fields set
Note:	can be called only from within DOS
SeeAlso: AX=122Dh,INT 21/AH=59h/BX=0000h,INT 21/AX=5D0Ah

Top
2F1223 - INT 2F U - DOS 3.0+ internal - CHECK IF CHARACTER DEVICE
INT 2F U - DOS 3.0+ internal - CHECK IF CHARACTER DEVICE
	AX = 1223h
	DS = DOS DS
	SS = DOS DS (must be using a DOS internal stack)
	SDA+218h (DOS 3.10-3.30) = eight-character blank-padded name
	SDA+22Bh (DOS 4.0-6.0) = eight-character blank-padded name
	SDA file attribute field set
	direction flag clear (i.e. CLD)
Return: CF set if no character device by that name found
	CF clear if found
	    BH bits 4-0 copied from low byte of device attribute word
	    BH bit 5 set, bits 7-6 clear
Notes:	can only be called from within DOS
	the check is skipped (always says "not device") if the volume ID bit
	  of the file attribute field is set on entry
SeeAlso: INT 21/AX=5D06h,INT 21/AX=5D0Bh

Top
2F1224 - INT 2F U - DOS 3.0+ internal - SHARING RETRY DELAY
INT 2F U - DOS 3.0+ internal - SHARING RETRY DELAY
	AX = 1224h
	SS = DOS DS (must be using a DOS internal stack)
Return: after delay set by INT 21/AX=440Bh, unless in server call
	  (INT 21/AX=5D00h)
Note:	delay is dependent on the processor speed, and is skipped entirely if
	  inside a server call
SeeAlso: INT 21/AX=440Bh,INT 21/AH=52h,INT 62/AX=0097h

Top
2F1225 - INT 2F U - DOS 3.0+ internal - GET LENGTH OF ASCIZ STRING
INT 2F U - DOS 3.0+ internal - GET LENGTH OF ASCIZ STRING
	AX = 1225h
	DS:SI -> ASCIZ string
Return: CX = length of string
Note:	supported by DR DOS 5.0+
SeeAlso: AX=1212h

Top
2F1226 - INT 2F U - DOS 3.3+ internal - OPEN FILE
INT 2F U - DOS 3.3+ internal - OPEN FILE
	AX = 1226h
	CL = access mode
	DS:DX -> ASCIZ filename
	SS = DOS DS (must be using a DOS internal stack)
Return: CF set on error
	    AL = error code (see #01680 at INT 21/AH=59h/BX=0000h)
	CF clear if successful
	    AX = file handle
Notes:	can only be called from within DOS
	equivalent to INT 21/AH=3Dh
	used by NLSFUNC to access COUNTRY.SYS when invoked by the DOS kernel
SeeAlso: AX=1227h,INT 21/AH=3Dh

Top
2F1227 - INT 2F U - DOS 3.3+ internal - CLOSE FILE
INT 2F U - DOS 3.3+ internal - CLOSE FILE
	AX = 1227h
	BX = file handle
	SS = DOS DS (must be using a DOS internal stack)
Return: CF set on error
	    AL = 06h invalid file handle
	CF clear if successful
Notes:	can only be called from within DOS
	equivalent to INT 21/AH=3Eh
	used by NLSFUNC to access COUNTRY.SYS when invoked by the DOS kernel
SeeAlso: AX=1106h,AX=1201h,AX=1226h,INT 21/AH=3Eh

Top
2F1228BP4200 - INT 2F U - DOS 3.3+ internal - MOVE FILE POINTER
INT 2F U - DOS 3.3+ internal - MOVE FILE POINTER
	AX = 1228h
	BP = 4200h, 4201h, 4202h (see INT 21/AH=42h)
	BX = file handle
	CX:DX = offset in bytes
	SS = DOS DS (must be using a DOS internal stack)
Return: as for INT 21/AH=42h
Notes:	equivalent to INT 21/AH=42h, but may only be called from inside a DOS
	  function call
	sets user stack frame pointer to dummy buffer, moves BP to AX, performs
	  LSEEK, and restores frame pointer
	used by NLSFUNC to access COUNTRY.SYS when invoked by the DOS kernel
SeeAlso: INT 21/AH=42h

Top
2F1229 - INT 2F U - DOS 3.3+ internal - READ FROM FILE
INT 2F U - DOS 3.3+ internal - READ FROM FILE
	AX = 1229h
	BX = file handle
	CX = number of bytes to read
	DS:DX -> buffer
	SS = DOS DS (must be using a DOS internal stack)
Return: as for INT 21/AH=3Fh"DOS"
Notes:	equivalent to INT 21/AH=3Fh, but may only be called when already inside
	  a DOS function call
	used by NLSFUNC to access COUNTRY.SYS when invoked by the DOS kernel
SeeAlso: AX=1226h,INT 21/AH=3Fh"DOS"

Top
2F122A - INT 2F U - DOS 3.3+ internal - SET FASTOPEN ENTRY POINT
INT 2F U - DOS 3.3+ internal - SET FASTOPEN ENTRY POINT
	AX = 122Ah
	BX = entry point to set (0001h or 0002h)
	DS:SI -> FASTOPEN entry point (see #02611,#02612)
		(entry point not set if SI = FFFFh for DOS 4.0+)
Return: CF set if specified entry point already set
Notes:	entry point in BX is ignored under DOS 3.30
	both entry points set to same handler by DOS 4.01
	DOS 5.0 and 6.0 only set entry point 1

(Table 02611)
Values DOS 3.30+ FASTOPEN entry point is called with:
	AL = 01h  Lookup
	    CX = ??? seems to be offset
	    DI = ??? seems to be offset
	    SI = offset in DOS DS of filename
	AL = 02h  insert file into FASTOPEN cache
	AL = 03h  delete file from FASTOPEN cache
	    SI = offset in DOS DS of filename
	AL = 04h  purge FASTOPEN cache
	    AH = subfunction (00h,01h,02h)
	    ES:DI -> ???
	    CX = ??? (subfunctions 01h and 02h only)
Returns: CF set on error or not installed
Note: function 03h calls function 01h first
SeeAlso: #02612,#02613

(Table 02612)
Values PC-DOS 4.01 FASTOPEN is additionally called with:
	AL = 04h ???
	    AH = 03h
	    ???
	AL = 05h ???
	AL = 0Bh ???
	AL = 0Ch ???
	AL = 0Dh ???
	AL = 0Eh ???
	AL = 0Fh ???
	AL = 10h ???
SeeAlso: #02611,#02613

(Table 02613)
Values MS-DOS 5.0-6.0 FASTOPEN is additionally called with:
	AL = 04h  purge FASTOPEN cache
	    AH = 03h
	    ???
	AL = 05h ???
	    DL = drive (00h = A:)
	    ???
	AL = 06h ???
	    ???
SeeAlso: #02611,#02612

Top
2F122B - INT 2F U - DOS 3.3+ internal - IOCTL
INT 2F U - DOS 3.3+ internal - IOCTL
	AX = 122Bh
	BP = 44xxh
	SS = DOS DS (must be using a DOS internal stack)
	additional registers as appropriate for INT 21/AX=44xxh
Return: as for INT 21/AH=44h
Notes:	equivalent to INT 21/AH=44h, but may only be called when already inside
	  a DOS function call
	sets user stack frame pointer to dummy buffer, moves BP to AX, performs
	  IOCTL, and restores frame pointer
	used by NLSFUNC in accessing COUNTRY.SYS when invoked by the DOS kernel
SeeAlso: INT 21/AH=44h

Top
2F122C - INT 2F U - DOS 3.3+ internal - GET DEVICE CHAIN
INT 2F U - DOS 3.3+ internal - GET DEVICE CHAIN
	AX = 122Ch
Return: BX:AX -> header of second device driver (NUL is first) in driver chain
Note:	although this function exists in DR DOS 5.0 and Novell DOS 7, it
	  always returns 0000h:0000h prior to Novell DOS 7 Update 15
SeeAlso: INT 21/AH=52h

Top
2F122D - INT 2F U - DOS 3.3+ internal - GET EXTENDED ERROR CODE
INT 2F U - DOS 3.3+ internal - GET EXTENDED ERROR CODE
	AX = 122Dh
	SS = DOS DS
Return: AX = current extended error code
SeeAlso: AX=1222h,INT 21/AH=59h/BX=0000h

Top
2F122E - INT 2F U - DOS 4.0+ internal - GET OR SET ERROR TABLE ADDRESSES
INT 2F U - DOS 4.0+ internal - GET OR SET ERROR TABLE ADDRESSES
	AX = 122Eh
	DL = subfunction
	    00h get standard DOS error table (see #02614)
		Return: ES:DI -> error table
				 (DOS 4: errors 00h-12h,50h-5Bh)
				 (DOS 5: errors 00h-26h,4Fh,51h-59h)
	    01h set standard DOS error table
		ES:DI -> error table
	    02h get parameter error table (errors 00h-0Ah)
		Return: ES:DI -> error table
	    03h set parameter error table
		ES:DI -> error table
	    04h get critical/SHARE error table (errors 13h-2Bh)
		Return: ES:DI -> error table
	    05h set critical/SHARE error table
		ES:DI -> error table
	    06h get ??? error table
		Return: ES:DI -> error table or 0000h:0000h
	    07h set ??? error table
		ES:DI -> error table
	    08h get error message retriever (see #02615)
		Return: ES:DI -> FAR procedure to fetch error message
	    09h set ??? error table
		ES:DI -> error table
Notes:	if the returned segment on a "get" is 0001h, then the offset specifies
	  the offset of the error message table within COMMAND.COM, and the
	  procedure returned by DL=08h should be called
	DOS 5+ COMMAND.COM does not allow setting any of the addresses (calls
	  with DL odd are ignored); they are always returned with segment 0001h
	for DOS 5.0, the standard and critical/SHARE error tables are combined
	  into a single error table
SeeAlso: AX=0500h,INT 21/AH=59h/BX=0000h

Format of DOS 4.x error table:
Offset	Size	Description	(Table 02614)
 00h	BYTE	FFh
 01h  2 BYTEs	04h,00h (DOS version???)
 03h	BYTE	number of error headers following
 04h 2N WORDs	table of all error headers for table
		Offset	Size	Description
		 00h	WORD	error message number
		 02h	WORD	offset of error message from start of header
				error messages are count byte followed by msg
Note:	DOS 5 error tables consist of one word per error number; each word
	  contains either the offset of a counted string or 0000h

(Table 02615)
Call error retrieval function with:
	AX = error number (see #02616)
	DI = offset of error table
Return: ES:DI -> error message (counted string)
Notes:	this function needs to access COMMAND.COM if the messages were not
	  loaded into memory permanently with /MSG; the caller should assume
	  that the returned message will be overwritten by the next call of
	  the function
	supported by DR DOS 5.0

(Table 02616)
Values for parameter errors:
 01h	Too many parameters
 02h	Required Parameter missing
 03h	Invalid switch
 04h	Invalid keyword
 06h	Parameter value not in allowed range
 07h	Parameter value not allowed
 08h	Parameter value not allowed
 09h	Parameter format not correct
 0Ah	Invalid parameter
 0Bh	Invalid parameter combination

Top
2F122F - INT 2F U - DOS 4.x internal - SET DOS VERSION NUMBER TO RETURN
INT 2F U - DOS 4.x internal - SET DOS VERSION NUMBER TO RETURN
	AX = 122Fh
	DX = DOS version number (0000h = return true DOS version)
Notes:	not available under DR DOS 5.0 or 6.0, or Novell DOS 7
	supported by FREEVER.COM, a freeware DOS version faking TSR by Matthias
	  Paul
SeeAlso: INT 21/AH=30h,INT 21/AX=3306h,INT 2F/AX=E000h"SETDRVER"

Top
2F13 - INT 2F U - DOS 3.2+ - SET DISK INTERRUPT HANDLER
INT 2F U - DOS 3.2+ - SET DISK INTERRUPT HANDLER
	AH = 13h
	DS:DX -> interrupt handler disk driver calls on read/write
	ES:BX = address to restore INT 13 to on system halt (exit from root
		 shell) or warm boot (INT 19)
Return: DS:DX set by previous invocation of this function
	ES:BX set by previous invocation of this function
Notes:	IO.SYS hooks INT 13 and inserts one or more filters ahead of the
	  original INT 13 handler.  The first is for disk change detection
	  on floppy drives, the second is for tracking formatting calls and
	  correcting DMA boundary errors, the third is for working around
	  problems in a particular version of IBM's ROM BIOS
	before the first call, ES:BX points at the original BIOS INT 13; DS:DX
	  also points there unless IO.SYS has installed a special filter for
	  hard disk reads (on systems with model byte FCh and BIOS date
	  "01/10/84" only), in which case it points at the special filter
	most DOS 3.2+ disk access is via the vector in DS:DX, although a few
	  functions are still invoked via an INT 13 instruction
	during Windows 3.1 startup this function seems to be used to
	  temporarily point DOS to a dummy handler in WDCTRL.386 which always
	  halts the system with a fatal error message.	If DS hasn't changed
	  on return from the function, Windows will display the error message
	  "Invalid DOS version".
	this is a dangerous security loophole for any virus-monitoring software
	  which does not trap this call ("INT13", "Nomenklatura", and many
	  Bulgarian viruses are known to use it to get the original ROM entry
	  point)
	the preloadable Novell DOS 7+ SECURITY.BIN driver $SECURE$ traps
	  this call.
BUG:	Novell DOS 7 IBMBIO.COM before 1995-05-08 trashed AX on return from
	  this function. VGACOPY by Thomas M”nkemeier's VGA Software GmbH
	  crashed due to this.	Later releases of Novell DOS 7 preserved the
	  contents of the AX register.
SeeAlso: INT 13/AH=01h,INT 19,INT 9D"VIRUS"

Top
2F1400 - INT 2F - European MS-DOS 4.0 POPUP - "CheckPu" - INSTALLATION CHECK
INT 2F - European MS-DOS 4.0 POPUP - "CheckPu" - INSTALLATION CHECK
	AX = 1400h
Return: AX = FFFFh if installed
	    BX = maximum memory required to save screen and keyboard info
	CF clear if successful
	CF set on error
	    AX = error code
		0002h invalid function
		0004h unknown error
Note:	the POPUP interface is used by background programs (see INT 21/AH=80h)
	  to communicate with the user
SeeAlso: AX=1401h"POPUP",AX=1402h"POPUP",AX=1403h"POPUP"

Top
2F1401 - INT 2F - European MS-DOS 4.0 POPUP - "PostPu" - OPEN/CLOSE POPUP SCREEN
INT 2F - European MS-DOS 4.0 POPUP - "PostPu" - OPEN/CLOSE POPUP SCREEN
	AX = 1401h
	DL = function (00h open, 01h close)
	DH = wait flag
	    00h block until screen opens
	    01h return error if screen is not available
	    02h urgent--always open screen immediately
Return: CF clear if successful
	    BX = amount of memory needed to save screen and keyboard info,
		0000h if default save location can be used (only if DH was 02h)
	CF set on error
Note:	the application using the screen is frozen until the popup screen is
	  closed
SeeAlso: AX=1400h"POPUP",AX=1402h"POPUP",AX=1403h"POPUP"

Top
2F1402 - INT 2F - European MS-DOS 4.0 POPUP - "SavePu" - SAVE POPUP SCREEN
INT 2F - European MS-DOS 4.0 POPUP - "SavePu" - SAVE POPUP SCREEN
	AX = 1402h
	ES:DI -> save buffer (0000h:0000h for default buffer in POPUP)
Return: CF clear if successful
	CF set on error
	    AX = error code (see #02625)
SeeAlso: AX=1400h"POPUP",AX=1401h"POPUP",AX=1403h"POPUP"

(Table 02625)
Values for POPUP error code:
 0001h	process does not own screen
 0004h	unknown error
 0005h	invalid pointer

Top
2F1403 - INT 2F - European MS-DOS 4.0 POPUP - "RestorePu" - RESTORE SCREEN
INT 2F - European MS-DOS 4.0 POPUP - "RestorePu" - RESTORE SCREEN
	AX = 1403h
	ES:DI -> buffer containing saved screen
		(0000h:0000h for default buffer in POPUP)
Return: CF clear if successful
	CF set on error
	    AX = error code (see #02625)
SeeAlso: AX=1400h"POPUP",AX=1401h"POPUP",AX=1402h"POPUP"

Top
2F1607BX0015 - INT 2F C - MS Windows - "DOSMGR" VIRTUAL DEVICE API
INT 2F C - MS Windows - "DOSMGR" VIRTUAL DEVICE API
	AX = 1607h
	BX = 0015h (VxD identifier of "DOSMGR")
	CX = function
	    0000h query instance processing
		DX = 0000h
		Return: CX = state
			    0000h not instanced
			    other instanced (DOS 5+ kernel returns 0001h)
				DX = segment of DOS drivers or 0000h for
					default of 0070h
				ES:BX -> patch table (see #02637)
	    0001h set patches in DOS
		DX = bit mask of patch requests (see #02636)
		Return: AX = B97Ch
			BX = bit mask of patches applied (see #02636)
			DX = A2ABh
	    0002h remove patches in DOS (ignored by DOS 5.0 kernel)
		DX = bit mask of patch requests (see #02636)
		Return: CX = 0000h (DOS 5-6)
		Note:	return values are ignored by DOSMGR in Windows 3.1
	    0003h get size of DOS data structures
		DX = bit mask of request (only one bit can be set)
		    bit 0: Current Directory Structure size
		Return: if supported request:
			    AX = B97Ch
			    CX = size in bytes of requested structure
			    DX = A2ABh
			else:
			    CX = 0000h
			    all other registers preserved
	    0004h determine instanced data structures
		Return: AX = B97Ch if supported
			DX = A2ABh if supported (DOS 5+ kernel returns 0000h)
			BX = bit mask of instanced items
			    bit 0: CDS
			    bit 1: SFT
			    bit 2: device list
			    bit 3: DOS swappable data area
	    0005h get device driver size
		ES = segment of device driver
		Return: DX:AX = 0000h:0000h on error (not dev. driver segment)
			DX:AX = A2ABh:B97Ch if successful
			    BX:CX = size of device driver in bytes
Notes:	DOSMGR (DOS Manager) will check whether the OEM DOS/BIOS data has
	  been instanced via this API and will not perform its own default
	  instancing of the normal DOS/BIOS data if so; if this API is not
	  supported, DOSMGR will also try to access instancing data through
	  INT 2F/AX=1603h
	these functions are supported by the DOS 5+ kernel; DOSMGR contains
	  tables of instancing information for earlier versions of DOS
	see Geoff Chappell's book _DOS_Internals_ for additional discussions of
	  DOSMGR's behavior and instancing in general
SeeAlso: AX=1603h,AX=1605h,AX=1607h/BX=000Ch,AX=1607h/BX=0014h
SeeAlso: AX=1684h"DEVICE API"

Bitfields for DOSMGR patch requests:
Bit(s)	Description	(Table 02636)
 0	enable critical sections
 1	NOP setting/checking user ID
 2	turn INT 21/AH=3Fh on STDIN into polling loop
 3	trap stack fault in "SYSINIT" to WIN386
 4	BIOS patch to trap "Insert disk X:" to WIN386

Format of DOSMGR patch table:
Offset	Size	Description	(Table 02637)
 00h  2 BYTEs	DOS version (major, minor)
 02h	WORD	offset in DOS data segment of "SAVEDS"
 04h	WORD	offset in DOS data segment of "SAVEBX"
 06h	WORD	offset in DOS data segment of InDOS flag
 08h	WORD	offset in DOS data segment of User ID word
 0Ah	WORD	offset in DOS data segment of "CritPatch" table to enable
		  critical section calls (see INT 2A/AH=80h)
 0Ch	WORD	(DOS 5+ only) offset in DOS data segment of "UMB_HEAD",
		  containing segment of last MCB in conventional memory

Top
2F160E - INT 2F U - MS-DOS 7 kernel - BOOT LOGO SUPPORT???
INT 2F U - MS-DOS 7 kernel - BOOT LOGO SUPPORT???
	AX = 160Eh
	BL = subfunction
	    00h get ???
		AX = state of flag manipulated by subfn 04h and 05h
		    0000h clear
		    FFFFh set
		DX = ??? (0000h)
	    01h link in INT 10h??? handlers
	    02h unlink INT 10h??? handlers
	    03h ???
	    04h set ??? flag
	    05h clear ??? flag
Return: AX = 0000h if supported
	    ???
SeeAlso: AX=160Fh,AX=1611h,AX=1614h

Top
2F160F - INT 2F U - MS-DOS 7 kernel - GET/SET ??? HANDLER
INT 2F U - MS-DOS 7 kernel - GET/SET ??? HANDLER
	AX = 160Fh
	BL = subfunction
	    00h get ??? handler
		Return: AX = 0000h if supported
			    CX:DX -> handler to which control is passed after
				      ??? executes
			   = 160Fh inside a Windows 95B DOS box
	    01h set ??? handler
		CX:DX -> new handler for ???
		Return: AX = 0000h if supported
Notes:	this function is not supported if ??? in the IO.SYS drivers portion of
	  the kernel is an IRET instruction (as is the case on my system)
	  rather than a FAR JMP
	the indicated handler seems to be related to INT 10 processing
SeeAlso: AX=160Eh,AX=1611h,AX=1614h

Top
2F1611 - INT 2F U - MS-DOS 7 kernel - GET SHELL PARAMETERS
INT 2F U - MS-DOS 7 kernel - GET SHELL PARAMETERS
	AX = 1611h
Return: AX = 0000h if supported
	    DS:DX -> primary shell's executable name
	    DS:SI -> prinary shell command line (counted string)
	    BH = ??? (00h)
	    BL = ??? (00h,40h)
Desc:	return the program name and commandline from the CONFIG.SYS SHELL=
	  statement
SeeAlso: AX=160Eh,AX=160Fh,AX=1612h,AX=4A33h

Top
2F1612 - INT 2F U - MS-DOS 7 kernel - GET ???
INT 2F U - MS-DOS 7 kernel - GET ???
	AX = 1612h
Return: AX = 0000h if supported
	    ES:BX -> DOS 7 kernel data (see #02641)
Note:	called by VTD.VXD; one of the returned data items is a pointer to the
	  WORD in which the default CLOCK$ driver maintains its count of days
	  since 01jan1980
SeeAlso: AX=160Fh,AX=1611h,AX=1613h

Format of MS-DOS 7.x ??? kernel data:
Offset	Size	Description	(Table 02641)
 00h	WORD	structure revision??? (0001h)
 02h	DWORD	-> ??? function (call with DS=high word of this field)
		the indicated function vectors through the INT 13 hook at
		  0070h:00B4h and then forces the A20 gate open
 06h	DWORD	-> ??? function
 0Ah	WORD	DOS DS
 0Ch  8 BYTEs	zeros seen
 14h	DWORD	-> ??? data
 18h	DWORD	-> ??? data
	???

Top
2F1613 - INT 2F - MS-DOS 7 kernel - GET SYSTEM.DAT (REGISTRY FILE) PATHNAME
INT 2F - MS-DOS 7 kernel - GET SYSTEM.DAT (REGISTRY FILE) PATHNAME
	AX = 1613h
	ES:DI -> buffer for full ASCIZ pathname to Windows95 SYSTEM.DAT
	CX = buffer size in bytes
Return: AX = 0000h if supported
	    ES:DI buffer filled
	    CX = number of bytes copied into buffer
SeeAlso: AX=160Eh,AX=1611h,AX=1612h,AX=1614h,AX=1690h

Top
2F1614 - INT 2F U - MS-DOS 7 kernel - SET SYSTEM.DAT (REGISTRY FILE) PATHNAME
INT 2F U - MS-DOS 7 kernel - SET SYSTEM.DAT (REGISTRY FILE) PATHNAME
	AX = 1614h
	ES:DI -> ASCIZ pathname to Windows95 SYSTEM.DAT
Return: AX = status
	    0000h if successful
	    1614h not supported
	    other: maximum length of pathname (004Eh for v4.00.950)
SeeAlso: AX=160Eh,AX=1611h,AX=1613h,AX=1690h

Top
2F1690 - INT 2F U - MS-DOS 7 kernel - GET/SET ???
INT 2F U - MS-DOS 7 kernel - GET/SET ???
	AX = 1690h
	ES:BX -> ???
Return: ES:BX -> ??? data (see #02722)
SeeAlso: AX=1611h,AX=1614h

Format of MS-DOS 7 kernel ??? data:
Offset	Size	Description	(Table 02722)
 00h	DWORD	-> ??? data (appears to list the installed drivers)
 04h	DWORD	-> ??? (value passed in via ES:BX is stored here)

Top
2F4601 - INT 2F CU - MS Windows WINOLDAP - SWITCHING ???
INT 2F CU - MS Windows WINOLDAP - SWITCHING ???
	AX = 4601h
Return: ???
Note:	the DOS 5+ kernel intercepts this function and copies the MCB
	   following the caller's PSP memory block into the DOS data segment;
	   in conjunction with AX=4602h, this intercept is used by DOS to
	   avoid corruption of the Windows real-mode heap's end sentinel
SeeAlso: AX=1700h,AX=4602h

Top
2F4602 - INT 2F CU - MS Windows WINOLDAP - SWITCHING ???
INT 2F CU - MS Windows WINOLDAP - SWITCHING ???
	AX = 4602h
Return: ???
Note:	the DOS 5+ kernel intercepts this function and copies the
	  previously-saved MCB from the DOS data segment into the MCB following
	  the caller's PSP memory block; in conjunction with AX=4601h, this
	  intercept is used by DOS to avoid corruption of the Windows real-mode
	  heap's end sentinel
SeeAlso: AX=1700h,AX=4601h

Top
2F4A00CX0000 - INT 2F CU - DOS 5+ - FLOPPY-DISK LOGICAL DRIVE CHANGE NOTIFICATION
INT 2F CU - DOS 5+ - FLOPPY-DISK LOGICAL DRIVE CHANGE NOTIFICATION
	AX = 4A00h
	CX = 0000h
	DH = new drive number
	DL = current drive number
Return: CX = FFFFh to skip "Insert diskette for drive X:" message
Note:	called by MS-DOS 5.0+ IO.SYS just before displaying the message
	  "Insert diskette for drive X:" on single-floppy systems

Top
2F4A01 - INT 2F - DOS 5+ - QUERY FREE HMA SPACE
INT 2F - DOS 5+ - QUERY FREE HMA SPACE
	AX = 4A01h
Return: BX = number of bytes available in HMA (0000h if DOS not using HMA)
	ES:DI -> start of available HMA area (FFFFh:FFFFh if not using HMA)
Notes:	called by Windows 3.1 DOSX.EXE
	supported by Novell DOS 7
SeeAlso: AX=4310h,AX=4A02h

Top
2F4A02 - INT 2F - DOS 5+ - ALLOCATE HMA SPACE
INT 2F - DOS 5+ - ALLOCATE HMA SPACE
	AX = 4A02h
	BX = number of bytes
Return: ES:DI -> start of allocated HMA block or FFFFh:FFFFh
	BX = number of bytes actually allocated (rounded up to next paragraph
	      for DOS 5.0 and 6.0)
Notes:	this call is not valid unless DOS is loaded in the HMA (DOS=HIGH)
	called by Windows 3.1 DOSX.EXE
	supported by Novell DOS 7
SeeAlso: AX=4A01h,AX=4A03h

Top
2F4A03 - INT 2F U - Windows95 - DOS KERNEL - (DE)ALLOCATE HMA MEMORY BLOCK
INT 2F U - Windows95 - DOS KERNEL - (DE)ALLOCATE HMA MEMORY BLOCK
	AX = 4A03h
	CX = segment of block's owner???
	DL = subfunction
	    00h allocate block
		BX = number of bytes
		Return: DI=FFFFh if unable to allocate
			ES:DI -> allocated block
	    01h resize block
		ES:DI -> previously-allocated block
		BX = new size in bytes (must be less than original size???)
		Return: DI=FFFFh if unable to allocate
			ES:DI -> reallocated block
		Note:	the contents of the original block are NOT copied
	    02h free block???
		ES:DI -> block to be freed
Note:	in MS-DOS 7.x, function 4A02h is implemented by calling this function
	  with DL=00h
SeeAlso: AX=4A02h

Top
2F4A04 - INT 2F U - Windows95 - DOS KERNEL - GET START OF HMA MEMORY CHAIN
INT 2F U - Windows95 - DOS KERNEL - GET START OF HMA MEMORY CHAIN
	AX = 4A04h
Return: AX = 0000h if function supported
	    ES:DI -> first HMA memory control block (see #02800)

Format of Windows95 HMA memory control block:
Offset	Size	Description	(Table 02800)
 00h  2 BYTEs	signature "MS" (4Dh 53h)
 02h	WORD	segment of owner (or segment at which to address block???)
		0000h = free
		0001h = DOS???
		FF33h = IO.SYS
		FFFFh = MSDOS.SYS
 04h	WORD	size of memory block (not including this header)
 06h	WORD	offset of next memory block in segment FFFFh, or 0000h if last
 08h  8 BYTEs	unused (explicitly set to 0 for MS-DOS 7.10)

Top
2F4A06 - INT 2F CU - DOS 5+ - DOS SUPERVISOR "REBOOT PANEL" - ADJUST MEMORY SIZE
INT 2F CU - DOS 5+ - DOS SUPERVISOR "REBOOT PANEL" - ADJUST MEMORY SIZE
	AX = 4A06h
	DX = segment following last byte of conventional memory
Return: DX = segment following last byte of memory available for use by DOS
Desc:	used to override the default memory size when booting diskless
	  workstations
Notes:	called by MS-DOS 5+ IO.SYS and DR DOS 6.0+ IBMBIO.OCM startup code if
	  the signature "RPL" is present three bytes beyond the INT 2F handler;
	  this call overrides the value returned by INT 12
	hooked by RPL code at the top of memory to protect itself from being
	  overwritten; DOS builds a memory block with owner = 0008h and name
	  "RPL" which must be freed by the RPL code when it is done.
	  Under DR DOS, it is sufficient to set the owner field of the MCB to
	  0000h.
	In addition to the test for "RPL", DR PalmDOS (since 1992/08/25),
	  DR DOS 6.0 "Business update March 1993", DR DOS "Panther" and
	  "StarTrek", and Novell DOS 7+ also check for a "RPLOADER" signature.
	  If this 2nd signature is found, IBMBIO.COM will store the INT 2Fh
	  vector for later use after the BIOS init, when at several points it
	  directly calls the RPLOADER via an emulated INT 2Fh with
	  AX=12FFh/BX=5/CX=0/DX=1 and a phase code 1, 2 or 3 on the stack.
	  This permits the RPLOADER to keep track of the initialization
	  process and clean or fix up anything it wishes.  The "phase 1"
	  broadcast is issued after the BIOS init code and data have been
	  relocated (e.g. into the HMA), "phase 2" gets issued immediately
	  before the CONFIG.SYS processing begins and the DOS code and data
	  are relocated, and the closing "phase 3" happens to permit any
	  final tidy ups before the memory manager gets acknowledgement of
	  completion.
SeeAlso: INT 12"BIOS",INT 18"BOOT HOOK",AX=4A07h,INT 2F/AX=12FFh/BX=0005h

Top
2F4A16 - INT 2F U - Windows95 - OPEN BOOT LOG
INT 2F U - Windows95 - OPEN BOOT LOG
	AX = 4A16h
Return: AX = status
	    0000h successful
	    FFFFh boot log file already open
	    else  DOS error code
	BX destroyed
SeeAlso: AX=4A17h,AX=4A18h

Top
2F4A17 - INT 2F U - Windows95 - WRITE TO BOOT LOG
INT 2F U - Windows95 - WRITE TO BOOT LOG
	AX = 4A17h
	CX = number of bytes to write
	DS:DX -> message to write (must include CR-LF if it is desired)
Return: AX = status
	    0000h successful
	    FFFFh boot log file not open
	    else  DOS error code
Note:	calls the code for INT 2F/AX=4A21h after writing to the file
SeeAlso: AX=4A17h,AX=4A18h,AX=4A21h

Top
2F4A18 - INT 2F U - Windows95 - CLOSE BOOT LOG
INT 2F U - Windows95 - CLOSE BOOT LOG
	AX = 4A18h
Return: AX = status
	    0000h successful
	    FFFFh boot log file not open
	    else  DOS error code from closing file
	BX destroyed
SeeAlso: AX=4A16h,AX=4A17h

Top
2F4A21 - INT 2F U - Windows95 - ???
INT 2F U - Windows95 - ???
	AX = 4A21h
Return: AX destroyed
Note:	calls INT 21/AX=4404h"IOCTL" with a five-byte buffer containing "MDF??"
SeeAlso: AX=4A17h

Top
2F4A31 - INT 2F U - Windows95 - ???
INT 2F U - Windows95 - ???
	AX = 4A31h
	CL = new value for ???
	DS:SI -> BYTE to be set to CL
Return: nothing

Top
2F4A32 - INT 2F U - Windows95 - PATCH ???
INT 2F U - Windows95 - PATCH ???
	AX = 4A32h
	BL = subfunction
	    00h get ???
		Return: AX = flag: subfunction 04h has been used (0000h/FFFFh)
			DX = ??? (0000h/?)
	    01h	patch ??? in IO.SYS (segment 0070h)
	    02h unpatch ??? in IO.SYS
	    03h ???
	    04h set ???, then do subfunction 01h
	    05h unset ???, then do subfunction 02h
	    else
		Return: nothing

Top
2F4A33 - INT 2F - Windows95 - CHECK MS-DOS VERSION 7
INT 2F - Windows95 - CHECK MS-DOS VERSION 7
	AX = 4A33h
Return: AX = 0000h for MS-DOS 7.00+
	    (officially) BX,DX,SI,DS may be destroyed
	    (undoc) DS:DX -> ASCIZ primary shell executable name
	    (undoc) DS:SI -> CONFIG.SYS SHELL= command line (counted string)
	    (undoc) BH = ??? (0000h)
	    (undoc) BL = ??? (0000h)
	AX nonzero (usually 4A33h) if MS-DOS 6- or other DOS
SeeAlso: AX=1611h,INT 21/AH=30h

Top
30 - INT 30 - (NOT A VECTOR!) - DOS 1+ - FAR JMP instruction for CP/M-style calls
INT 30 - (NOT A VECTOR!) - DOS 1+ - FAR JMP instruction for CP/M-style calls
   the CALL 5 entry point does a FAR jump to here
Note:	under DOS 2+, the instruction at PSP:0005 points two bytes too low in
	  memory
SeeAlso: INT 21/AH=26h

Top
31 - INT 31 - overwritten by CP/M jump instruction in INT 30
INT 31 - overwritten by CP/M jump instruction in INT 30

Top
Home Interrupt Index: by Category by ID TOC: by Order Top