jmoore@pc.ecn.purdue.edu (James D Moore) (07/27/87)
I recently wrote a program (maily to see if I could do it) that would tell me what the configuration of a system was for any PC/XT/AT. I am doing a major rewrite of this program and would like to add some new interesting features. I have been able to determine the number of serial, parallel, disks, type of computer(PCjr,PC,XT,AT), presence of 8087 chip and the version of dos. I also know how I can determine what the type a disk is (DS/DD, high density, hard disk), what version of ROM is present and some other micellanious information. 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) I am uncertain how to do the first. I don't know if is possible to do the second one. I don't realy think the last one is possible but thought I would ask. I have mentioned to several people here that I have done this and they seem interested. I know there are some programs out there that will do similar things but I was curious how it was done. Here at work we have several PC/XT/AT systems and I am occasionaly asked which machines are set up with what so I figured I could use this to check some of the above features. Any help with the above will be appreciated. Jim Moore jmoore@gb.ecn.purdue.edu
ching@amd.UUCP (Mike Ching) (07/28/87)
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
ralf@b.gp.cs.cmu.edu (Ralf Brown) (07/30/87)
In article <4271@amd.UUCP> ching@amd.UUCP (Mike Ching) writes: >In article <732@pc.ecn.purdue.edu> jmoore@pc.ecn.purdue.edu (James D Moore) writes: >>(2) Also if possible determine the CPU type (8086,8088,80186,80286,80386) > >#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. > Exactly these techniques are used by CPUID, one of the many fine programs put out by PC Magazine and PC Tech Journal (this one appeared about 18 months ago). You should be able to find it on most any IBM-oriented BBS, and also in the SIMTEL20 archives as PD:<MSDOS.SYSUTL>CPUID.ASM. It does not detect 386's; that may require going into protected mode and seeing if clearing the protected mode flag returns you to real mode (286's require a reset--there is an ugly kludge in AT BIOSes to let you continue on return to real mode). -- -=-=-=-=-=-=-=-= {harvard,seismo,ucbvax}!b.gp.cs.cmu.edu!ralf =-=-=-=-=-=-=-=- ARPAnet: RALF@B.GP.CS.CMU.EDU BITnet: RALF%B.GP.CS.CMU.EDU@CMUCCVMA AT&Tnet: (412) 268-3053 (school) FIDOnet: Ralf Brown at 129/31 DISCLAIMER? Who ever said I claimed anything? "I do not fear computers. I fear the lack of them..." -- Isaac Asimov
unicorn@pnet01.CTS.COM (Rich Herzog) (07/30/87)
> possible to determine the CPU type (8086 ...)
Sure it's possible. It's just tricky. PC Tech Journal published a
program to do this maybe a year ago. Check those back issues ...
aiv@euraiv1.UUCP (Eelco van Asperen) (07/30/87)
in article <732@pc.ecn.purdue.edu>, jmoore@pc.ecn.purdue.edu (James D Moore) says: > > (2) Also if possible determine the CPU type (8086,8088,80186,80286,80386) > there is a program known as CPUID floating around the BBS's; I think I got it from SIMTEL (before they shutdown the mail-server; PLEASE PLEASE re-enable it !) [sorry for the intermezzo]. Unfortunately, this is stored on my PC at home (I read this group in my boss's time :-). If you want it, send me a message and I'll dig it up. Eelco van Asperen. -----------------------------------------+------------------------------------- Erasmus University Rotterdam |uucp:mcvax!{eurifb,olnl1}!euraiv1!aiv Fac. of Economics, Computer Science Dept.|earn:asperen@hroeur5 PO.box 1738 / 3000 DR Rotterdam | T H E N E T H E R L A N D S |(this space intentionally left blank) -----------------------------------------+-------------------------------------