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 ROM BIOS in the PC/AT and in the PS/2s provides a number of hooks.
  These hooks are implemented as interrupt 15H "services," but to use them
  you must write an interrupt 15H handler that processes only these services
  and passes all other interrupt 15H service requests to the ROM BIOS. (See
  Figure 12-12.) This arrangement lets different components of the BIOS
  communicate with each other and with operating-system or user-written
  programs in a consistent manner.

  The ROM BIOS hooks are intended primarily for use in operating systems and
  in programs written to augment operating-system or BIOS functions.
  However, neither DOS nor OS/2 uses these BIOS hooks, and few program
  applications have reason to. Still, you might find it worthwhile to
  examine what the ROM BIOS hooks do, if only to get an idea of how the ROM
  BIOS is put together and how an operating system can interact with it.

               .                         -+
               .                          |
               .                          |
               mov     ah,ServiceNumber   |
               int     15h                |- Executed within ROM BIOS
               .                          |
               .                          |
               .                          |
                                         -+          -+
  Userhandler  PROC  far  ; interrupt 15H vector      |
                          ; points here               |
                                                      |
               .                                      |
               .                                      |
               .                                      |
               cmp     ah,ServiceNumber               |
               je      Service                        |- User-written
               jmp     (to previous INT 15H handler)  |  interupt 15H
                                                      |  handler
  Service                                             |
               .                                      |
               .       (do something useful)          |
               .                                      |
               iret                                   |
  Userhandler  ENDP                                  -+

  Figure 12-12.  How the ROM BIOS hooks can be used.

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