Microsoft KB Archive/35678
HIMEM.SYS PS/2 Detection Methods PSS ID Number: Q35678 Article last modified on 01-05-1989
The HIMEM.SYS XMS (eXtended Memory Specification) was written to work on an IBM (or 100-percent compatible) PC AT and PS/2 system (with a 80286 or 80386 processor). In the evolution of HIMEM.SYS, the method that this XMS device driver uses to detect whether the system is a PS/2 has changed. This article describes the ways in which HIMEM.SYS looks for this kind of machine and how the method of detection has changed in later versions.
The line between the definitions of an AT system and a PS/2 system can get very blurry. Many OEMs have made AT-compatible systems, but have not yet made PS/2 systems. However, the ROM BIOS of their systems have not remained statically tied to the AT ROM BIOS definition. Many OEMs have taken some of the new services available in the PS/2 ROM BIOS and implemented these services in their newer AT systems. By definition of ROM BIOS services provided, this would make their systems more than an standard AT, but less than a PS/2. Systems with such a blurry line between being an AT or a PS/2 make the way in which a program can precisely detect if a system is a PS/2 very difficult. This explains the change in HIMEM.SYS’s method of PS/2 detection.
In HIMEM.SYS Version 1.00, the driver invokes ROM BIOS interrupt 15H, service AH=C1H (Return Extended BIOS Data Area Segment Address). If this call returns a valid address, HIMEM assumes that the system is a PS/2. Using this particular ROM BIOS service causes problems on some systems. For example, the Compaq 80386sx system supports this ROM BIOS subfunction; however, it is not a PS/2. Therefore, this version of HIMEM.SYS does not properly work with non-PS/2 systems that support this ROM BIOS subfunction.
In HIMEM.SYS Version 1.10, a different method of PS/2 detection is used. The driver invokes ROM BIOS interrupt 15, service AX=C300H (Disable Watchdog Time-Out). Unlike the previous release of HIMEM, this release will properly detect a PS/2 on a Compaq 80386SX, for example.
However, this method of detection has changed again in HIMEM.SYS Version 2.03. This version calls ROM BIOS interrupt 15H, service 0CH (Get System Descriptor Vector). If HIMEM.SYS detects that the system is using a Micro Channel Architecture, it assumes that it is a PS/2 system.
For more information on PS/2 ROM BIOS information, refer to the book “IBM PS/2 and PC BIOS Interface Technical Reference,” part number 68X2260 (available from IBM by calling (800) IBM-PCTB). Another reference that contains similar material is the Microsoft Press book, “Programmer’s Quick Reference Series: IBM ROM BIOS,” by Ray Duncan, ISBN 1-55615-135-7.
The XMS Version 2.00 Distribution Disk contains the source code to HIMEM.SYS. If you are interested in more details on how HIMEM.SYS detects for a PS/2 system (or other systems), look for the module “IsPS2Machine” in the file .ASM.
Copyright Microsoft Corporation 1989.