Article View: net.micro.pc
Article #6069Re: Re: Identifying an iAPX series processo
From: Ihor Kinal
Date: Wed, 26 Mar 1986 13:21
Date: Wed, 26 Mar 1986 13:21
34 lines
2183 bytes
2183 bytes
>
> > Question: is it possible to identify in software the type of processor
> > a program is running on (assuming MS-DOS here...)? I would like to
> > know whether it's an 8088, 8086, 80188, 80186 or an 80286. If it
> > is possible, how do I do it?
>
> Yes, it is possible, at least to distinguish between {8086|8088},
> {80186|80188}, and 80286 flavors of processors. The 8086 (and the 8088,
> I guess) don't mask shift counts, so if you shift a 2 in AX by a number
> of places greater than 16 (?or 32, maybe -- 32 works for sure) you'll
> get a zero. On the 186 and 286 you'll get a non-zero value. To
> distinguish between the 186 and the 286, do a PUSH SP, pop it into
> another register and compare it. The 186 pushes the SP value *after*
> it's been decremented, the 286 pushes the SP value *before* it's
> decremented.
>
> I don't know if you can tell if you're on a *8 or *6 version processor,
> though.
>
> Good luck!
> Kevin Dack
> ..ctvax!trsvax!kevin
The latest issue of the PC TECH Journal (April 86) discusses these issues
(including differentiating from the NEC 20/30, and includes a test
program. Their way off differentiating an 8/6 is to make use of the
fact that they have different length instruction buffers.
Ihor Kinal
ihnp4!mtung!ijk
P.S. One discrepancy: the article claims that in a 286, it's
no longer legal to say MOV CS, AX; nor can one say POP CS.
Using DEBUG, I tried both; the MOV CS,AX seemed ok, the POP CS
totally hung the machine. If both were true, then how could a program
reset the CS register????
Technical Details
Message-ID:
<685@mtung.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!akguc!mtunh!mtung!ijkReferences:
<7901@watrose.UUCP> <53500027@trsvax>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site mtung.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!akguc!mtunh!mtung!ijk From: ijk@mtung.UUCP (Ihor Kinal) Newsgroups: net.micro.pc Subject: Re: Re: Identifying an iAPX series processo Message-ID: <685@mtung.UUCP> Date: Wed, 26-Mar-86 08:21:41 EST Article-I.D.: mtung.685 Posted: Wed Mar 26 08:21:41 1986 Date-Received: Sat, 29-Mar-86 01:14:12 EST References: <7901@watrose.UUCP> <53500027@trsvax> Organization: AT&T ISL Holmdel NJ USA Lines: 34