Professional Documents
Culture Documents
2 DOS and BIOS Interrupts by DMK
2 DOS and BIOS Interrupts by DMK
Introduction
In IBM PC, Part of the Operating systems is located in permanent memory (ROM), it is referred as ROM-BIOS (Basic Input/Output System). The other part which is loaded to the RAM during Power-up from hard disk is known as DOS (Disk Operating System).
BIOS:
It is located in an 8K-byte ROM at the top of memory, the address range from FE000H FFFFFH. The program within ROM-BIOS provide the most direct, lowest interaction with various devices in the system. ROM-BIOS contains routines for
1. 2. 3. 4. 5. 6. Power-on self test System Configuration analysis Time of day Print Screen Bootstrap Loader I/O support program for
a. b. c. d. e. Asynchronous Communication Keyboard Diskette Printer Display
Most of these programs are accessible to the assembly language programmer through software interrupt instruction (INT). Design goal for the ROM-BIOS programs is to provide a deviceindependent interface to the various physical devices in the system. Using ROM-BIOS one can
Output the character to various physical devices like the printer (or) the display monitor. Read the data from key board Read or write sectors of data to the diskette
We want to copy programs from one diskette to another, print programs, and delete programs. All these services are provided by group of programs called DOS.
2) 3) 4) 5)
6)
7)
BIOS
It is located in an 8K byte ROM The programs within the ROMBIOS provide the most direct, lowest level interaction with the various devices in the system. Using these programs require hardware knowledge. ROM-BIOS does not have ability to load and execute programs directly. ROM-BIOS cannot store data on the diskette organized as a logical files ROM-BIOS has no commandinterpreter to allow us to copy files, print files, and delete files.
3. 4.
3.
4.
5.
5.
DOS Interrupts:
Function Call 01: Read the keyboard Input parameter : AH=01 Function : Read a character from keyboard. Echo it on CRT screen and return the ASCII code of key pressed in Register AL. Output parameter : AL=ASCII code of character Function Call 02: Display on CRT screen Input Parameter : AH=02 DL= ASCII code of character to be displayed on CRT screen Function : Displays the character available in DL on CRT screen. Function Call 03: Read character from COM1 (Communication port1) Input parameter : AH=03 Function : Reads data from communication port Output parameter : AL=ASCII code of character Function Call 04: Write character to COM1 Input parameter : AH=04 DL=ASCII code of character to be transmitted. Function : Transmit data through communication port Function Call 05: Write to LPT1 (Line printer 1) Input parameter : AH=05 DL=ASCII code of character to be printed Function : Print the character available in DL on printer attached to LPT1
Displays the characters available in the string on CRT screen. It continues prints till a $ (ie.,24H) encountered So string must end with a $ String can contain control characters also The Length of the string can by any
Output Parameter:
Second byte of buffer contain the count of actual number of character received.