X01. OS. 5: DOS function call, x01. OS. 5dos

Source: Internet
Author: User

X01. OS. 5: DOS function call, x01. OS. 5dos

DOS function call (INT 21)
-------------------------------
AH = 0-2E applicable to DOS 1.0 and later versions
AH = 2F-57 applicable to DOS 2.0 and later versions
AH = 58-62 applicable to DOS 3.0 and later versions
-------------------------------

AH = 00
Function: Program termination (same as INT 20 h)
Call parameters:
CS = program segment prefix

AH = 01
Function: Enter and display the keyboard.
Response parameters:
AL = input character

AH = 02
Function: displays the output.
Call parameters:
DL = output character

AH = 03
Function: asynchronous communication Input
Response parameters:
AL = input data

AH = 04
Function: asynchronous communication output
Call parameters:
DL = output data

AH = 05
Function: Printer output
Call parameters:
DL = output character

AH = 06
Function: Direct console I/O
Call parameters:
DL = FF (input)
Character (output)
Response parameters:
AL = input character

AH = 07
Function: keyboard input (no echo)
Response parameters:
AL = input character

AH = 08
Function: Enter the keyboard (no echo) and check Ctrl-Break.
Response parameters:
AL = input character

AH = 09
Function: displays strings.
Call parameters:
DS: DX = string address
'$' End string

AH = 0A
Function: Enter the keyboard in the buffer zone.
Call parameters:
DS: DX = buffer first address
(DS: DX) = maximum number of characters in the buffer zone
Response parameters:
(DS: DX) + 1 = actual number of characters entered

AH = 0B
Function: checks the keyboard status.
Response parameters:
AL = 00: Input
FF: no input

AH = 0C
Function: clears the input buffer and requests the specified input.
Call parameters:
AL = enter function number (,)

AH = 0D
Function: reset a disk.
Response parameters:
Clear File Buffer

AH = 0E
Function: Specify the current default disk drive.
Call parameters:
DL = drive letter (0 = A, 1 = B ,...)
Response parameters:
AL = number of drives

AH = 0F
Function: open a file.
Call parameters:
DS: DX = FCB first address
Response parameters:
AL = 00: Find the file
FF: file not found

AH = 10
Function: Disable a file.
Call parameters:
DS: DX = FCB first address
Response parameters:
AL = 00: Directory modified successfully
FF: files not found in the directory

AH = 11
Function: finds the first directory item.
Call parameters:
DS: DX = FCB first address
Response parameters:
AL = 00: Found
FF: not found

AH = 12
Function: finds the next directory item.
Call parameters:
DS: DX = FCB first address (file name with * Or ?)
Response parameters:
AL = 00: Found
FF: not found

AH = 13
Function: delete an object.
Call parameters:
DS: DX = FCB first address
Response parameters:
AL = 00: Deletion successful
FF: not found

AH = 14
Function: sequential read
Call parameters:
DS: DX = FCB first address
Response parameters:
AL = 00: read Successful
01: End of file, no data in record
02: insufficient space for DTA
03: End of file, incomplete record

AH = 15
Function: sequential write
Call parameters:
DS: DX = FCB first address
Response parameters:
AL = 00: Write successful
01: full disk
02: insufficient space for DTA

AH = 16
Function: create a file
Call parameters:
DS: DX = FCB first address
Response parameters:
AL = 00: Creation successful
FF: no disk space

AH = 17
Function: rename a file
Call parameters:
DS: DX = FCB first address
(DS: DX + 1) = old file name
(DS: DX + 17) = new file name
Response parameters:
AL = 00: Successful
FF: Failed

AH = 19
Function: obtains the default disk drive.
Response parameters:
AL = default drive letter (0 = A, 1 = B, 2 = C ,...)

AH = 1A
Function: sets the DTA address.
Call parameters:
DS: DX = DTA address

AH = 1B
Function: obtains the default drive FAT information.
Response parameters:
AL = number of sectors per cluster
DS: BX = fat id byte
CX = physical sector size
DX = number of clusters on the default drive

AH = 1C
Function: obtains the FAT information of any drive.
Call parameters:
DL = drive letter
Response parameters:
Same as above!

AH = 21
Function: random read
Call parameters:
DS: DX = FCB first address
Response parameters:
AL = 00: Write successful
01: End of File
02: Buffer Overflow
03: Buffer not satisfied

AH = 22
Function: Random write
Call parameters:
DS: DX = FCB first address
Response parameters:
AL = 00: Write successful
01: full disk
02: Buffer Overflow

AH = 23
Function: determines the file size.
Call parameters:
DS: DX = FCB first address
Response parameters:
AL = 00: Successful. Enter the file length in FCB.
FF: not found

AH = 24
Function: Set a random record number.
Call parameters:
DS: DX = FCB first address

