Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!husc6!think!ames!ncar!tank!uxc!uxc.cso.uiuc.edu!uxg.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.sys.ibm.pc Subject: 386 run time testing Message-ID: <45900168@uxe.cso.uiuc.edu> Date: 16 Oct 88 17:05:00 GMT Article-I.D.: uxe.45900168 Lines: 14 Nf-ID: #N:uxe.cso.uiuc.edu:45900168:000:643 Nf-From: uxe.cso.uiuc.edu!mcdonald Oct 16 12:05:00 1988 Does anyone out there know a reliable, safe (hopefully not generating traps) method of having a running program (Microsoft C 5.1) determine whether it is running on an 80386 (as opposed to an 8086 or 80286)? I discovered that by coding one 11 line subroutine from my TeX screen previewer in assembler, using real 32 bit moves and shifts, that I can get a 35% speed improvement. (I made my non-386 assembler do this by sticking in db 066h opcode prefixes explicitly.) I would like to put this change in my distributed version, with a run time test to distinguish it from the 8086/80286 version in C. Doug McDonald (mcdonald@uiucuxe)