Information Technology Reference
In-Depth Information
2.2.1 Software interrupts
BIOS and the operating system
The Basic Input/Output System (BIOS) communicates directly with the hardware of the
computer. It consists of a set of programs which interface with devices such as keyboards,
displays, printers, serial ports and disk drives. These programs allow the user to write appli-
cation programs that contain calls to these functions, without having to worry about control-
ling them or which type of equipment is being used. Without BIOS, the computer system
would simply consist of a bundle of wires and electronic devices.
There are two main parts to BIOS. The first is the part permanently stored in a ROM (the
ROM BIOS). It is this part that starts the computer (or bootstap) and contains programs
which communicate with resident devices. The second stage is loaded when the operating
system is started. This part is non-permanent.
An operating system allows the user to access the hardware in an easy-to-use manner. It
accepts commands from the keyboard and displays them to the monitor. The Disk Operating
System, or DOS, gained its name from its original purpose of providing a controller for the
computer to access its disk drives. The language of DOS consists of a set of commands
which are entered directly by the user and are interpreted to perform file management tasks,
program execution and system configuration. It makes calls to BIOS to execute these. The
main functions of DOS are to run programs, copy and remove files, create directories, move
within a directory structure and to list files. Microsoft Windows calls BIOS programs di-
rectly.
Interrupt vectors
Interrupt vectors are addresses which inform the interrupt handler as to where to find the
ISR. All interrupts are assigned a number from 0 to 255. The interrupt vectors associated
with each interrupt number are stored in the lower 1024 bytes of PC memory. For example,
interrupt 0 is stored from 0000:0000 to 0000:0003 , interrupt 1 from 0000:0004 to
0000:0007 , and so on. The first two bytes store the offset and the next two store the seg-
ment address. Each interrupt number is assigned a predetermined task, as outlined in Table
2.5. An interrupt can be generated either by external hardware, software, or by the processor.
Interrupts 0, 1, 3, 4, 6 and 7 are generated by the processor. Interrupts from 8 to 15 and inter-
rupt 2 are generated by external hardware. These get the attention of the processor by activat-
ing a interrupt request (IRQ) line. The IRQ0 line connects to the system timer, the keyboard
to IRQ1 , and so on. Most other interrupts are generated by software.
Processor interrupts
The processor-generated interrupts normally occur either when a program causes a certain
type of error or if it is being used in a debug mode. In the debug mode the program can be
made to break from its execution when a break-point occurs. This allows the user to test the
status of the computer. It can also be forced to step through a program one operation at a
time (single-step mode).
Search WWH ::




Custom Search