AH = 25
Function: sets the interrupt vector.
Call parameters:
DS: DX = interrupt vector
AL = interrupt type number

AH = 26
Function: create a program segment prefix.
Call parameters:
DX = segment prefix of the new program segment

AH = 27
Function: Random Block read
Call parameters:
DS: DX = FCB first address
CX = number of records
Response parameters:
AL = 00: read Successful
01: End of File
02: the buffer is too small and the transmission ends.
03: Buffer not satisfied
CX = number of records read

AH = 28
Function: Random Block write
Call parameters:
DS: DX = FCB first address
CX = number of records
Response parameters:
AL = 00: Write successful
01: full disk
02: Buffer Overflow

AH = 29
Function: analyzes the file name.
Call parameters:
ES: DI = FCB first address
DS: SI = ASCIIZ string
AL = control analysis mark
Response parameters:
AL = 00: standard file
01: Multi-definition file
02: Invalid drive letter

AH = 2A
Function: Get date
Response parameters:
CX = year
DH: DL = month: Day (Binary)

AH = 2B
Function: set the date.
Call parameters:
CX: DH: DL = year: Month: Day
Response parameters:
AL = 00: Successful
FF: Invalid

AH = 2C
Function: Time taken
Response parameters:
CH: CL = hour: minute
DH: DL = seconds: 1/100 seconds

AH = 2D
Function: set the time.
Call parameters:
CH: CL = hour: minute
DH: DL = seconds: 1/100 seconds
Response parameters:
AL = 00: Successful
FF: Invalid

AH = 2E
Function: Set the automatic disk read/write flag.
Call parameters:
AL = 00: Close flag
01: Open flag

AH = 2F
Function: obtains the first address of the disk buffer.
Response parameters:
ES: BX = buffer first address

AH = 30
Function: obtains the DOS version number.
Response parameters:
AH = release number
AL = version number

AH = 31
Function: end and resident
Call parameters:
AL = return code
DX = resident area size

AH = 33
Function: Ctrl-Break Detection
Call parameters:
AL = 00: Get status
01: Set status (DL)
DL = 00: Disable Detection
01: Enable detection
Response parameters:
DL = 00: Disable Ctrl-Break Detection
01: Enable Ctrl-Break detection.

AH = 35
Function: obtains the interrupt vector.
Call parameters:
AL = interrupt type
Response parameters:
ES: BX = interrupt vector

AH = 36
Function: obtains free disk space.
Call parameters:
DL = drive letter (0 = default, 1 = A, 2 = B ,...)
Response parameters:
Success: AL = number of sectors per cluster
BX = Number of valid Clusters
CX = number of bytes per sector
Failed: AX = FFFF

AH = 38
Function: Set/retrieve country information
Call parameters:
DS: DX = first address of the information area
Response parameters:
BX = Country Code (international phone prefix)
AX = Error Code

AH = 39
Function: Creates a subdirectory (MKDIR)
Call parameters:
DS: DX = ASCIIZ string address
Response parameters:
AX = Error Code

AH = 3A
Function: delete a subdirectory (RMDIR)
Call parameters:
DS: DX = ASCIIZ string address
Response parameters:
AX = Error Code

AH = 3B
Function: change the current directory (CHDIR)
Call parameters:
DS: DX = ASCIIZ string address
Response parameters:
AX = Error Code

AH = 3C
Function: create a file
Call parameters:
DS: DX = ASCIIZ string address
CX = file attributes
Response parameters:
Success: AX = File Code
Failed: AX = Error Code

AH = 3D
Function: open a file.
Call parameters:
DS: DX = ASCIIZ string address
AL = 0: Read
1: Write
2: read/write
Response parameters:
Success: AX = File Code
Failed: AX = Error Code

AH = 3E
Function: Disable a file.
Call parameters:
BX = file number
Response parameters:
Failed: AX = Error Code

AH = 3F
Function: Read files or devices.
Call parameters:
DS: DX = data buffer address
BX = File Code
CX = number of bytes read
Response parameters:
Read successful: AX = number of bytes actually read
0: reached the end of the file
Read error: AX = Error Code

AH = 40
Function: write files or devices
Call parameters:
DS: DX = data buffer address
BX = File Code
CX = number of written bytes
Response parameters:
Written successfully: AX = number of actually written bytes
Failed to write: AX = Error Code

AH = 41
Function: delete an object.
Call parameters:
DS: DX = ASCIIZ string address
Response parameters:
Success: AX = 00
Error: AX = Error Code (2, 5)

AH = 42
Function: Move a file pointer.
Call parameters:
BX = File Code
CX: DX = displacement
AL = move mode (0, 1, 2)
Response parameters:
Success: DX: AX = new pointer position
Error: AX = Error Code

