INT 20H (0x20) Terminate process INT 21H (0x21) Function 00H (0x00) Terminate process INT 21H (0x21) Function 01H (0x01) Character input with echo INT 21H (0x21) Function 02H (0x02) --> Character output

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

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.

Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20

 
 

page 21 | 22 | 23 | 24 | 25 | 26

Next page
 
 
Data Recovery Book
 
Chapter 1 An Overview of Data Recovery
Chapter 2 Introduction of Hard Disks
Chapter 3 Logical Approach to Disks and OS
Chapter 4 Number Systems
Chapter 5 Introduction of C Programming
Chapter 6 Introduction to Computer Basics
Chapter 7 Necessary DOS Commands
Chapter 8 Disk-BIOS Functions and Interrupts Handling With C
Chapter 9 Handling Large Hard Disks
Chapter 10 Data Recovery From Corrupted Floppy
Chapter 11 Making Backups
Chapter 12 Reading and Modifying MBR with Programming
Chapter 13 Reading and Modifying DBR with Programming
Chapter 14 Programming for “Raw File” Recovery
Chapter 15 Programming for Data Wipers
Chapter 16 Developing more Utilities for Disks
Appendix Glossary of Data Recovery Terms
 
 

Pro Data Doctor

Home

Products

Contact Details

Customer Support

Download Demo

Terms and Conditions

 
Pro Data Doctor