If you use ROM BIOS functions in your program, you must check the machine model at runtime to be sure that the functions your program needs are actually available. There is a machine ID byte at F000:FFFEH whose value is interpreted as follows:
F8H PS/2 Models 70 and 80
F9H PC Convertible
FAH PS/2 Model 30
FBH PC/XT (later models)
FCH PC/AT, PC/XT-286, PS/2 Models 50 and 60
FDH PCjr
FEH PC/XT (early models)
FFH PC "Classic"
In some cases, submodels can be identified; see Int 15H Function C0H on page 573. Section 3 of this book contains version-dependency information for each ROM BIOS function.
When writing your own direct video drivers, you must determine the type and capabilities of the video adapter by a combination of Int 10H calls, reading ports, and inspection of the ROM BIOS data area at 0040:0000H and the memory reserved for the EGA or VGA ROM BIOS, among other things. The techniques required are beyond the scope of this book but are well explained in Programmer's Guide to PC and PS/2 Video Systems (Microsoft Press, 1987).