Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

DOS and BIOS Interrupts

D. Murali Krishna ECE,SVECW.

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

A few things we can t do using ROM-BIOS


It is not possible to provide ability to load and execute programs directly It is not possible to store data on the diskette organized as logic files. ROM-BIOS has no command interpreter to allow us to copy files, print files, delete files.

The DOS will provide these services.

When the computer is turned ON,


We expect to see a message or a prompt. We expect to be able to look at the diskette directory to see what data files or programs the diskette contains. We expect to run a program by typing its name.

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.

The services provided by DOS can be grouped onto following categories.


1) Character Device I/O: This group includes routines that input or output characters to character oriented devices such as the printer, the display monitor, and the keyboard. File Management: This group includes routines that manage logical files, allowing you to create, read, write and delete files. Memory Management: This group includes routines that allow us to change, allocate, and deallocate memory. Directory Management: This group includes routines that permit us to create, change search, and delete directories. Executive Functions: This group includes routines that allow us to load and execute programs, to overlay programs, to retrieve error codes from completed programs, and to execute commands. Command Interpreter: This routine is in action whenever a prompt is present on the screen. It interprets commands and executes DOS functions, utility programs, application programs, depending upon the command. Utility Programs: These programs facility to copy, delete provides the DISKCOPY, DIR and many other DOS commands.

2) 3) 4) 5)

6)

7)

Comparison b/w DOS and ROM-BIOS


DOS
1. 2. It is loaded form the bootable diskette. DOS program offer different degree of flexibility, portability, and hardware independence It has ability to load and execute programs directly DOS can store data on the diskette organized as a logical files. DOS has a command-interpreter to allow us to copy files, print files and delete files. 1. 2.

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

Function Call 09: Display a character string


Input parameter: Function:
AH=09, DS:DX = Address of character string

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

Function Call 0AH: Buffered key board input


Input parameter: Function:
First byte of buffer = Size of buffer up to 255. The ASCII codes of characters received from the keyboard are stored in keyboard buffer starting from third byte onwards. It will continue to receive the characters till specified number of characters are received (or) ENTER key is pressed, which ever is earlier. AH=0AH DS:DX = Address of keyboard input buffer

Output Parameter:
Second byte of buffer contain the count of actual number of character received.

You might also like