UMBCCMSC 211 |
Func | Purpose | Input | Output | Description | Comments | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
00h | Program Termination | AH = 00h CS = segment address of PSP |
nothing | Terminates execution of the current process and returns control of the parent process. | COM programs store the segment address of the Program Segment Prefix (PSP) in the CS register automatically. For an EXE program, do not use this function, use Function 31H or 4Ch instead. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
01h | Keyboard Input | AH = 01h | AL = character read | Reads a character from a standard input device and displays it on the standard output device. When the function is called, it waits until a character is available. This can be redirected. | This function must be called twice to read extended ASCII codes on IBM and compatible PCs. The first call returns 0 in the AL register. If the character being read is the Ctrl-C character and input is not redirected, this function calls interrupt 23h. If standard input has been redirected, a Ctrl-C character is read and BREAK is ON, then this function calls interrupt 23h. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
02h | Display Output | AH = 02h DL = character to send to standard output |
nothing | Displays a character on the standard outhe standard output device. This can be redirected. | If standard output has not been redirected, then control codes such as backspace, carriage return and linefeed are preformed when this function sends characters to the screen. If output has been redirected, these codes are sent to the file as ordinary ASCII codes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
03h | Auxiliary Input | AH = 03h | AL = character read | Reads a character from the serial port. The default is the COM1. The MODE command can redirect serial access. | In most systems, the serial device has no internal buffer and is not interrupt driven. This means that it can send data faster than programs can read them. All unread characters may be lost. Before calling this function, you must initialize the serial port by performing the MODE command. When starting up, the serial port is initialized to 2400 baud, one stop bit, no parity, and 8 data bits The ROM BIOS functions of INT 14h are more efficient for accessing the serial port. This interrupt can be used to obrtain the status of the auxiliary device, which make them more flexible. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
04h | Auxiliary Output | AH = 04h DL = character to send | to send
nothing | Sends a character to the serial port. The default is the COM1. The MODE command can redirect serial access. | See comments for 03h. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
05h | Printer Output | AH = 05h DL = character to print |
nothing | Sends a character to the standard list device. By default, this is LPT1:. The MODE command allows you to redirect printer access. | The function transmits the character only when the output device is ready to accept it. The functions of the ROM BIOS IN 17h are more efficient for accessing the printer. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
06h | Direct Console Character I/O | AH = 06h DL = 00h - FEh sends a character DL = FFh - reads a character |
Character output: nothing Character input: no character ready: ZF = 1: No character ready Character received: ZF = 0 ; Character received AL = character read |
Reads a character from the standard input device and writes a character to the standard output device. This function is used to read and write all possible characters and control codes without examining them (e.gmining them (e.g., Ctrl-C has not effect on the program). Input and output for standard devices can be redirected. This funtion does not test whether the floppy disk or hard disk is full when it is writing. Neither can it tell whether all the characters have been read from the input device. | This function must be called twice to read extended ASCII codes on PCs. The first call returns 0 in the AL register (this indicates presence of an extended code). This function cannot display blanks (ASCII code 255) because it interprets that value as a command to input a character. If a character is receceived, it is oched to STDOUT. Ctrl-C or Crtl-Break are not checked. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
07h | Unfiltered Character Input Without Echo | AH = 07h | AL = Character | Reads a character from the standard input device without displaying it on the standard output device. If the character is not ready when the function is called it waits until a character is available. Input to a standard device can be redirected. The OS does not test the input character. | To read extended ASCII codes, the function must be called twice. The first call returns 0 in the AL register, indicating an extended code. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
08h | Character Input Without Echo | AH = 08h | AL = Character | Reads a character from the standard input device without displaying it on the standard output device. If the character is not ready, it waits until a character is available. | To read extended ASCII codes, the function must be called twice. The first call returns 0 in the AL register, indicating an extended code. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
09h | Display ASCIIZ String | AH = 09h DS:DX = segment:offset of the string |
nothing | Displays a character string to the standard output device. | The string must be terminated with the dollar sign character '$'. Control codes such as carriage return, linefeed, and backspace caackspace can be embedded within the string. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0Ah | Buffered Keyboard Input | AH = 0Ah DS:DX = segment:offset of the buffer |
nothing | Reads a string of bytes from the standard input device and sends the characters to a buffer. This function echoes characters to the standard output device. The input ends when it receives a carriage return code. | Uses the buffer in the following format:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0Bh | Check Input Status | AH = 0Bh | AL = 00h if no character is available AL = FFh one or more characters available |
Determines whether standard input device has a character available a character available for reading | If this function detects Ctrl-C and Ctrl-Break it calls INT 23h | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0Ch | Flush Input Buffer and Read Standard Input | AH = 0Ch AL = function to be called after clearing buffer DS:DX = segment:offset of input buffer (if AL = 0Ah) |
AL = input character (if called with AL = 01h, 06h, 07h, 08h) | Clears the type-ahead input buffer and then performs one of the character input functions 01h, 06h, 07h, 08h, or 0Ah. | If AL is not 01h, 06h, 07h, 08h, or 0Ah, this function flushes the buffer and passes control to the calling function. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0Dh | Disk Reset | AH = 0Dh | nothing | Writes all data stored in the internal DOS buffers to the disk. | This function prevents access to new data, as it does not update the directory for all open files. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0Eh | Select Default Disk Drive | AH = 0Eh DL = Drive number (00h = A, 01h = B ,etc) |
AL = number of logical drives | Defines the current or denes the current or default disk and returns the number of available drives. | With DOS 3.0 and later, this function returns the number 5 or the drive code corresponding to the LASTDRIVE value in AL. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0Fh | Open File (FCB) | AH = 0Fh DS:DX = Pointer to unopened FCB |
AL contains: 00h = File opened successfully FFh = File not opened |
Used to open existing disk files using an FCB. This function will not create a file (See Int 21/16). Function is called after filling in a drive, file name, and extension fields of FBC. Drive designations are 0 (default drive), 1 (A:), 2 (B:), etc. Function sets FCB block field to zero; record size to 80h; and file size, date, and time from requested file's directory entry. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10h | Close File (FCB) | AH = 10h DS:DX = Pointer to opened FCB |
AL contains: 00H = File closed successfully FFh = File not closed |
DO NOT USE. Use 21H/3EH instead. | Used toign=top>Used to close a previously opened disk file that uses an FCB. This function is essential with FCB files because it forces DOS to update file's directory entry. To use function, provide the information in file-name, extension, and drive-designator fields. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11h | Search for First Entry (FCB) | AH = 11H DS:DX = Pointer to unopened FCB |
AL = 0 if match was found FFH if no match was found |
DO NOT USE. Use 21H/4EH instead. | Used to search for first occurrence of specified directory entry. To use this function, provide the filename, extension, and drive designators in the appropriate FCB fields. Use an extended FCB to search for a file with a specific attribute. Valid attributes are derived from the attribute bit settings and include the following:
Upon successful completion, the DTA holds an unopened FCB for the file that was found. If search is called with an extended FCB, DTA has entended FCB. If you are using wild-card characters to search for files, and no error was returned from this function, you can continue searching by using INT 21H/12H. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12h | Search for Next Entry (FCB) | AH = 12H DS:DX Pointer to FCB return by INT 21H/11H |
AL = 00H, if match found = FFh, if no match found |
DO NOT USE. Use 21H/4FH instead. | Continues a directory search begun by INT 21H/11H. Can be called as many times as necessary to locate a given file within a directory, but will search only for next matching entry, not first entry. FCB pointed to by DS:DX should be the same one used in previous search. When successfully completed, the DTA holds an unopened FCB for the file found. If search was initiated with extended FDB, DTA will have extended FCB. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13h | Delete File (FCB) | AH = 13H DS:DX = Pointer to unopened FCB |
AL = 00h, if file deleted = FFH if file not deleted |
DO NOT USE. Use 21H/41H instead. | Used to delete normal files using an FCB. Read-only files, system files, hidden files, volume labels, or directories cannot be deleted with this function. To use, provide the file name, extension, and drive designators in the appropriate FCB fields. Do not try to delete an open file. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
14h | Read Sequential File (FCB) | AH = 14H DS:DX = Pointer to opened FCB">FCB |
AL =
|
DO NOT USE. Use 21H/3DH instead. | Facilitates sequential reading of information from a disk file using an FCB. You can read information only from a previously opened file (INT 21H/0FH). To use, point DS:DX to an FCB created after file was opened. Reads are controlled by the arameters set in the FCB. Length of read is given in record-size field. Location is given by current block and record numbers. When completed, information read from the disk is placed in the DTA, and record address in the FCB is automatically incremented. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15h | Write Sequential File |
|
AL =
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33h/00h or 01h | Get or Set Break Flag | AH = 33h AL = 00h if getting break flag = 01 if setting break flag DL = 00h if turn break flag OFF = 01 if truning break flag ON |
DL = current state 00h - break flag is OFF 01h - break flag is ON |
Reads and chages the state of the Ctrl-Break check flag. | When the system break flag is on, this function determines whether DOS should check the keyboard to see if the Ctrl-C or Ctrl-Break keys have been pressed. When this flag is off, it checks for traditional character input/output. Since the Ctrl-Break flag is not part of the environment block of the current program, it affects all programs which use DOS functions fo character input/output and which check Ctrl-C and Ctrl-Break. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33h/02h | Get and Set Extended Control-Break Checking State | AH = 33h AL = 02h DL = 00 if checking OFF 01 if checking is ON |
DL = old state of extended break checking | Obtains an changes the state of the Control-Break flag. | This function is full re-entrant. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33h/05h | /05hDetermine Boot Drive Number | AH = 33h AL = 05h |
DL = boot drive (1=A, 2+=B, etc) | Reads the system boot drive | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33h/06h | Get Actual Version Number | AH = 33h AL = 06h |
BL = major version BH = minor version DL = revision DH = version flag bit 3=1 DOS is in ROM bit 4 = DOS is in HMA |
Reads the actual version of MS-DOS. | This function returns the actual version of MS-DOS even if the DOS command SETVER has changed the version. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
34h | Get Address of InDOS Flag | AH = 34h | ES:BX = segment:offset of InDOS flag | Reads the address of Critical Section (InDOS) flag. This indicates that INT 21h Function is working. | The value of the InDOS flag is incremented when an INT 21h fucntion begins to work and decremented when it is completed. During INT 28h, call the falue in InDOS flag may be 01h instead of zero. Burt in this case the functions from 01h to 0Ch INT 21 only may be calledl There may, however be occasions when DOS is busy but the InDOS flag is zero. This is possible because during its operation, the critical error handler decrements InDOS and increments the critical error flag. The Critical error flag is the byte before the InDOS flag in DOS 3+. This function may be called once at the beginning of a program only. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
35h | Get Interrupt Vector | AH = 35h AL = interrupt number |
ES:BX = segment:offset of interrupt handler | Gets the address of the interrupt service routine for a specific interrupt vector. | This function must be used to ensure compatability with future versions of DOS. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
36h | Get Disk Free Space | AH = 36H | AX = lign=top>AX = sectors per cluster, or 0FFFFH if the drive number is invalid BX = number of available clusters CX = bytes per sector DX = clusters per drive |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
37h | RESERVED | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
38h | Get Country Specific Information | AH = 38h AL = 1-0FE for specific country with code < 255 0FFh for specific code >= 255 BX = country code, if AL=0FFh DX = 0FFFFH |
CF = 0 function is successful BX = country code DS:DX = segment:offset of buffer filled with info as follows:
CF = 1 if unsuccessful AX = error code |
Obtains country specific information or sets the current country parameters | The case map address in 12-15h is the segment:offset address of the FAR procedure which is used for performing country specific conversions of character codes from 80h through 0FFh. This procedure must be called with the character to be converted to a capital letter in the AL register. If a capital letter already exists for the character in the AL register, it is returned in AL after the function call, otherwise the contents of AL remain unchanged. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
39h | Create Directory | AH = 39h DS:DX = segment:offset of ASCIIZ pathname |
CF = 0 if successful CF = 1 if unsuccessful AX = error code = 03h Path not found = 05h Access denied |
Creates a new subdirectory in a specified drive. | An error will occur if: Any element of the pathname does not exist. A subdt exist. A subdirectory with the same name already exists A subdirectory is to be created in a root directory which is already full. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3Ah | Delete Directory | AH = 3Ah segment:offset of ASCIIZ pathname |
CF = 0 if successful CF = 1 if unsuccessful AX = error code = 03h if path not found = 05 if Access denied = 10h if attempt to remove current directory |
Deletes a subdirectory on a specified drive. | An error will occur if: Any element of the pathname does not exist. The specified directory is the current directory. The specified directory contains no files. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3Bh | Set Current Directory | AH = 3Bh DS:DX = segment:offset of ASCIIZ pathname |
CF = 0 if successful CF = 1 if unsuccessful AX = error code = 03 if path not found |
Changes current or default directory for a specified path and drive. | An error will occur if any element of pathname does not exist. If the new pathname includes a drive letter, the default drive will not be changed. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3Ch | Create File | ileAH = 3Ch CS = file attribute bit 0: read-only file bit 1: hidden file bit 2: system file bit 3: volume label (ignored) bit 4: reserved bit 5: archive bit bit 6: reserved DS:CS = segment:offset of ASCIIZ pathname |
CF = 0 if successful AX = handle CF = 1 if unsuccessful = 03 Path not found = 04 No available handle Access denied |
Creates a new empty file on a specified drive with a specified with a specified pathname. | Wildcards are not permitted in the filename. An error will occur if any element of pathname does not exist; the file is to be created in a root directory which is full; or a file with the same name and read-only attribute exists in the current directory. If a file with the same name exists, it is truncated to zero length. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3Dh | Open File | AH = 3Dh AL = access mode bits 0-2: access mode: 000 = read only 010 = write only 010 = read/write bit 3: reserved (0) bits 4-6: Sharing mode: = 000 compatibility mode = 001 deny all (only current program can access file) = 010 deny write (other program can only read from file) = 011 deny read (other programs can only write into file) = 100 deny none (other programs can read and write the file) DS:DX = segment of ASCIIZ pathname |
CF = 0 if successful AX = handle CF = 1 if unsuccessful AX = error code = 01h missing file sharing software = 02h file not found = 03h path not found or file does not exist = 04h no handle available =05 access denied = 0Ch access mode not permitted |
Opens an existing file for reading, writing or appending on the specified drive and specified pathname. | Wildcards are not permitted in the filename. If the drive or path are omitted in the filename, DOS accesses the current drive or directory. An error will occur if any element of pathname does not exist, or if the file has the read-only attribute set and is opened in the read/write access mode. The file pointer is set to the first byte of file. File handlers which are inherited from a parent process also inherit all sharing and access restrictions. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3Eh | Close File | AH = 3Eh BX = handle |
CF = 0 if successful AX is destroyed CF = 1 if unsuccessful AX = error code = 06 File not opened or unauthorized handle |
Writes all information in internal DOS buffers associated with the file to disk and updates directory information, then closes the file. | Do not call this function with a zero handle (standard input) and you won't be able to enter characters from the keyboard. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3Fh | Read File or Device | AH = 3Fh BX = handle CX = number of bytes to be read DS:DX = segment:offset of buffer |
CF = 0 if successful AX = number of bytes read CF = 1 if unsuccessful AX = error code = 05h access denied 06 illegal handle or file not opened |
Reads a given number of bytes at the current file pointer position, from a previously opened file, with a given valid handle or device, to a buffer. | If the CF is clear after the function call and AX = 0, it means that the file pointer was already at the end of the file and the file cannot be read. If the CF is clear after the function call and the value in Athe value in AX is small than the value in CX, it means that only part of a record was read, either because the end of file was reached or an error occurred. If the call is successful, the file pointer position is updated after the function call. If this function is used to read from a file with handle 0 (standard input device -- keyboard ), it stops reading after the first CR, or once a specified number of characters have been read. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
40h | Write File or Device | AH = 40h BX = handle CX = number of bytes to write DS:DX = segment:offset of buffer |
CF = 0 if successful number of bytes written CF = 1 if unsuccessful AX = Error Code = 05 Access denied = 06 Illegal handle of a file which is not opened |
Writes a given number of bytes at the current file pointer position, to a previously opened file, with a given valide handle or device | This function writes to a file with a valid handle or to a stardand output device. If CF = 0 and AX< CX, only a partial record was written, either because EOF was reached, or there was a DOS error (disk full). If CF = 0 and CX = 0 it means that no data is written and the file is truncated or extended to the current position of the file. If successful, the file pointer is updated after the function.nction. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
41h | Delete File | AH = 41h DS:DX = segment:offset of ASCIIZ pathname |
CF = 0 if successful CF = 1 if unsuccessful AX = Error Code = 02h file not found = 03h path not found or file does not exist = 05h access denied |
Erases a specified file | This function cannot delete subdirectories or volume names. This function does not erase data in a file. It only replaces the first symbol in the filename in the directory with the hex code 0E5h and marks the FAT Chain for this file as "free". Wildcards are not permitted in file specification. An error occurs if an element in the pathname does not exist, or the file has the Read-Only Attribute set. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
42h | Set File Pointer | AH = 42h AL = offset code = 00h absolute offset from start of file = 01 signed offset from current file pointer = 02h signed offset from end of file. BX = handle CS = most significant part of offset least significant part of offset |
CF = 0 if successful DX = high word of file pointer AX = low word of file pointer CF = 1 if unsuccessful AX = error code = 01h illegal offset code = 06 illegal handlllegal handle or file not open |
Moves the file location pointer to a specified position in the file. | This function always return the result absolute byte offset from the start of the file in DX:AX. For offset codes 01h and 02h, the file pointer may be position before the start of the file. The file pointer can also be set after the end of th file. No error will be returned at this point, but a subsequent attempt to read or write will create errors. YOu can get the size of the file using the offfset code 06 and offset of 0. After callint, examine the file pointer location. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
43h/01-02h | Get or Set File Attributes | AH = 43h AL = 00h to get attributes = 001 to set attributes CS = file attributes (if AL = 01h) = bit 0: read-only = bit 1: hidden = bit2: system = bit 3: volume label = bit 4: directory = bit 5: archive bits 6-15: reserved DS:DX = segment:offset of ASCIIZ pathname |
CF = 0 if successful CX = file attribute = bit 0: read-only = bit 1: hidden = bit2: system = bit 3: volume label = bit 4: directory = bit 5: archive bits 6-15: reserved CF = 0 if unsuccessful AX = error code = 01h unknown function code = 02 file not found = 03h path not found attribute cannot be changed. | Determines or sets file attributes for a specified file. | Wildcards are not permitted in the pathname. This function can not change the volume label or directory attributes. An error occurs if an element in the pathname does not exists. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
44h/00h | Get Device Information | AH = 44h AL = 00h BX = handle |
CF = 0 if successful DX = device information word character device if bit 7 is set:
AX = error code
|
Gets information about a specified file or device | DH corresponds to the high byte of the attribute word of the handle for the character device. in the binary ("raw") mode MSDOS treats all characters as data. In the ASCII ("cooked" mode, MSDOS checks the character stream and performs the relevant function, if a special character Ctrl-C, Ctrl-S, Ctrl-P, Ctrl-Z or CR is detected. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
44h/01h |
Set Device Information |
AH = 44h |
AL = 01h BX = handle
CF = 0 if successful |
CF = 1 if unsuccessful
Sets specific characteristics of the character device. |
This function is useful for switching between ASCII (cooked) and binary (raw) modes, when the handle is associated with a character device. | ated with a character device.
44h/02h |
IOCTL: Read Control Data from Character Device Driver DOS |
AH = 44h |
AL = 02 BX = handle CX = number of bytes to be read DS:DX = segment:offset of buffer CF = 0 if successful |
AX = number of bytes read CF = 1 AX = error code
Reads data specific to each character device driver from a character device |
The character device driver defines the structure and type of control data. |
This function can be used for reading hardware dependent information and status information of the character device, if this device supports this function. This information cannot usually be obtaned by other DOS functions. 44h/03h |
IOCTL: Write Control Data from Character Device Driver DOS |
AH = 44h |
Al = 03h BX = handle CX = number of bytes to be written DS:DX = segment:offset of data CF = 0 if successful |
AXf successful AX = number of bytes sent CF = 1 if unsuccessful AX = error code
Writes control data specific to each character device from an application directly to a specified character device. |
If this function is support by a character device driver, it can be used to perform certain hardware dependent operations. These operations are not usually supported by other MSDOS function calls. |
44h/04h |
IOCTL: Read Control Data from Block Device Driver DOS |
AH = 44h |
AL = 04h BL = drive code (0 = default, 1=A, etc.) CX = number of bytes to be read DS:DX = setment:offset of buffer CF = 0 if successful |
AX = number of bytes read CF = 1 if unsuccessful AX = error code
Reads control data directly from the block device into the buffer. |
This function can be used if the block device driver supports the IOCTL call |
44h/05h |
IOCTL: Write Control Data from Block Device Driver DOS |
AH = 44h |
AL =05h device code CX = number of bytes to be written DS:DX = segment:offset of data CF = 0 if successful |
AX = number of bytes sent CF = 1 if unsuccessful AX = error code =01h unknown function code = 05h attribute cannot be changed = 06h handle not open or does not exist = 0Dh invalid data Write data specific to each character device control from an application program directly to a block device. The format and structure are specific to each device. |
If this function is supported by a character device driver, it can be used to perform certain hardware dependent operations. These operations are usually not supported by other MSDOS function calls. |
44h/06h |
IOCTL: Check Input Status |
AH = 44h |
AL = 06h BX = handle CF = 0 if successful |
AX = 00h device not ready ice not ready or EOF on file CF = 1 if unsuccessful AX = error code = 01h unknown function code = 05h attribute cannot be changed = 06h = handle not opened or does not exist = 0Dh invalid data Reads the status of the specified device to determine whether the device can read data. |
This function can be used to check the status of certain character devices that do not have their own MSDOS functions for status checking (for example, serial port). |
44h/07h |
IOCTL: Check Output Status |
AH = 44h |
AL = 07h BX = handle CF = 0 if successful |
AL = 00h device not ready = 01 device is ready CF = 1 if unsuccessful AX = error code = 01 unknown function code = 05h attribute cannot be changed = 06h handle not op not opened or does not exist = 0Dh invalid data Reads the status of a specified device that determines whether this device can write data. |
This function always returns the ready status indicating that all files are ready for output, even if the disk is full or there is no disk in the drive. |
44h/08h |
IOCTL: Check if Block Device is Removable |
AH = 44h |
AL = 08h BL = device number (0=default, 1=A, etc.) CF = 0 if successful |
AL = 00h if media is removable = 01 if media is not removable CF = 1 if unsuccessful AX = error code = 01h unknown function code = 0F invalid drive Determines where the block device media (disk, hard disk, etc.) of the specified block device can be changed. |
|
44h/09h |
IOCTL: Check if Block Device is Remote |
AH = 44h |
AL = 09h BX = drive number (0=default, 1=A, etc.) CF = 0 if successful |
DX = device attribute word bit 15=1 drive is SUBSTituted bit 12=0 drive is local bit 12=1 drive is remote CF = 1 if unsuccessful AX = error code = 01h unknown function cown function code = 0Fh invalid drive Determines whether the specified block device is local (part of the PC that is used as a workstation) or remote (part of a network server). |
This subfunction can be used if network software has beeen installed previously. |
44h/0Ah |
IOCTL: Check if Handle is Remote |
AH = 44h |
AL = 0Ah BX = handle CF = 0 if successful |
DX = attribute word for file or device bit 15 = 0 if local = 1 if remote CF = 1 if unsuccessful AX = error code = 01h unknown function code 06h handle not opened or does not exist Determines whether the specif handle refers to a file on a remote or local device. |
This subfunction can be used if network sofware has been install previously. |
44h/0Bh |
IOCTL: Change Sharing Retry Count |
AH = 44h |
AL = 0Bh CS = pause between attemps (default = 1) DX = number of attempts (default = 3) CF = 0 if successful |
CF = 1 if unsuccessful AX = error code = 01 unknown error code Sets the number of attempts which MSDOS will perform afterl perform after the SHARE utility fails to open or lock a file. |
This subfunction can be used if network software has been installed previously. |
The value in the CX register defines the delay which perfrom by executing empty cycles: xor cx,cx loop $; repeat this command 65536 times Consequently, the value of the delay depends of the processor speed. 44h/0Ch |
IOCTL: Generic I/O Control for Character Device |
AH = 44h |
AL = 0Ch CH =
CL =
DS:DX = segment:offset of parameter block CF = 0 if successful |
DS:DX = segment:offset of parameter block if CL = 65h, 6ah, 6bh, or 7f CF = 1 if unsuccessful AX = error code Various calls for a character from an application |
The parameter block for CL = 45h has the following format: |
44h/0Dh |
IOCTL: Generic I/O Control for Block Device |
AH = 44h |
AL = 0Dh BX = drive number (00h=default, 01h=A, etc) CH =
CL =
CF = 0 if successful |
DS:DX = segment:offset of parameter block if CL=60h or 61h CF = 1 iff CL=60h or 61h CF = 1 if unsuccessful = error code Transfers miscellaneous requests from application programs to block device drivers |
The parameter block for functions 40h and 60 has the following format: |
44h/0Eh |
IOCTL: Get Logical Drive Map |
AH = 44h |
AL = 0Eh BL = drive number (00h=default, 01h=A, etc) CF = 0 if successful |
AL = 00h block device has only one logical drive assigned, = 1 - 26: letter corresponding to the last logical device on the drive (1 = A, etc) CF = 1 if unsuccessful AX =
Reads the l | Reads the last logical drive used to reference a specific block device |
|
44h/0Fh |
IOCTL: Set Logical Drive Map |
AH = 44h |
CF = 0 if successful |
AL =
CF = 1 if unsuccessful AX =
Assigns the drive letter t drive letter to a specified block device |
This function treats a single physicall drove as both A: and B:. |
44h/10h |
Query Generic IOCTL Capability (Handle) |
AH = 44h |
AL = 10h BX = handle for device CH =
CL =
CF = 0 |
AX = 0000h specified IOCTL function is supported CF = 1 if unsuccessful AL = IOCTL capability not available Tests whether a character device will support a miscellaneous IOCTL request to character device driver. |
Character device must support a Generic IOCTL Check call. |
44h/11h |
Query Generic IOCTL Capability (Drive) |
AH = 44h |
AL =n=top>AH = 44h AL = 11h BL = driver number (0=default, 1=A, etc) CH =
CL = function code CF = 0 if successful |
AX = 0000h specified IOCTL function is supported CF = 1 function is unsucessful CL = IOCTL capability not available Tests whether a block device supports a miscellaneous IOCTL request. |
A block device driver must support a Generic IOCTL Check call. |
This function may be used if you wish to use a Generic IOCTL call beyond the set of called defined for DOS 3.2 45h |
Duplicate Handle |
AH = 45h |
BX = file handle CF = 0 if successful |
AX = new handle CF = 1 if unsuccessful AX =
Creates a new file handle that refers to the same currently operating device or file as an exist file handle |
This function is used to force DOS to clear the file buffers by closing the duplicate handle. Itcate handle. It is faster than closing and reopening a disk file. A better way of doing this is using Function 68h. |
This function can also be used for updating the directory entry of a file that has changed in length without closing and reopening a file. 46h |
Force Duplicate File Handle |
AH = 46h |
BX = first file handle CX = second file handle CF = 0 if successful |
CF = 1 if unsuccessful AX =
Forces a second handle to become a duplicate of the first handle. |
This function closes the first file handle if it is still open. |
This function associates an existing open file with a different file, or device. It is particularly useful for redirecting standard input or output to a different file or device by software (i.e., without using piping or redirection on the command line). 47h |
Get Current Directory |
AH = 47h |
DL = drive number (0=default, 1=A, etc) offset:segment of a 64 bytent of a 64 byte long buffer with ASCIIZ pathname CF = 0 if successful |
CF = 1 if unsuccessful AX =
Gets current working of a specified device. |
This function returns the path description without the drive letter and the initial backslash. |
48h |
Allocate Memory |
AH = 48h |
BX = number of paragraphs to be requested CF = 0 if function successful |
AX = pointer to allocated block CF = 1 if unsuccessful AX =
BX = size of largest available memory block in paragraphs Allocates memory to the current program |
This function always fails when it is executed within COM-format programs. This is because they initially occupy the largest avaiable block of memory. Therefore you must free some memory before using this function. |
49h |
<9h
Release Memory |
AH = 49h |
ES = segment of block to be freed CF = 0 if function successful |
CF = 1 if unsuccessful AX =
Releases memory blocks previously obtained using function 48h |
|
4Ah |
Modify Allocated Memory Block |
AH = 4Ah |
BX = new memory size in paragraphs ES = segment of block address CF = 0 if function successful |
CF = 1 if unsuccessful AX =
Changes the size of a memory block previously allocated by function 48h. |
|
4Bh/00-03h |
4Bh/00-03h
Load and/or Execute |
AH = 4Bh |
AL =
DS:DX = ASCIIZ string of pathname ES:BX = segment:offset of parameter block CF = 0 if successful |
BX = destroyed DX = destroyed CF = 1 if unsuccessful AX =
Loads and executes (optionally) another program |
This function loads a sub-program, creates PSP and runs the sub-program. The parameter block for AL=00h, 01h has the following format: |
The parameter block for AL=03h has the following format:
If the segment address of the environment block is 0, then a child process has the same environment block as the parent procesblock as the parent process. The environment strings must be paragraph aligned and consist of a sequence of ASCIIZ strings. The strongs must be followed by the byte 00h. The command tail parameter string contains a count byte which represents the number of characters in the command string. This is followed by ASCII characters. The string ends with a carriage return (which is not included in count). The first character of the string should be a blank. Before using this function, you must ensure that there is enough unallocated memory availabe for the child process. If necessary, you must release all memory to load the child process. When this function loads and runs a sub-program, all open files of the parent process are available to the child process; therefore, if the parent process redirects standard input or output, it also affects the child process. 4Bh/05h |
Set Execution State |
AH = 4Bh |
AL = 05h DS:DX = segment offset of execution state CF = 0 if successful |
AX = 00h CF = 1 if unsuccessful AX = error code Prepares new programs for execution |
This function may be used by programs which want to bypass the normal EXEC function. All DOS, BIOS and other software interrupts cannot be used after returning from this function and be and before the start of the child process. |
4Ch |
Terminate with Output Code |
AH = 4Ch |
AL = return code Nothing |
Ends the current process and passes an exit code to the parent process |
This function is the proper method for terminating programs in DOS. It releases all the memory belonging to the parent process, flushes all the file buffers and closes all open file handles of the parent process. It also restores the contents of the interrupt vecotrs for the terminate handler (INT 22h), the Ctrol-C handler (INT 23h) and the critical error handler (INT 24h). AFter this, control is passed to the parent process. All files that have been opened using FCBs must be closed before executing this function. All network files locks should be removed before this function is performed. Batch files can test the exit code with an ErrorLevel and IF statement. The exit code zero indicates that the function was successful. code with an Error |
4Dh |
Get Output Code |
AH = 4Dh |
AH = |
AL = return code Reads the exit cod and termination type of the child process after execution of the EXEC call. |
This function can only retrieve the return code once, because the word where DOS stores this coded is cleared once the function has read it. |
4Eh |
Find First Matching File |
AH = 4Eh |
DS:DX = segment:offset of ASCIIZ pathname CF /td>
| CF = 0 if successful |
[DTA] Disk Transfer Area = FindFirst data block The DTA has the following format:
1Ah |
4 |
file size |
1Eh |
13 |
ASCIIZ filename and extension |
|
value | error code |
---|---|
02h | file not found |
08h | path not found |
12h | no file with same attribute is found |
value | error code |
---|---|
12h | no file with same attribute is found |
Offset | Size | Description |
---|---|---|
00h | 2 | number of bytes per sector |
02h | 1 | number of sectors per cluster |
03h | 2 | number of reserved sectors at start of disk |
05h | 1 | number of FATs |
06h | 2 | number of entries in root directory |
08h | 2 | total number of sectors |
0Ah | 1 | media ID byte |
0Bh | 2 | number of sectors per FAT |
0Dh | 2 | number of sectors per track |
0Fh | 2 | number of heads |
11h | 4 | number of hidden sectors |
15h | 4 | total number of sectors if word at 08h contains 0 |
19h | 6 | unknown |
1Fh | 2 | number of cylinders |
21h | 1 | device type |
22h | 2 | device attribute (removable or not, etc) |
bits | description |
---|---|
0-4 | seconds/2 (0-29) |
5-10 | minutes (0-59) |
11-15 | hours (0-23) |
bits | description |
---|---|
0-4 | day (1-31) |
5-8 | month (1-12) |
9-15 | year - 1980 |
value | error code |
---|---|
01h | invalid function |
06h | invalid |
bits | description |
---|---|
0-4 | seconds/2 (0-29) |
5-10 | minutes (0-59) |
11-15 | hours (0-23) |
bits | description |
---|---|
0-4 | day (1-31) |
5-8 | month (1-12) |
9-15 | year - 1980 |
value | error code |
---|---|
01h | invalid function |
06h | invalid |
value | strategy |
---|---|
00h | first fit |
01h | best fit |
02h | last fit |
value | error code |
---|---|
01h | function number is invalid |
value | strategy |
---|---|
00h | first fit |
01h | best fit |
02h | last fit |
value | error code |
---|---|
01h | function number is invalid |
value | Description |
---|---|
00h | UMB is not part of DOS memory chain |
01h | UMB is in DOS memory chain |
value | Description |
---|---|
00h | remove UMBs from DOS memory chain |
01h | add UMBs to memory chain |
value | extended error code | |
---|---|---|
01h | function number invalid | |
02h | file not found | |
03h | path not found | |
04h | too many open files | |
05h | access denied | |
06h | handle invalid | |
07h | memory control block destroyed | |
08h | insufficient memory | |
09h | invalid memory address | |
0Ah | environment invalid | |
0Bh | format invalid | |
0Ch | access code invalid | |
0Dh | data invalid | |
0Eh | unknown unit | <unknown unit |
0Fh | disk drive invalid | |
10h | current directory cannot be removed | |
11h | different device | |
12h | no more files | |
13h | disk write-protected | |
14h | unknown unit | |
15h | drive not ready | |
16h | unknown command | |
17h | data error (CRC) | |
18h | bad request structure length | |
19h | seek error | |
1Ah | unknown media type | |
1Bh | sector not found | |
1Ch | printer out of paper | |
1Dh | write fault | |
1Eh | read fault | |
1Fh | general failure | |
20h | sharing violation | |
21h | lock violation | |
22h | disk change invalid | disk change invalid |
50h | file already exists | |
52h | cannot make directory | |
53h | fail on INT 24h (critical error) | |
54h | too many redirections | |
55h | duplicate redirection | |
56h | invalid password | |
57h | invalid parameter | |
5Ah | required system component not installed |
value | error class |
---|---|
01h | out of resource (storage or handles) |
02h | temporary problems than can be expected to end |
03h | authorization problem |
04h | internal error in system software |
05h | hardware problems |
06h | system software failure (bad ro missing CONFIG.SYS) |
07h | application error |
08h | file or other item not found |
09 | |
09h | file or other item of invalid type or format |
0Ah | file or other item locked |
0Bh | media problem (wrong disk in drive, etc.) |
0Ch | item already exists |
0Dh | unknown error |
value | suggested action |
---|---|
01h | retry a few times |
02h | pause, then retry |
03h | ask user to resupply input |
04h | abort application with cleanup |
05h | immediate abort without cleanup |
06h | ignore error |
07h | retry after user intervention |
value | source of error |
---|---|
01h | unknown |
02h | block device (disk) |
03h | network |
04h | serial device |
05h | memory |
value | error code |
---|---|
03h | path not found |
04h | too many open files |
05h | access denied |
value | file attribute (bits may be combined |
---|---|
0 | read-only |
1 | hidden |
2 | system |
3 | volume label |
4 | reserved (0) |
5 | archive |
6-15 | reserved (0) |
value | error code |
---|---|
03h | path not found | d>path not found
04h | too many open files |
50h | file exists. |
When a file is created, it usually has a normal read/write attribute (0).
value | description |
---|---|
00h | lock region of a file |
01h | unlock region of a file |
value | error code |
---|---|
01h | invalid function code |
06h | invalid handle |
21h | ign="top">21hall or part of region already locked |
value | description |
---|---|
00h | name not defined |
<>00h | name is defined |
value | error code |
---|---|
01h | invalid function code |
CF = 1 function is unsuccessful
AX = error code
= 01 invalid function code
value | error code |
---|---|
01h | invalid function code |
value | error code |
---|---|
01h | invalid function code |
value | description |
---|---|
03h | printer |
04h | disk driver |
value | description |
---|---|
00h | off |
01h | on |
value | description |
---|---|
03h | printer |
04h | disk driver |
value | description |
---|---|
00h | off |
01h | on |
value | device status flag |
---|---|
00h | valid |
01h | invalid |
value | device type |
---|---|
03h | printer |
04h | disk drive |
value | error code | |
---|---|---|
01h | invalid function code | |
12h | no more files | no more files available |
value | device type |
---|---|
03h | printer |
04h | disk drive |
value | error code |
---|---|
01h | invalid function code |
03h | path not found |
05h | access denied |
08h | insufficient memory |
0Fh | invalid drive |
12h | no more files available |
value | error code |
---|---|
01h | invalid function code |
03h | path not found |
05h | access denied |
08h | insufficient memory |
0Fh | invalid drive |
12h | no more files available |
value | subfunction |
---|---|
01h | get general international information |
02h | get pointer to uppercase table |
04h | get pointer to filename uppercase table |
05h | get pointer to filename terminator table |
06h | get pointer to collating table |
07h | get pointer to Double-byte Character Set (DBCS) Vector |
value | subfunctioin |
---|---|
20h | Capitalize character DL = character to capitalize |
21h | Capitialize string DS:DX = segment:offset of the string to capitalize CX = length of the string |
22h | Capitalize ASCIIZ string DS:DX = segment;offset of ASCIIZ string to capitalize |
value | type |
---|---|
00h | no |
01h | yes |
02h | neither yes or no |
value | subfunction |
---|---|
01h | Get code page |
02h | select code page |
If the number of requested files in the BX register is greater than the available number of entries controlled by the FILES entry in CONFIG.SYS file, no error occurs.
However an attempt to open a file or device will fail if all file entries are in use, even if not all the file handles have been used by the program.
value | subfunction |
---|---|
00h | Get serial number |
01h | Set serial number |
value | description |
---|---|
00h | buffer is filled with value from extended DPB |
01h | extended DPB on disk set to values from buffer |
value | error code |
---|---|
01h | function number invalid (network driver) |
05h | access denied (no extended DPB on disk) |
Offset | Size | Description |
---|---|---|
00h | 2 | info level (zero) |
02h | 4 | disk serial number (binary) |
06h | 11 | volume label (or "NO NAME") |
11h | 8 | "FAT12 " or "FAT16 " |
bit | access type | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0-2 |
|
|||||||||||||
3 | reserved | |||||||||||||
4-6 |
|
|||||||||||||
7 | inheritance |
bit | flags | ||||||
---|---|---|---|---|---|---|---|
0-4 | reserved | ||||||
5 |
|
||||||
6 |
|
||||||
7 | reserved |
bit | create attribute (bits may be combined) |
---|---|
0 | read-only |
1 | hidden |
2 | system |
3 | volume label |
4 | reserved |
5 | archive |
6-15 | reserved |
bit | open flag | ||||||||
---|---|---|---|---|---|---|---|---|---|
0-3 |
|
||||||||
4-7 |
|
value | Description |
---|---|
1 | file opened |
2 | file created |
3 | file replaced |
This page is based on material from:
It should be noted that not all of this references provide material on the latest versions of DOS, and, as a result, do not always agree.