[comp.sys.ibm.pc] 386 cpu identification

ray@ole.UUCP (Ray Berry) (03/03/89)

    I'm needing to be able to determine whether an application is running
on a 386 cpu or not.  I have two subroutines, one for 386 cpus, one for
'other'.  
    The approach I'm persuing is to pop 1's into the top four bits of the
flag register, and then pop the flag register into AX to see what "stuck".
    On the 386, I get back '0111'.  On the 286, '0000'; and on the 8088
I get '1111'.  So far, so good. 
    My question is, what happens when you try this on a v20/30?  Anybody
know?  Or can anyone suggest a better approach?  If I am so fortunate as
to be deluged with help I will summarize the best answer back.  Thanks..
-- 
Ray Berry  KB7HT uucp: ...{uw-beaver|uiucuxc}tikal!ole!ray CS: 73407,3152 
Seattle Silicon Corp. 3075 112th Ave NE. Bellevue WA 98004 (206) 828 4422