I know that there is "CPUID" to classify the Pentium class CPU. How about 8086, 80286, 80386, and 80486?
Thanks.
CPU detection code
RE:CPU detection code
Check out:
http://grafi.ii.pw.edu.pl/gbm/x86/x86id.html
It's got info on how to detect all forms of Intel CPUs, with and/or without CPUID.
Essentially, you're testing for bits that can be set on newer processors, but cannot be set on older ones. Or, in the case of the 8086, you're check for defined behaviour in shifting past its limits.
Why you'd want to detect anything prior to a 386, though, I don't know... if you're writting a pmode OS, a simple 386+ routine would probably do (perhaps a Pentium+ detect if you use pentium specific opcodes, and/or 4MB pages).
Hope that helps,
Jeff
http://grafi.ii.pw.edu.pl/gbm/x86/x86id.html
It's got info on how to detect all forms of Intel CPUs, with and/or without CPUID.
Essentially, you're testing for bits that can be set on newer processors, but cannot be set on older ones. Or, in the case of the 8086, you're check for defined behaviour in shifting past its limits.
Why you'd want to detect anything prior to a 386, though, I don't know... if you're writting a pmode OS, a simple 386+ routine would probably do (perhaps a Pentium+ detect if you use pentium specific opcodes, and/or 4MB pages).
Hope that helps,
Jeff