Category : C Source Code
Archive   : TC130.ZIP
Filename : IBMTYPE.DOC
NAME
ibmtype -- find out type of computer
SYNOPSIS
r = ibmtype();
int r; r = 0 for PC or XT, 1 for PC Jr.,
2 for AT, 3 for unknown type
DESCRIPTION
This function examines the byte in ROM at F000:FFFEh.
For real IBM computers, this should be:
0xff PC
0xfe XT
0xfd JR
0xfc AT
Many close clones will also encode this byte in the above manner,
although there is no requirement for this feature.
CAVEAT
The results of this test should be taken with a grain of salt
the size of Salt Lake City. Even IBM has shipped XTs with
the PC id byte. The NOVAS AT clone correctly has 0xfc,
but the Z-NIX XT clone (which is a very close clone) has 0x05.
Don't depend too heavily on the results being really accurate.
EXAMPLE
r = ibmtype();
if(r == 2) printf("This machine is an AT, maybe!");
This function is found in SMTCx.LIB for the Turbo-C Compiler
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/