386SX vs. DX, 486SLC vs. DLC - ET bit in CR0

Copyright 1996 by Grzegorz Mazur
All the brand names used here belong to their owners.


There is a funny story about this test: Intels says it should never be used because its results are unpredictable (the CPU may hang). Texas Instruments shows it as The Right Method to distinguish 486SLC from DLC. Whom to believe?... Well, according to my experience the CPU never hangs and nothing dangerous happens.


Some background

When the original 80386 was created (386DX name was not know at that time) it was designed in such way that it could work with either 80287 or 80387 FPU. To inform the CPU about FPU type, the system was responsible for setting the appropriate bit in MSW (CR0). This bit is called ET (Extension Type); it is bit 4 of CR0. Todays 386DX do not cooperate with 80287. 387SX CPUs don't have this capability neither. For compatibility reasons the bit can be set on any 386-like CPU with 32-bit bus, but not on these with 16-bit bus.


The routine

is very simple, but it is guaranteed to work only in real mode. The experience shows thai it also works properly under EMM386 and Windows 95; I don't have any experience with Unix-like systems. It should not be applied to other CPUs than listed here.

We shall get MSW, save it, and try to change bit 4. If we succeed, we have old 80386, 386DX or 486DLC. If we can't toggle the bit, we have 386SX or 486SLC.

Remember to restore MSW...


Copyright 1996 by Grzegorz Mazur