What is the function of int 21H in assembler?

Updated on technology 2024-03-24
3 answers
  1. Anonymous users2024-02-07

    INT 21 is a DOS function call, and the call function number is placed in AH, and the format is as follows:

    mov ah,fn

    int 21

    The functions corresponding to the function number are as follows:

    Termination of the program (same as int 20h).

    cs=program segment prefix.

    Keyboard input and echo.

    al=Enter characters.

    Display the output. dl=output character.

    Asynchronous communication input.

    al=input data.

    Asynchronous communication output.

    dl = output data.

    Printer output.

    dl=output character.

    Direct console iO

    dl=ff (input).

    dl = character (output).

    al=Enter characters.

    Keyboard input (no echo).

    al=Enter characters.

    Keyboard input (no echo).

    Detect ctrl-break

    al=Enter characters.

    Displays the string.

    ds:dx=string address.

    End string.

    0a keyboard input to the buffer.

    ds:dx = buffer header address.

    ds:dx) = maximum number of characters in the buffer.

    ds:dx+1) = the number of characters entered.

    0b verifies the keyboard status.

    al=00 has input.

    al=ff No input.

    0c to clear the input buffer and.

    Request a specified input function.

    al=Enter the function number.

    1,6,7,8,a)

    0d disk reset.

    Clear the file buffer.

    0e specifies the current default disk drive.

    dl=drive letter 0=a,1=b,..

    al=number of drives.

    0f to open the file.

    ds:DX=FCB first address.

    al=00 file.

    al=ff file not found.

    Close the file. ds:DX=FCB first address.

    al=00 The directory was modified.

    No file found in al=ff directory.

    Wait, I won't list it anymore, you can take a look, it's in the library.

  2. Anonymous users2024-02-06

    INT 21H contains a variety of functions provided by the DOS operating system to the user. One of the most commonly used is the 4ch function, which is to let the program end execution. In addition, there is a number 02 function, display characters, a number 08 function, a reading keyboard, and so on.

  3. Anonymous users2024-02-05

    It is an interrupt call of DOS, for example, mov ah 4ch int 21h is to return the DOS system by assigning a value of 4ch to the AH register, and then calling the INT 21h instruction, the computer will perform the corresponding operation according to the value in the AH register, where 4ch is to return the DOS system, and other values can also be assigned to the AH register, so there are also operations here.

Related questions
11 answers2024-03-24

First of all, ajmp start is an unconditional jump, which is a direct jump to start, and the interrupt entry and pseudo instructions in the middle are not executed when the main program is run normally for the first time, but they are all assembled into instructions** exist in the rom, but they are skipped when executed, but they still exist when they are assembled. >>>More

5 answers2024-03-24

It should meet your requirements.

But there was no way to go to the computer room for experiments. >>>More