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]

  Because the BIOS programs are fixed in memory, they can't be easily
  changed when additions or corrections are needed. This means that ROM
  programs must be tested very carefully before they are frozen onto memory
  chips. Although there is a good chance for serious errors to exist in a
  system's ROM programs, IBM has a fine track record; so far, only small and
  relatively unimportant errors have been found in the PC family's ROM
  programs, and IBM has done well to correct errors by revising the BIOS.

  The different versions of ROM software could present a small challenge to
  programmers who discover that the differences affect the operating
  characteristics of their programs. But an even greater challenge for
  programmers is that the PC, XT, AT, and PS/2s each have a slightly
  different set of ROM BIOS routines.

  To ensure that programs can work with the appropriate ROM programs and the
  right computer, IBM has supplied two identifying markers that are
  permanently available at the end of memory in the system ROM. One marker
  identifies the ROM release date, which can be used to identify the BIOS
  version, and the other gives the machine model. These markers are always
  present in IBM's own machines and you'll also find them supplied by the
  manufacturers of a few PC compatibles. The following paragraphs describe
  these markers in detail.

  The ROM release date can be found in an 8-byte storage area from
  F000:FFF5H to F000:FFFCH (2 bytes before the machine ID byte). It consists
  of ASCII characters in the common American date format; for example,
  06/01/83 stands for June 1, 1983. This release marker is a common feature
  of the IBM personal computers, but is present in only a few IBM
  compatibles. For example, the Compaq Portable I does not have it, but the
  Panasonic Senior Partner does.

  You can look at the release date with DEBUG by using the following
  command:

  DEBUG
  D F000:FFF5 L 8

  Or you can let your program look at the bytes using this technique:

  10 DEF SEG = &HF000
  20 FOR I = 0 TO 7
  30   PRINT CHR$(PEEK(&HFFF5 + I));
  40 NEXT
  50 END

  The model ID is a byte located at F000:FFFEH. This byte identifies which
  model of PC or PS/2 you are using. (See Figure 3-5.) In addition, a ROM
  BIOS service in the PC/AT and PS/2s returns more detailed identification
  information, including the submodel byte listed in the figure. (See
  Chapter 12.)


  Machine            Date     Model    Submodel BIOS      Revision Notes
  --------------------------------------------------------------------------
  PC                 04/24/81 FFH
Not applicable
        00
                     10/19/81 FFH
Not applicable
        01        Some BIOS bugs
                                                          fixed
                     10/27/82 FFH
Not applicable
        02        Upgrade of PC BIOS
                                                          to XT level
  PC/XT              11/08/82 FEH
Not applicable
        00
                     01/10/86 FBH      00       01        256/640 KB system
                                                          board
                     05/09/86 FBH      00       02
  PC/AT              01/10/84 FCH
Not applicable
        00        6 MHz 80286
                     06/10/85 FCH      00       01
                     11/15/85 FCH      01       00        8 MHz 80286
  PS/2 Model 25      06/26/87 FAH      01       00
  PS/2 Model 30      09/02/86 FAH      00       00
                     12/12/86 FAH      00       01
  PS/2 Model 50      02/13/87 FCH      04       00
  PS/2 Model 60      02/13/87 FCH      05       00
  PS/2 Model 80      03/30/87 F8H      00       00        16 MHz 80386
  PS/2 Model 80      10/07/87 F8H      01       00        20 MHz 80386
  PCjr               06/01/83 FDH
Not applicable
        00
  PC Convertible     09/13/85 F9H      00       00
  PC/XT Model        04/21/86 FCH      02       00
  286
  --------------------------------------------------------------------------


  Figure 3-5.  Machine and ROM BIOS version identification.

  It is possible that IBM-compatible computers can be identified in the same
  way, but we do not know of any reliable published information. You may
  need to rely on improvised methods to identify non-IBM compatibles.

  You can examine the machine ID byte with DEBUG by using the following
  command:

  DEBUG
  D F000:FFFE L 1

  A BASIC program can inspect this byte using techniques such as this:

  10 DEF SEG = &HF000
  20 MODEL = PEEK(&HFFFE)
  30 IF MODEL < &HF8 THEN PRINT "I'm not an IBM computer" : STOP
  40 ON (MODEL - &HF7) GOTO 100,110,120,130,140,150,160,170
  100 PRINT "I'm a PS/2 Model 80" : STOP
  110 PRINT "I'm a PC convertible" : STOP
  120 PRINT "I'm a PS/2 Model 30" : STOP
  130 PRINT "I'm a PC/XT" : STOP
  140 PRINT "I'm an 80286-based machine (PC/AT, PS/2 Model 50 or 60)" :
             STOP
  150 PRINT "I'm a PCjr" : STOP
  160 PRINT "I'm a PC/XT" : STOP
  170 PRINT "I'm a PC" : STOP

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