BIOS AND DOS INTERRUPTS OF INTEL 8086 MICROPROCESSOR Click to edit Master subtitle style B Y Suhas K R II Sem M.Sc Electronics Science Bangalore University 7/29/12
Functional layers of a Genera Generall Computers Computers can be broadly divided into four layers Application
Program layer, is a top layer of general computer, which provide us Application programs like Text Text Editors, Games ,GUI etc. Which is framed generally using High level languages.
Application Programs
DOS Functions
BIOS Services
DOS BIOS Hardware
is core layer of computer ,it consist of
Hardware 7/29/12
Basic Input/output System (BIOS) In
IBM PC compatible computers, the basic input/output system also known as the System BIOS or ROM BIOS.
The
primary function f unction of the t he BIOS is to set up the hardware , load and start an operating system.
The
BIOS is to initialize and identify system devices such as the display card, keyboard and mouse, hard disk, other hardware.
This
process is known as booting, or booting
up. software
is
stored
7/29/12
BIOS Interrupts While using computer, we frequently need input and output functions for reading, Displaying, accessing data in disk etc. All
these functions are predefined by computer manufacturer and made available in the system ROM with other BIOS functions.
They They
are are stored stored in system system ROM ROM in locatio locations ns FE000H to FFFFFH.
The
progr program ammer mer can make make use of all this already existing large number of BIOS services for accessing I/O devices rather than writing procedures again in his programs 7/29/12
The
BIOS services can be broadly classified classified into the following categories Video I/O Services,
This category category are are used used to contr control ol te text and and graph graphics ics on the PC’s display screen.(INT 10h) System
Services,
This category category are are used used to obtain obtain the encode encoded d list list of of the standard hardware equipments connected to computer. (INT 11h) Disk
I/O Services,
This are used used to perfor perform m I/O I/O operatio operations ns on disk disk drives. (INT 13h) RS
232 Serial I/O services,
7/29/12
Keyboard
I/O services,
Invokes services to receive characters and status of keyboard. (INT 15h) Printer
services,
Initialize the parallel printer port, control output to a printer and read the printer’s status. (INT 17h) Date/Time
services,
These These functio functions ns are used used to read read or or set set the the time time maintained by BIOS. (INT 1Ah) Miscellaneous
services,
Used for some special purposes 7/29/12
MS Disk Operating System (DOS)
MS-DOS
was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC x86-based personal computers.
Originally
MS-DOS was designed to be an operating system that could run on any 8086family computer. computer. Each computer would have its own distinct hardware and its own version of MSDOS.
Today, Today,
MS-DOS is rarely rarely used for desktop computing. Since the release of Windows 95, it was integrated as a full product used for bootstrapping and troubleshooting, 7/29/12 and no
DOS Interrupts Like wise BIOS, DOS as number of routines which a programmer can use in his programs. It
as collection of procedures to perform services such as formatting disk, creating disk files, reading or writing files, reading from key board and writing on to display etc.
Working
with DOS is more user friendly than working with BIOS .But DOS intern use large number of of BIOS to provide these desired services.
DOS
allows the programmer to use these services in his program using INT 21H instruction.
Programs
written in DOS is generally portable. But computer system should have DOS operating system for the program Portable. Thorough knowledge of the I/O devices is not necessary while writing programs.
Execution
speed is little slow compared to that of direct 7/29/12 access of hardware, or BIOS services, because DOS services
Examples of BIOS Services SET
VIDEO MODE , INT 10H FUNCTION
00H Sets the video display mode Invoked Invoked with : register AH=00h register AL=mode number CODE SEGMENT START START::
MOV AH AH,0 ,00H 0H
MOV AL,00H ;00H(TEXT, 16 GRAY COLOURS,40X25) 7/29/12,40X25) ;01H(TEXT
WRITE
CHARACTER CHARACTER AND ITS ATTIBUTES ATTIBUTES
Obtains the ASCII code for the character at the current current cursor position. Invoked with : Register AH=09H : Register BH=Video page number(optional) : Register BL=Attribute byte : Register Register CX=Number of characters CODE SEGMENT 7/29/12
Some examples of DOS services DISPLAY
CHARACTER
Display character at the standard output device Invoked Invoked with : Register Ah=02H Register DL=ASCII Code Returns
: Nothing
CODE SEGMENT
STAR START T
7/29/12
MOV AH,02H AH,02H ;DISP ;DISPL LAYS CHARACTER CHARACTER
CHARACTER
INPUT WITHOUT ECHO
Reads character without echoing it on the standard output of device Invoked Invoked with : Register Ah=07H Returns Code
: Register AL=Character ASCII
CODE SEGMENT
STAR START T: MOV AH,07H ;READS ;READS CHARACTER WITH OUT 7/29/12
GET
DATE
Obtains the month ,year ,day and day of the week as maintained by DOS Invoked Invoked with : Register Register Ah=2AH Ah= 2AH Returns : Register egis ter AL=day of the week (0 Sunday) : Register CX=year : Register DH=month : Register DL=day
CODE SEGMENT
7/29/12
GET
TIME
Obtains the time(hh,mm,ss,ss/100) Invoked with : Register Ah=2cH Returns
: Register egist er CH=HH (0 through 23) : Register CL=MM(0 through 59) : Register DH=SS(0 through 59) : Register DL=SS/100
CODE SEGMENT MOV AH,2CH ;PICKS CURRENT TIME
7/29/12
7/29/12