(1) functions: 01 H, 07h, and 08 h
Function Description: reads a character from a standard input device (for example, a keyboard. The interrupt will remain in the waiting state during the processing until the characters are readable. This input can also be redirected. If so, you cannot determine whether the file has reached the end of the file.
Entry parameter: Ah = 01 H, filter out control characters, and echo
= 07 h, but the control characters are filtered out, not echo
= 08 h. filter out the control characters without echo.
Exit parameter: Al = ASCII code of the input character
(2) function 02 h
Function Description: outputs a character to a standard output device (for example, a screen. The output can also be redirected. If you do so, you cannot determine whether the disk is full.
Entry parameter: Ah = 02 h
DL = ASCII code of the characters to be output
Exit parameter: None
(3) function 03 h
Function Description: reads a character from a secondary device. The default value of this secondary device is COM1.
Entry parameter: Ah = 03 h
Exit parameter: Al = ASCII code for reading characters
(4) function 04 H
Function Description: outputs a character to the auxiliary device. The default value of this auxiliary device is COM1.
Entry parameter: Ah = 04 H
DL = ASCII code of the characters to be output
Exit parameter: None
(5) function 05 h
Function Description: outputs a character to the standard output device. The default output device is a printer with the LPT1 port, unless changed using the mode command.
Entry parameter: Ah = 05 h
DL = ASCII code of the characters to be output
Exit parameter: None
(6) 06 h Functions
Function Description: Console (for example, keyboard or screen) input/output. If the input/output operations are redirected, you cannot determine whether the file is at the end of the file or whether the disk is full.
Entry parameter: Ah = 06 h, DL = input/output function Selection
Exit parameter: If DL = 00h-feh, this function is output, and DL is the ASCII code of the characters to be output;
If DL = 0ffh, this function is input. At this time, if ZF = 1, no characters are readable. Otherwise, Al = the ASCII code of the characters to be read.
(7) 09 h Functions
Function Description: outputs a string to the standard output device. If the output operation is redirected, the disk is full.
Entry parameter: Ah = 09 h
DS: dx = address of the character to be output
Description: The string to be displayed uses '$' as its end sign.
Exit parameter: None
(8) function 0ah
Function Description: reads a byte string from the standard input device and ends the input with the "Enter key" (the input character is displayed on the standard output device ). If the input operation is redirected, you cannot determine whether the file is at the end of the file.
Entry parameter: Ah = 0ah
DS: dx = start address for storing input characters
Description of input string buffer accepted:
1. The first byte is the maximum buffer capacity, which can be considered as an entry parameter;
2. The second byte is the number of characters actually entered (excluding the Enter key), which can be considered as an exit parameter;
3. stores the actual input string starting from the third byte;
4. The string ends with the carriage return key. The carriage return is the last accepted character;
5. If the number of characters entered exceeds the maximum buffer capacity, the excess will be discarded and the system will send a bell until you enter the "Press ENTER" key to end the input.
For example:
Buff 80 ,?, 80 DUP (?) ; Up to 80 characters allowed
Exit parameter: None
(9) function 0bh
Function Description: checks whether characters are readable on the standard input device. This input operation can be redirected
Entry parameter: Ah = 0bh
Exit parameter: Al = 00 h -- readable without characters; FFH -- readable with characters
(10) function 0ch
Function Description: clears the current standard input buffer and then reads characters. Its input operations can be redirected.
Entry parameter: Ah = 0ch
Al = 01 H, 06 h, 07 h, 08h, or 0ah
Exit parameter: If the entry parameter Al is 0ah, DS: dx = stores the start address of the input character. Otherwise, exit parameter Al = ASCII code of the input character
(1) 39 h Functions
Function Description: Creates a new directory with the specified drive and path.
Entry parameter: Ah = 39 h
DS: dx = string address of the specified path (0 is the end mark of the string)
Exit parameter: cf = 0 -- created successfully; otherwise, Ax = Error Code (03h or 05 h). For details, see error code table.
(2) function 3ah
Function Description: Delete the directory of the specified drive and path.
Entry parameter: Ah = 3ah
DS: dx = string address of the specified path (0 is the end mark of the string)
Exit parameter: cf = 0 -- deletion successful; otherwise, Ax = Error Code (03h or 05 h). For details, see error code table.
(3) function 3bh
Function Description: Set the specified drive and path to the current directory.
Entry parameter: Ah = 3bh
DS: dx = string address of the specified path (0 is the end mark of the string)
Exit parameter: cf = 0 -- set successfully. Otherwise, Ax = Error Code (03 h). For more information, see error code table.
(4) 47 h Functions
Function Description: obtains the full path string of the current directory.
Entry parameter: Ah = 47 h
DL = drive letter (0 = default, 1 = ,...)
DS: SI = address for storing the string of the current directory
Exit parameter: cf = 0 -- read succeeded; otherwise, Ax = Error Code (0fh). For more information, see error code table.
(1) function 0dh
Function Description: clears the current File Buffer, but in the MS-DOS, data temporarily written to the buffer is written to the disk
Entry parameter: Ah = 0dh
Exit parameter: None
(2) function 0eh
Function Description: Specifies the current drive.
Entry parameter: Ah = 0eh
DL = drive letter (0 = A, 1 = B ,...)
Exit parameter: Al = current drive letter in the system
(3) function 19 h
Function Description: obtains the current default drive letter.
Entry parameter: Ah = 19 h
Exit parameter: Al = drive letter (0 = A, 1 = B ,...)
(4) functions: 1bh and 1ch
Function Description: obtains the drive allocation information.
Entry parameter: Ah = 1bh -- default drive
Ah = 1ch -- any drive, DL = drive letter (0 = default, 1 = ,...)
Export parameter: Al = 0ffh -- failed; otherwise,
Al = number of sectors per cluster
DS: BX = ID byte address
Cx = physical sector size (bytes)
DX = number of drives
(5) function 2EH
Function Description: sets/clears the operating system's automatic read inspection mark.
Entry parameter: Ah = 2EH
DL = 00 h
Al = 00 h -- clear this flag, 01 H -- set this flag
Exit parameter: None
(6) 36 h Functions
Function Description: obtains information about the selected drive.
Entry parameter: Ah = 36 h
DL = drive letter (0-default, 1 = A, 2 = B ,...)
Exit parameter: If the function call fails, Ax = 0 ffffh; otherwise,
Ax = number of sectors per cluster
BX = number of available Clusters
Cx = physical sector size (bytes)
DX = number of clusters in the drive
(7) 54 h Functions
Function Description: Read verification mark
Entry parameter: Ah = 54 h
Exit parameter: Al = current inspection mark value: 00 h-off inspection, 01 H-on inspection
(1) function 3ch
Function Description: Creates a new file with the specified file name. If the specified file already exists, set the length to 0. After the file is created, it is opened and its handle is returned.
Entry parameter: Ah = 3ch
DS: dx = specifies the address of the file name string (0 is the end mark of the string)
Cx = file attributes (these flags can be combined) 0 = 1 -- read-only
Bit 2 = 1 -- System
Bit 5 = 1 -- Archive
Bit 1 = 1 -- implicit
Bit 3 = 1 -- volume label
Do not retain other bits, and set them to 0.
Export parameter: cf = 0 -- created successfully, Ax = file handle. Otherwise, Ax = Error Code (03 h, 04h or 05 h). For details, see error code table.
(2) function 3DH
Function Description: Open the specified drive, path, and file name, and return the file handle.
Entry parameter: Ah = 3DH
DS: dx = indicates the string of the file (0 is the end mark of the string)
Al is open mode: 0 ~ 2 000-read-only mode 001-write mode 010-read/write mode
Bit 3 reserved, its value is 0
4-digit ~ 6 Shared Mode 000-compatible mode 001-not shared 010-denied write
011-reject read 100-do not reject any operation
Bit 7 inheritance flag -- 0/1: the sub-process inherits or does not inherit the handle
Export parameter: cf = 0 -- open successfully, Ax = file handle. Otherwise, Ax = Error Code (02 h, 03 h, 04 H, 05h, or 0ch ), for more information, see error code table.
(3) function 3eh
Function Description: Close the file with the specified handle.
Entry parameter: Ah = 3eh
BX = file handle
Exit parameter: cf = 0 -- close successful; otherwise, Ax = Error Code (06 h). For more information, see error code table.
(4) 41 h Functions
Function Description: deletes a specified object.
Entry parameter: Ah = 41 h
DS: dx = address of the file name string
Export parameter: cf = 0 -- deletion successful; otherwise, Ax = Error Code (02 h, 03h or 05 h). For details, see error code table.
(5) 43 H Functions
Function Description: read or set attributes of a specified object.
Entry parameter: Ah = 43 H
BX = file handle
DS: dx = address of the file name string
Al = 00 h/01 H -- Read/set file attributes
Cx = file attribute: Bit 0 = 1 -- Read-Only bit 1 = 1 -- implicit
Bit 2 = 1 -- System bit 3 = 1 -- volume label
Bits 5 = 1 -- Archive other bits are not used and set to 0
Exit parameter: cf = 0 -- close successful, Cx = File Attribute. Otherwise, Ax = Error Code (01 H, 02 h, 03h or 05 h). For details, see error code table.
(6) 45 h Functions
Function Description: copy the handle of the currently opened device or file, which corresponds to the same location of the same device or file
Entry parameter: Ah = 45 h
BX = file handle to be copied
Export parameter: cf = 0 -- copied successfully, Ax = new handle. Otherwise, Ax = Error Code (04h or 06 h). For details, see error code table.
(7) 46 h Functions
Function Description: specify two handles and direct the second handle to the first handle, that is, the second handle is redirected.
Entry parameter: Ah = 46 h
BX = file or device handle
Cx = file handle to be redirected
Exit parameter: cf = 0 -- redirection succeeded; otherwise, Ax = Error Code (04h or 06 h). For details, see error code table.
(8) function 4eh
Function Description: gets the first file that matches the given file name.
Entry parameter: Ah = 4eh
DS: dx = string of the given file name
Cx = File Attribute used for search: Bit 0 = 1 -- Read-Only bit 1 = 1 -- implicit
Bit 2 = 1 -- System bit 3 = 1 -- volume label
Bit 4 = 1 -- directory bit 5 = 1 -- Archive
Do not retain other bits, and set them to 0.
Export parameter: cf = 1 -- operation failed, Ax = Error Code (02 h, 03h or 12 h). The meaning of this parameter can be found in the error code table. Otherwise, the operation is successful, DTA (Disk transfer area) fills in data in the following ways: 00 ~ 14 h Reserved
File Attribute matching by 15 h in bytes
Byte 16 ~ 17 h compressed file name
Byte 18 ~ 19 h compressed file date
Byte 1A ~ 1dh File Size
Bytes 1E ~ 2ah file name string
(9) function 4fh
Function Description: searches for the next file name after the 21h function 4eh is interrupted.
Entry parameter: Ah = 4fh
Al = Returned Code
Export parameter: cf = 1 -- operation failed, Ax = Error Code (12 h). For the meaning, see error code table. Otherwise, the operation is successful. The data in DTA is shown in the previous function 4eh.
(10) 56 h Functions
Function Description: file name change
Entry parameter: Ah = 56 h
DS: dx = string address of the current file name
ES: di = new file name string address
Export parameter: cf = 0 -- operation succeeded; otherwise, Ax = Error Code (02 h, 03 h, 05 h, 11 h). For details, see error code table.
(11) function 57 H
Function Description: Read/set the date and time of the file.
Entry parameter: Ah = 57 H
BX = file handle read date and time Al = 00 h
Set date and time Al = 01 H
Cx = Time (0f ~ 0bh: hour, 0ah ~ 05 h: minute, 04h ~ 00 h: 2 seconds)
DX = Date (0f ~ 09 h: Year (relative to 1980), 08h ~ 05 h: Month, 04h ~ 00 h: Day)
Export parameter: cf = 1 -- operation failed, Ax = Error Code (01 H, 06 h). The meaning of this parameter can be found in the error code table. Otherwise, if the file information is read, cx = Time, dx = Date
(12) function 5ah
Function Description: creates a temporary file.
Entry parameter: Ah = 5ah
DS: dx = path name address
Cx = File Attribute (bit can be combined). Its definition is as follows: Bit 0 = 1 read-only bit 3-4 = 0 Reserved
Bit 1 = 1 implicit bit 5 = 1 Archive
Bit 2 = 1 system bit 6-15 = 0 Reserved
Export parameter: cf = 0 -- operation successful, Ax = file handle, DS: dx = complete path file address; otherwise, ax = Error Code (03 h, 04h or 05 h). For more information, see error code table.
(13) function 5bh
Function Description: Creates a new file.
Entry parameter: Ah = 5bh
DS: dx = path name address
Cx = File Attribute (bit can be combined). Its definition is as follows: Bit 0 = 1 read-only bit 4 = 0 Reserved
Bit 1 = 1 implicit bit 5 = 1 Archive
Bit 2 = 1 system bit 6-15 = 0 Reserved
Bit 3 = 1 volume label
Export parameter: cf = 0 -- operation succeeded, Ax = file handle. Otherwise, Ax = Error Code (03 h, 04 H, 05h, or 50 h). For details, see error code table.
(14) 67 h Functions
Function Description: sets the maximum number of file handles)
Entry parameter: Ah = 67 h
BX = number of handles
Export parameter: cf = 0 -- operation succeeded; otherwise, Ax = Error Code. For more information, see error code table.
(15) function 6ch
Function Description: Extended file opening (opening, creating, or replacing files)
Entry parameter: Ah = 6ch
Al = 00 h
DS: SI = path name address
BX = open Mode 2 ~ 0 000-read-only 001-write only 010-read and write
Bit 3 Reserved (0)
6-digit ~ 4 000-compatible 001-read/write rejected 010-write denied
011-read 100 denied-no operation is denied
7 0-the sub-process inherits the handle; 1-The sub-process does not inherit the handle.
12-bit ~ 8 reserved (0)
0-Execute int 24 h. Otherwise, the error code is returned to the process.
Bit 14 write mode: 0-write buffer, 1-Write File directly
Bit 15 Reserved (0)
Cx = file attributes
Bit 0 = 1 read-only bit 4 = 0 Reserved
Bit 1 = 1 implicit bit 5 = 1 Archive
Bit 2 = 1 system bit 6-15 = 0 Reserved
Bit 3 = 1 volume label
DX = enable flag 3 ~ 0 0-open failed, 1-open file, 2-replace File
Bits 7 ~ 4 0-open failed, 1-Create File
15-bit ~ 8 0-Reserved
Export parameter: cf = 1 -- operation failed, Ax = Error Code. For more information, see error code table. Otherwise,
Ax = file handle
Cx = 1 -- file exists, open it
= 2 -- the file does not exist.
(1) function 0fh
Function Description: open the file and prepare it for sequential reading/writing.
Entry parameter: Ah = 0fh
DS: dx = address of the file control block
Exit parameter: Al = 00 h -- open successfully; otherwise, Al = FFH (if the file cannot be found)
In the MS-DOS operating system, the fields of the file control block are shown in the following table. Field name offset field meaning
Drive word 00 H 1 for drive A, 2 for drive B ,...
Current block field 0ch 00 h
Record size field 0eh 0080 H
File length field: 10 h file bytes
Date Field 14 h date
Time Field 16 h time
(2) 10 h Functions
Function Description: close a file.
Entry parameter: Ah = 10 h
DS: dx = address of the file control block
Exit parameter: Al = 00 h -- close successfully; otherwise, Al = FFH
(3) 11 h and 12 h Functions
Function Description: Find the first or next matching file.
Entry parameter: Ah = 11 h -- the first matched File
= 12 h -- next matched File
DS: dx = address of the file control block
Export parameter: Al = 00 h -- found; otherwise, Al = FFH
(4) function 13 H
Function Description: delete all matching files in the specified (or default) Drive.
Entry parameter: Ah = 13 H
DS: dx = address of the file control block
Exit parameter: Al = 00 h -- deleted successfully; otherwise, Al = FFH
(5) 16 h Functions
Function Description: create a file in the current directory with a file length of 0 and open the file to prepare for subsequent read/write operations.
Entry parameter: Ah = 16 h
DS: dx = address of the unopened file control block
Exit parameter: Al = 00 h -- created successfully; otherwise, Al = FFH (for example, full disk)
(6) function 17 h
Function Description: in the current directory of the specified drive, replace all matching files
Entry parameter: Ah = 17 h
DS: dx = specifies the address of the file control block.
Exit parameter: Al = 00 h -- name change successful; otherwise, Al = FFH
(7) function 23 h
Function Description: search for a matched file in the current directory. If it is found, the number of records is used to update the file size.
Entry parameter: Ah = 23 h
DS: dx = address of the unopened file control block
Exit parameter: Al = 00 h -- the match is successful, and the offset of 21h in FCB is set to the number of records. Otherwise, Al = 0ffh
(8) functions 29 H
Function Description: analyzes different fields in the FCB table where a string (file name) is inserted.
Entry parameter: Ah = 29 H
Cx = number of records to write
DS: SI = string segment address
ES: di = FCB address
Al = analytical control flag 3 = 1 --
If the string contains a file suffix, the file Suffix in FCB will change
= 0 -- if the suffix is ignored or no suffix is available after analysis, the suffix field in FCB is set to "null"
Bits 2 = 1 -- if there is a file name in the string, the file name in FCB will change
= 0 -- if the file name is ignored or no file name exists after analysis, the file name field in FCB is set to "null"
Bit 1 = 1 -- if the drive letter is specified in the string, the ID byte in FCB is modified.
= 0 -- if the ID byte is ignored or the drive letter is not specified after analysis, the drive field in FCB is set to 0 (default)
Bit 0 = 1 --
= 0 -- ignore the leading delimiter
The leading Delimiter is not ignored.
Exit parameter: Al = 00 h-No wildcard character 01 H-invalid wildcard character FFH-drive letter
DS: SI = address of the first character of the file name after analysis
ES: di = formatted, unopened FCB address
(1). Function 1ah
Function Description: sets the address of the data transfer area to prepare for subsequent FCB operations.
Entry parameter: Ah = 1ah
DS: dx = specifies the address of the file control block.
Exit parameter: None
(2) function 2fh
Function Description: obtains the current DTA address for FCB read/write operations.
Entry parameter: Ah = 2fh
Exit parameter: Es: BX = the segment address and offset of DTA
(3) function 3fh
Function Description: reads a specified number of bytes from a previously opened file and moves the file pointer.
Entry parameter: Ah = 3fh
BX = file handle
Cx = number of bytes to be read
DS: dx = buffer address for storing characters
Exit parameter: cf = 0 -- read succeeded, Ax = number of characters to read; otherwise, Ax = Error Code (05h or 06 h). For details, see error code table.
(4) 40 h Functions
Function Description: Write a specified number of bytes to a previously opened file and modify the file pointer accordingly.
Entry parameter: Ah = 40 h
BX = file handle
Cx = number of written bytes
DS: dx = buffer address for storing data
Exit parameter: cf = 0 -- close successful, Ax = number of bytes written; otherwise, Ax = Error Code (05h or 06 h). For details, see error code table.
(5) 42 h Functions
Function Description: sets the relative position of the file pointer (relative to the file header, file tail, and current position)
Entry parameter: Ah = 42 h
BX = file handle
Cx = high of the Offset
DX = low position of the Offset
Al = 00 h -- absolute offset starting from the file header
= 01 H -- offset starting from the pointer of the current file (Signed)
= 02 h -- offset starting from the end of the file (Signed)
Exit parameter: cf = 0 -- set successfully. dx indicates the pointer's high position, and ax indicates its low position. Otherwise, Ax = Error Code (01h and 06 h) indicates the error code table.
(6) 5ch Functions
Function Description: lock or unlock the file Area
Entry parameter: Ah = 5ch
Al = 00 h -- lock area 01 H -- Unlock Area
BX = file handle
CX: dx = Regional offset
Si: di = region length
DS: dx = path name address
Export parameter: cf = 0 -- operation succeeded; otherwise, Ax = Error Code (01 H, 06 h, 21h, or 24 h). For details, see error code table.
(7) functions 68 h
Function Description: submits File Buffer data.
Entry parameter: Ah = 68 h
BX = file handle
Export parameter: cf = 0 -- operation succeeded; otherwise, Ax = Error Code. For more information, see error code table.
(1) function 14 h
Function Description: Read the next sequence block from the file and add a pointer to the file.
Entry parameter: Ah = 14 h
DS: dx = address of the previously opened file control block
Exit parameter: Al = 00 h -- read Successful 01 H -- end of File
02 h -- segment winding 03 h -- partially recorded at the end of the file
(2) 15 h Functions
Function Description: write the next sequence of data blocks to a file and add a pointer to the file.
Entry parameter: Ah = 15 h
DS: dx = address of the previously opened file control block
Exit parameter: Al = 00 h -- write successful 01 H -- Disk Full 02 h -- segment Winding
(3) function 21 h
Function Description: reads the selected record from the file.
Entry parameter: Ah = 21 h
DS: dx = address of the previously opened file control block
Exit parameter: Al = 00 h -- read Successful 01 H -- end of File
02 h -- Cancel read operation 03 h -- some records are at the end of the file
(4) 22 h Functions
Function Description: writes data in the memory to the selected record in the file.
Entry parameter: Ah = 22 h
DS: dx = address of the previously opened file control block
Exit parameter: Al = 00 h-write successful 01 H-Disk Full 02 h-cancel write operation
(5) 24 h Functions
Function Description: sets the relative number of records in FCB as the number of records in the enabled FCB.
Entry parameter: Ah = 24 h
DS: dx = address of the previously opened file control block
Exit parameter: the Al value is damaged, other registers are not affected, and the offset 21h unit in FCB is modified.
(6) 27 h Functions
Function Description: reads several records from a file to the memory.
Entry parameter: Ah = 27 h
DS: dx = address of the previously opened file control block
Exit parameter: Al = 00 h -- read Successful 01 H -- end of File
02 h -- Cancel read operation 03 h -- some records are at the end of the file
Cx = number of records actually read
(7) 28 h Functions
Function Description: writes several records from the memory to the file.
Entry parameter: Ah = 28 h
Cx = number of records to write
DS: dx = address of the previously opened file control block
Exit parameter: Al = 00 h -- write successful 01 H -- Disk Full 02 h -- segment Winding
Cx = number of actually written records
(1) 48 h Functions
Function Description: allocates a memory unit and returns the first address of the memory unit.
Entry parameter: Ah = 48 h
BX = number of memory unit bytes to be applied
Exit parameter: cf = 0 -- allocated successfully. Ax = the first address of the storage unit. Otherwise, Ax = Error Code (H or 08 h). For details, see error code table, BX = maximum number of available Blocks
(2) 49 H Functions
Function Description: releases memory unit blocks for other programs.
Entry parameter: Ah = 49 H
Es = segment address of the applied Block
Exit parameter: cf = 0 -- release successful; otherwise, Ax = Error Code (07h or 09 h). For details, see error code table.
(3) function 4ah
Function Description: dynamically changes a memory block according to the program's needs.
Entry parameter: Ah = 4ah
BX = size of a new storage Block
Es = segment address of the modified block
Exit parameter: cf = 0 -- Modified successfully. Otherwise, Ax = Error Code (07 h, 08h, or 09 h). For details, see error code table. bx = maximum available block size.
(4) 58 h Functions
Function Description: Read/set a memory allocation policy.
Entry parameter: Ah = 58 h Read Memory Allocation Policy Al = 00 h
Set Memory Allocation Policy Al = 01 H
BX = memory allocation policy code:
00 h-first satisfied
01 H-best match
02 h-Final fulfillment
Export parameter: cf = 0 -- operation successful, Ax = selected memory allocation policy code (meaning as described above); otherwise, Ax = Error Code (01 H ), for more information, see error code table.
(1) 25 h Functions
Function Description: sets the interrupt vector table.
Entry parameter: Ah = interrupt number
DS: dx = entry address of the interrupt handler
Exit parameter: None
(2) functions 30 h
Function Description: gets the version number of the MS-DOS Operating System
Entry parameter: Ah = 30 h
Export parameters: Al = 0--v 1.0; for other high versions: Al = major version
Ah = minor version (MS-DOS 3.1 = 0ah ,...)
BH = OEM serial number (Original Equipment Manufacturer)
BL: Cx = 24-bit user serial number
(3) functions 33 H
Function Description: gets or changes the status of an operating system interruption. Testing of ^ C will be affected during function call.
Entry parameter: Ah = 33 H
Al = 00 h -- get status
= 01 H -- set the status. DL = 00/01 indicates that the status is set to off/on.
Exit parameters: When the status is obtained, DL = 00/01 -- indicating off/on respectively
Note:
1. If other function numbers are stored in Al, the return value of Al is 0ffh;
2. If Al is set to 5, the start drive letter is returned in DL (1-A, 2-B ,...)
(4) 34 h Functions
Function Description: Obtain the remote address of the indos flag. It is maintained by DOS to indicate that the IP address is active during dos.
Entry parameter: Ah = 34 h
Exit parameter: Es: BX = The Long Address of the indos flag
If the unit value is 1, it indicates that the DOS function is being executed. Otherwise, it is not.
(5) 35 h Functions
Function Description: obtains the entry address of the specified interrupt number.
Entry parameter: Ah = 35 h
Al = interrupt number
Exit parameter: Es: BX = entry address of the interrupt handler
(6) 38 H Functions
Function Description: read or set country information.
Entry parameter: Ah = 38 h when reading country information
DS: dx = address for storing the returned information
Al = 0 -- Obtain the current country information
Al = 1 ~ 0feh -- obtain country information with the Country Code less than 255
Al = 0ffh -- obtain country information with code greater than or equal to 255, BX = Country Code
When setting country information
DX = 0 ffffh
Al = 0 ~ 0feh -- set country information with Country Code less than 255
Al = 0ffh -- set country information with code greater than or equal to 255, BX = Country Code
Export parameter: cf = 0 -- call successful, BX = Country Code; otherwise. Ax = Error Code (02 h). For more information, see country descriptions in the error code table:
Byte 0-1 h: Date Format: 0-mdy, 1-dmy, 2-ymd
Byte 2-6 h: currency character
Byte 7-8 h: Numerical kilobytes delimiter
Byte 9-0ah: Numeric accuracy delimiter
Byte 0b-0ch: Date delimiter
Byte 0d-0eh: Time Interval
Byte 0fh: currency format
0 = 0 -- the currency symbol is in the front; otherwise, the currency symbol is in the back
Digit 1 = 0 -- there is no space between the currency symbol and the data. Otherwise, there is a space between the two.
Digit 2 = 0 -- the currency symbol is separated from the decimal point. Otherwise, the currency symbol replaces the decimal point.
Byte 10 h: number of decimal places of the currency
Byte 11 h: time format. 0 = 0-12 hours; otherwise, 24 hours
Byte 12 ~ 15 h: case-Map call address
Byte 16 ~ 17 h: String delimiter
Byte 18 ~ 21 h: Reserved
(7) functions 44 h
Function Description: Input/Output Control. Its sub-functions are described as follows:
00 h-device information retrieval 01 H-device Information Retrieval
02 h-receive control data from character device drive 03 h-send control data to character device drive
04 H-Accept control data from block device drive 05 h-send control data to block device drive
06 h-check input status 07 h-check output status
08 h-check whether the block device is a detachable device 09 h-check whether the device is a remote device
0ah-check whether the handle is a remote object 0bh-change the number of shared access entries
0ch-character device General I/O Control Information 0dh-block device General I/O Control Information
0eh-read logical drive ing 0fh-set logical drive ing
Note: 00 h, 06h, and 07h in the input/output sub-functions are only for file handles, and the sub-functions are 00h ~ 08h does not support network devices.
(8) 50 h Functions
Function Description: sets the prefix of a program segment (PSP ).
Entry parameter: Ah = 50 h
BX = new PSP address
Exit parameter: None
(9) 51 H Functions
Function Description: Read the program segment prefix (PSP) address.
Entry parameter: Ah = 51 H
Exit parameter: BX = PSP address
(10) function 59 h
Function Description: read extended error messages.
Entry parameter: Ah = 59 h
BX = 00 h
Exit parameter: AX = extended error code. For details, see error code table.
BH = Error type, which is defined as follows: 01 H-resource shortage 02 h-in temporary State rather than error
03 h-Permission issue 04 H-Internal System Software Error
05 h-hardware failure 06 h-system software failure, but not an active process failure
07 h-application error 08 h-file or data item not found
09 h-file or data item type or format error 0ah-file or data item lock each other
0bh-bad disk in drive, bad Disk Area or storage problems
0ch-other errors
BL = Recommended measures are defined as follows:
01 H-after several retries, select "Terminate" or "Ignore"
02 h-retry several times (wait between two times), and then select "Terminate" or "Ignore"
03 h-get the correct information from the user
04 H-terminate the application and clear the resources it uses
05 h-terminate the program immediately without clearing its resources
06 h-ignore Error
07 h-Eliminate the error cause and try again
Ch = error location, which is defined as follows:
01 H-Unknown
02 H-block device (disk or disk simulator)
03 h-network
04 H-serial device
05 h-memory
ES: di = string for inserting the disk tag. If AX = 0022 H (the disk is invalid)
(11) function 5eh
Function Description: reads the machine name and reads/sets the sub-function number of the printer configuration.
00 H read machine name
02 h set the printer installation string
03 H read the printer installation string
① Sub-function 1
Entry parameter: Ah = 5eh
Al = 00 h
DS: dx = address for receiving the string buffer
Export parameter: cf = 1 -- operation failed, Ax = Error Code (01 H). For more information, see error code table. Otherwise,
Ch = 00 h -- the machine name is not defined. Otherwise, the machine name has been defined.
CL = NetBIOS Name (when CH = 00h)
DS: dx = the identifier address (when ch is less than 00h)
② Sub-function 2
Entry parameter: Ah = 5eh
Al = 02 h
BX = redirect List Index
Cx = length of the installation string
DS: SI = address of the installation string
Export parameter: cf = 0 -- operation succeeded; otherwise, Ax = Error Code (01 H). For details, see error code table.
③ Sub-function 3
Entry parameter: Ah = 5eh
Al = 03 h
BX = redirect List Index
ES: di = address for receiving String Buffer
Exit parameter: cf = 0 -- operation succeeded, Cx = accept the length of the string; otherwise, Ax = Error Code (01 H). For details, see error code table.
(12) function 5fh
Function Description: The function description of the sub-function number for device redirection.
02 H read the index of the redirection list
03 h redirection Device
① Sub-function 1
Entry parameter: Ah = 5fh
Al = 02 h
BX = redirect List Index
DS: SI = accept the 16-byte storage zone address of the local device name
ES: di = 128-byte storage zone address of the accepted Network Name
Export parameter: cf = 1 -- operation failed, Ax = Error Code (01h or 12 h). The meaning of this parameter can be found in the error code table. Otherwise, the BH bit 0 = 0 h -- the device is valid, otherwise, the device is invalid.
BL = device type -- 03 h: printer, 04 H: Drive
Cx = storage parameter value
DX = damaged
BP = damaged
DS: SI = address for storing the local device name
ES: di = address for storing the network name
② Sub-function 2
Entry parameter: Ah = 5fh
Al = 03 h
BL = device type -- 03 h: printer, 04 H: Drive
Cx = parameters saved by the caller
DS: SI = 16-byte storage zone address of the local device name
ES: di = 128-byte address of the network name, followed by the password
Export parameter: cf = 0 -- operation succeeded; otherwise, the ax = Error Code (01 H, 03 h, 05 h, 08 h, 0fh, or 12 h). For the meaning, see the error code table.
(13) 63 h Functions
Function Description: Read the leading byte table.
Entry parameter: Ah = 63 h Al = sub-function
= 00 h-read the address of the system's leading byte table
= 01 H-set/clear temporary console flag (DL = 00 h/01 H-clear/set flag)
= 02 h-read the temporary console flag value
Export parameter: BX = 1 -- operation failed, Ax = Error Code (01 H). For more information, see error code table. Otherwise,
If Al = 00 h, DS: SI = system leading byte table address;
If Al = 02 h, DL = temporary console flag value
(14) 65 h Functions
Function Description: read extended country information.
Entry parameter: Ah = 65 h
BX = code page (-1 = active con device)
Cx = buffer size for receiving information
DX = Country ID (-1 = default)
ES: di = buffer address for receiving information Al = sub-function
= 01 H -- read General Country Information
= 02 h -- read the pointer to the upper-case alphabet
= 04 H -- read the pointer pointing to the Capital alphabet of the file name
= 06 h -- read the pointer to the proofreading table
= 07 h -- read the pointer to the DBCS Vector
Exit parameter: cf = 0 -- the operation is successful, and the required data is stored in the called buffer. Otherwise, Ax = Error Code (02 h). For details, see error code table.
(15) functions 66 h
Function Description: Read/set the code page.
Entry parameter: Ah = 66 h
Al = sub-function No.: 01 H -- read the code page, 02 h -- select the code page
BX = selected code page (when Al = 02 h)
Exit parameter: cf = 0 -- operation succeeded. When the sub-function is called for H, BX = active code page, dx = default code page. Otherwise, ax = Error Code (H or 65 h). For more information, see error code table.
(16) function 5d0ah
Function Description: sets an extended error message.
Entry parameter: AX = 5d0ah
DS: dx = address of the extended error structure, which is described as follows: extend_err struct
Rax word? ; Ax
RBx word? ; BX
RcX word? ; CX
RDX word? ; DX
RSI word? ; Si
RDI word? ; Di
RDS word? ; DS
Res word? ; Es
Pad word 3 DUP (0)
Extend_err ends
Exit parameter: None
(1) 00 h Functions
Function Description: terminate a process. This is one of the methods that a program can use to terminate a process.
Entry parameter: Ah = 00 h
Cs = code segment address
Exit parameter: None
(2) 26 h Functions
Function Description: copy the program segment prefix (PSP) of the currently executing program to the specified address in the memory and change it to another program.
Entry parameter: Ah = 26 h
DX = segment address of the new program segment prefix
Exit parameter: None
(3) 31 H Functions
Function Description: Terminate the running of a program and pass a returned code to its parent process. However, some or all of the programs reside in the memory.
Entry parameter: Ah = 31 H
Al = return code number
DX = number of bytes residing in the memory
Exit parameter: None
(4) function 4bh
Function Description: Exec)
Entry parameter: Ah = 4bh
ES: BX = address of the parameter block
DS: dx = program entry address
Al = 00 h -- load and execute the program, 03 h -- load in overwrite form
Exit parameter: cf = 0 -- operation succeeded. Values of other registers except CS and IP are damaged. Otherwise, ax = Error Code (01 H, 02 h, 03 h, 05 h, 08 h, 0ah, or 0bh)
(5) function 4ch
Function Description: Terminate the execution of a program and return a code.
Entry parameter: Ah = 4ch
Al = Returned Code
Exit parameter: None
(6) function 4dh
Function Description: the parent process obtains the code returned by the child process.
Entry parameter: Ah = 4dh
Exit parameter: Ah = 00 h -- use the function of interrupting 20 h and 21 h, 0 or 4C to terminate normally
= 01 H -- terminate a user by ^ C
= 02 h -- termination due to fatal error
= 03 h -- use 31 H to interrupt the 21 H function, or terminate the service by 27h.
Al = return code of the sub-process: 00 h -- the sub-process is terminated by 20 h of interruption, and the function of 21 h of interruption is 0 or 4C.
(7) functions 62 h
Function Description: Read the PSP address.
Entry parameter: Ah = 62 h
Exit parameter: BX = PSP offset
(1) function 2ah
Function Description: obtains the system date.
Entry parameter: Ah = 2ah
Export parameter: Cx = year (1980 ~ 2099), DH = month (1 ~ 12), DL = Day (1 ~ 31)
Al = day of the week (0 = Sunday, 1 = Monday ,...)
(2) function 2bh
Function Description: set the system date.
Entry parameter: Ah = 2bh
Cx = year (1980 ~ 2099), DH = month (1 ~ 12), DL = Day (1 ~ 31)
Exit parameter: Al = 00 h -- set successfully, 0ffh -- set failed
(3) function 2ch
Function Description: obtains the system time.
Entry parameter: Ah = 2ch
Exit parameter: CH = hour (0 ~ 23), CL = (0 ~ 59), DL = seconds (0 ~ 59), Al = percent seconds (0 ~ 99)
(4) function 2dh
Function Description: set the system time
Entry parameter: Ah = 2dh
Ch = hour (0 ~ 23), CL = (0 ~ 59), DL = seconds (0 ~ 59), Al = percent seconds (0 ~ 99)
Export parameter: Al = 00 h -- set successfully, 0ffh -- set failed