Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!pt.cs.cmu.edu!b.gp.cs.cmu.edu!Ralf.Brown@B.GP.CS.CMU.EDU From: Ralf.Brown@B.GP.CS.CMU.EDU Newsgroups: comp.os.msdos.programmer Subject: Re: Detecting an 80486 Message-ID: <26a858b9@ralf> Date: 21 Jul 90 13:29:29 GMT Sender: ralf@b.gp.cs.cmu.edu Organization: Carnegie Mellon University School of Computer Science Lines: 25 In-Reply-To: <1990Jul20.230335.22816@ddsw1.MCS.COM> In article <1990Jul20.230335.22816@ddsw1.MCS.COM>, andyross@ddsw1.MCS.COM (Andrew Rossmann) wrote: }In article <315@bally.Bally.COM> pete@bally.UUCP (exilied in my own office) writes: }>In article <1990Jul19.025150.6150@looking.on.ca> brad@looking.on.ca (Brad Templeton) writes: } In my Infoplus program, the 286/386/486 are detected by trapping the }invalid opcode interrupt, and then trying instructions. For the 486, I use }XADD DX,DX. This is new on the 486, and exchanges the registers before }doing the addition. } For the 386, I now use MOV EDX,EDX, which is 32-bit do-nothing! (It used }to use an instruction that read some special registers. This caused major }problems with most EMS emulators!) } For the 286, it tries the SMSW DX instruction (whatever that does.) } The code come from a program by Robert Collins, and I just made a few }changes to fit INFOPLUS (and fix the 386 problem!) Unfortunately, your program will fail miserably on my system (and about a million others), because I am running QEMM-386. QEMM runs in protected mode with DOS in virtual-86 mode. Any invalid opcode exception that your program generated invokes the QEMM exception handler, NOT YOURS. And the QEMM exception handler gives the choice of terminating or rebooting. I expect similar behavior from 386^Max, CEMM, AllCharge386, MICEMM, .... -- UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=- 412-268-3053 (school) -=- FAX: ask ARPA: ralf@cs.cmu.edu BIT: ralf%cs.cmu.edu@CMUCCVMA FIDO: 1:129/3.1 Disclaimer? | I was gratified to be able to answer promptly, and I did. What's that? | I said I didn't know. --Mark Twain