INT 20H ( 0x20) --> Terminate process
Call with: CS = segment address of program segment prefix
Returns: Nothing
Comments:
It terminates the current process. This is one of several methods that a program can use to perform a final exit. You can also use functions (00H or 31H or 4CH) of INT 21H or simply INT 27H to perform a final exit where functions 31H and 4CH of INT 21H are generally preferred because they allow a return code to be passed to the parent process.
It is recommended that if you have used File Control Blocks (FCBs) to write any file, you should close the file first otherwise you may lose the data because in the action of final exit all the memory that was taken by the process is released, File buffers are flushed and any open handles for files or devices owned by the process are closed.
Therefore if you have open handles for file you may lose the data.
INT 21H (0x21)
Function 00H (0x00) --> Terminate process
Call with: AH = 00H
CS = segment address of program segment prefix
Returns: Nothing
Comments:
This interrupt terminates the current process. This is one of several methods that a program can use to perform a final exit. For more information see INT 20H
INT 21H (0x21)
Function 01H (0x01) --> Character input with echo
Call with: AH = 01H
Returns: AL = 8-bit input data
Comments:
This interrupt reads a character from the standard input device such as keyboard and echoes it to the standard output device. If no character is ready, waits until one is available.
INT 21H (0x21)
Function 02H (0x02) --> Character output
Call with: AH = 02H
DL = 8-bit data for output
Returns: Nothing
Comments:
It outputs a character to the standard output device. Output can be redirected. If output is redirected, there is no way to detect disk full.
Strings can also be sent strings to the display by performing a write (INT 21H, Function 40H) using the predefined handle for the standard output (0001H), if output has not been redirected, or a handle obtained the logical device CON.
|