Xref: utzoo comp.lang.pascal:5895 comp.sys.ibm.pc.hardware:6973 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!njin!njitgw.njit.edu!mars.njit.edu!cd5340 From: cd5340@mars.njit.edu (David Charlap) Newsgroups: comp.lang.pascal,comp.sys.ibm.pc.hardware Subject: Re: 8086 vs. 80286 : How to detect which one? Message-ID: <1991Mar28.045959.28704@njitgw.njit.edu> Date: 28 Mar 91 04:59:59 GMT References: <1991Mar26.223512.1@rulcri.leidenuniv.nl> Sender: root@njitgw.njit.edu (System PRIVILEGED Account) Organization: New Jersey Institute of Technology Lines: 33 Nntp-Posting-Host: mars.njit.edu In article <1991Mar26.223512.1@rulcri.leidenuniv.nl> vereijken@rulcri.leidenuniv.nl (Jan Joris Vereijken) writes: > >8088 / 8086 / 80188 / 80186 / V20 / V30 / 80286 / 80386 / 80486 > >Ambitious, eh? Well, it should be possible: for example Norton System Info >gived the processor type. Well... You can try executing a 386-specific instruction, and see if it executed properly. An innocuous instruction like BT (bit test) shouldn't clobber another processor type. Do the same for the 186 test. Try the INS (read a string from a port) from a port whose contents you already know (try getting the video mode status and compare it to the current mode, maybe). Or to be even safer, use an extended 8088 instruction, like the new form of ROL and ROR (rotate bits) with an offset other than 1. To tell a 286 from a 186, you'll have to kick it into protected mode, see if it worked or not, and then do a chip reset to get it out of protected mode. To tell a V20/V30 from an 8088/8086, ya got me. Maybe Peter Norton mentions it in his book, since his program can tell them apart. I can't find any way in the Turbo Assembler book. The book doesn't mention the '486, either, so I don't know what you'd do about that one either. In any case, you have to do something that is (more or less) unique to the chip you're testing for. -- David Charlap "Invention is the mother of necessity" cd5340@mars.njit.edu "Necessity is a mother" Operators are standing by "mother!" - Daffy Duck