Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  The first job the ROM programs have is to supervise the start-up of the
  computer. Unlike other aspects of the ROM, the start-up routines have
  little to do with programming the PC family--but it is still worthwhile to
  understand what they do.

  The start-up routines perform several tasks:

  .  They run a quick reliability test of the computer (and the ROM
     programs) to ensure everything is in working order.

  .  They initialize the chips and the standard equipment attached to the
     computer.

  .  They set up the interrupt-vector table.

  .  They check to see what optional equipment is attached.

  .  They load the operating system from disk.

  The following paragraphs discuss these tasks in greater detail.

  The reliability test, part of a process known as the Power On Self Test
  (POST), is an important first step in making sure the computer is ready.
  All POST routines are quite brief except for the memory tests, which can
  be annoyingly lengthy in computers that contain a large amount of memory.

  The initialization process is slightly more complex. One routine sets the
  default values for interrupt vectors. These default values either point to
  the standard interrupt handlers located inside the ROM BIOS, or they point
  to do-nothing routines in the ROM BIOS that may later be superseded by the
  operating system or by your own interrupt handlers. Another initialization
  routine determines what equipment is attached to the computer and then
  places a record of it at standard locations in low memory. (We'll be
  discussing this equipment list in more detail later in the chapter.) How
  this information is acquired varies from model to model--for example, in
  the PC it is taken mostly from the settings of two banks of switches
  located on the computer's system board; in the PC/AT and the PS/2s, the
  ROM BIOS reads configuration information from a special nonvolatile memory
  area whose contents are initialized by special setup programs supplied by
  IBM. The POST routines learn about the computer's hardware by a logical
  inspection and test. In effect, the initialization program shouts to each
  possible option, "Are you there?", and listens for a response.

  No matter how it is acquired, the status information is recorded and
  stored in the same way for every model so that your programs can examine
  it. The initialization routines also check for new equipment and
  extensions to ROM. If they find any, they momentarily turn control over to
  the ROM extensions so that they can initialize themselves. The
  initialization routines then continue executing the remaining start-up
  routines (more on this later in the chapter).

  The final part of the start-up procedure, after the POST tests, the
  initialization process, and the incorporation of ROM extensions, is called
  the bootstrap loader. It's a short routine that loads a program from disk.
  In essence, the ROM bootstrap loader attempts to read a disk boot program
  from a disk. If the boot program is successfully read into memory, the ROM
  loader passes control of the computer to it. The disk boot program is
  responsible for loading another, larger disk program, which is usually a
  disk operating system such as DOS, but can be a self-contained and
  self-loading program, such as Microsoft Flight Simulator. If the ROM
  bootstrap loader cannot read a disk's boot program, it either activates
  the built-in ROM BASIC or displays an error message if the disk boot
  program contains an error. As soon as either of these two events occurs,
  the system start-up procedure is finished and the other programs take
  over.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson