The ideas behind the BIOS

The ROM-BIOS has a clumsy name that only hints at what it's all
about: ROM-BIOS is short for Read-Only Memory Basic Input/Output Sys­
tem. Ignore the name and concentrate on what it does for us. The
ROM-BIOS is a set of programs built into the computer that perform the
most basic, low-level and intimate control and supervision operations for
the computer.
Software works best when it's designed to operate in layers, with each
layer performing some task and relieving the other layers above of any
concern for the details within that task. Following this philosophy, the
ROM-BIOS is the bottom-most layer, the layer that underlies all other
software and operations in the computer. The task of the ROM-BIOS is to
take care of the immediate needs of the computer's hardware and to isolate
all other programs from the details of how the hardware works.
Fundamentally the ROM-BIOS is an interface, a connector and trans­
lator, between the computer's hardware and the software programs that we
run on our computers. Properly speaking, the ROM-BIOS is simply a pro­
gram like any other. But if we want to understand the ROM-BIOS, we
should think of it as if it weren't really just software, but some kind of
hybrid, something halfway between hardware and software. Functionally,
that's exactly what the ROM-BIOS is: a bridge between the computer's
hardware and our other software.
What makes the ROM-BIOS so special? What does it do that makes it
seem to be midway between hardware and software?
The answer lies in what the ROM-BIOS has to do and how it does it.
What the ROM-BIOS has to do is to directly control the hardware and to
respond to any demands that the hardware makes. For the most part, all
of the PC's component parts are controlled by the process of sending them
commands or parameter settings, through the ports, with each part of the
circuitry having its own special port numbers that it responds to.
Now we already know that there are many important aspects of the
hardware that don't work through ports, such as the memory addresses that
are used to control what appears on the display screen. Most of the excep­
tions to the general rule that the hardware is controlled through the ports are
exactly the part of the computer which it's OK for our programs to work
with directly-that is, exactly the parts that the ROM-BIOS doesn't have to
supervise for us.
Now I don't want you to get the impression that the ROM-BIOS only
concerns itself with ports: it doesn't. But ports best symbolize what is
special about the ROM-BIOS: it's the software that works most intimately
with the computer's hardware, and it's the software that takes care of hard­
ware details (like ports) which the rest of our programs shouldn't have to
touch.