Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!sri-spam!ames!amdcad!amd!ching From: ching@amd.UUCP (Mike Ching) Newsgroups: comp.sys.ibm.pc Subject: Re: Do you know how ? Would you mind telling me ? Message-ID: <4271@amd.UUCP> Date: Tue, 28-Jul-87 12:36:26 EDT Article-I.D.: amd.4271 Posted: Tue Jul 28 12:36:26 1987 Date-Received: Wed, 29-Jul-87 07:25:49 EDT References: <732@pc.ecn.purdue.edu> Reply-To: ching@amd.UUCP (Mike Ching) Distribution: world Organization: Advanced Micro Devices Lines: 24 In article <732@pc.ecn.purdue.edu> jmoore@pc.ecn.purdue.edu (James D Moore) writes: > > What I would like to do now is to include code that would do the following. > >(1) Determine the CPU speed. What I mean here is if a person has a > turbo XT like I have determine under what clock speed they are > using (4.77 or 8 or ??). >(2) Also if possible determine the CPU type (8086,8088,80186,80286,80386) > #1 can be done by measuring the number of instructions executed between timer interrupts. This assumes #2 has been done. #2 can be done by testing various instructions that were *fixed* in the later CPUs. The trickiest test differentiates between 8 and 16 bit versions by modifying the code that should already be in the prefetch queue in a 8086 (so the original code is executed) but not yet fetched in a 8088 (so the modified instruction is executed). There are also tests for the NEC V20 and V30. I've started picking apart some benchmark programs for some of this info but it's a low priority. mike ching