AH = 43
Function: sets/retrieves file attributes.
Call parameters:
DS: DX = ASCIIZ string address
AL = 0: Get File Attributes
1: Set file attributes
CX = file attributes
Response parameters:
Success: file attributes
Failed: AX = Error Code

AH = 44
Function: Device File I/O Control
Call parameters:
BX = File Code
AL = 0: Get status
1: Set status DX
2: Read data
3: Write Data
6. Obtain the input status.
7: Get output status
Response parameters:
DX = device information

AH = 45
Function: copy the file code.
Call parameters:
BX = File Code 1
Response parameters:
Success: AX = File Code 2
Failed: AX = Error Code

AH = 46
Function: manually copy the file code
Call parameters:
BX = File Code 1
CX = File Code 2
Response parameters:
Failed: AX = Error Code

AH = 47
Function: obtains the path name of the current directory.
Call parameters:
DL = drive letter
DS: SI = ASCIIZ string address
Response parameters:
(DS: SI) = ASCIIZ string address
Failed: AX = Error Code

AH = 48
Function: allocate memory space.
Call parameters:
BX = applied for memory capacity
Response parameters:
Succeeded: AX = allocating the first address of memory
Failed: BX = maximum available space

AH = 49
Function: releases memory space.
Call parameters:
ES = memory start segment address
Response parameters:
Failed: AX = Error Code

AH = 4A
Function: adjusts allocated storage blocks.
Call parameters:
ES = original memory start address
BX = requested capacity
Response parameters:
Failed: BX = maximum available space
AX = Error Code

AH = 4B
Function: Assemble/execute a program
Call parameters:
DS: DX = ASCIIZ string address
ES: BX = first address of the parameter Area
AL = 0: Load execution
3: load is not executed
Response parameters:
Failed: AX = Error Code

AH = 4C
Function: ends with a return code.
Call parameters:
AL = return code

AH = 4D
Function: return code.
Response parameters:
AX = return code

AH = 4E
Function: Find the first matching file.
Call parameters:
DS: DX = ASCIIZ string address
CX = attribute
Response parameters:
AX = Error Code (01,18)

AH = 4F
Function: Find the next matching file.
Call parameters:
DS: DX = ASCIIZ string address (which is included in the file name? Or *)
Response parameters:
AX = Error Code (18)

AH = 54
Function: indicates the automatic read/write flag of a disk.
Response parameters:
AL = Current flag value

AH = 56
Function: rename a file
Call parameters:
DS: DX = ASCIIZ string (old)
ES: DI = ASCIIZ string (new)
Response parameters:
AX = Error Code (, 17)

AH = 57
Function: sets/retrieves the date and time of a file.
Call parameters:
BX = File Code
AL = 0: Read
Set (DX: CX)
Response parameters:
DX: CX = Date and Time
Failed: AX = Error Code

AH = 58
Function: gets/sets the allocation policy code.
Call parameters:
AL = 0: Code Retrieval
1: PIN code (BX)
BX = policy code
Response parameters:
Success: AX = policy code
Failed: AX = Error Code

AH = 59
Function: obtains the extended error code.
Response parameters:
AX = expanded error codes
BH = Error Type
BL = recommended operations
CH = error location

AH = 5A
Function: create a temporary file
Call parameters:
CX = file attributes
DS: DX = ASCIIZ string address
Response parameters:
Success: AX = File Code
Failed: AX = Error Code

AH = 5B
Function: Creates a new file.
Call parameters:
CX = file attributes
DS: DX = ASCIZ string address
Response parameters:
Success: AX = File Code
Failed: AX = Error Code

AH = 5C
Function: Controls file access.
Call parameters:
AL = 00: Block
01: Enabled
BX = File Code
CX: DX = file displacement
SI: DI = file length

AH = 62
Function: obtains the prefix of a program segment.
Response parameters:
BX = PSP address


What registers should the DOS system function call function code be placed in?

In typical DOS Function calls, the function number should be placed in AH in advance according to different functions during function calls, and the specified call parameters should be put in other registers.

What do DOS functions call? I am a newbie and need to be easy to understand,

What does DOS function call mean? I am a newbie and need to be easy to understand ,...
How often is the stool of the umeng league still low ?? Why? Tomb Delta death? Commands in zookeeper OS. These commands are in E. The Chinese version of DOS is only available on some boot discs, but not comprehensive. It is difficult to understand them easily.

Anonymous ?? <Span class = "tm"> 6-22 </span>
</P>
<Div class = "B bt2"> <div class = "bt bg 1 ft"> other answers </div>
<P class = "ft p1"> it is a system command. Before WINDOWS is installed, the operating system is a DOS system. To complete some work, it is completed by executing the DOS command. After the ipvs system is enabled, we don't need to use the doscommand any more. We can simply use the mouse, click the icon or file to complete the work. DOS function call refers to re-enabling the DOS Function to execute a certain task.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.