🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer.misc
Article #160

Re: How to detect CPU type and speed from C?

#160
From: Will Rose
Date: Fri, 17 May 1996 00:00
15 lines
1152 bytes
Keith Bennett (kbennett@cpcug.org) wrote:

: Is there a way (within a C program) to detect which CPU is installed in a
: system and what the clock speed is?  Is there any public domain source
: code available for this?

It's pretty much covered in The Undocumented PC, but most of the
work is done in assembler; and you may well need to hit eg. i/o
ports.  It's a long time since I've looked at this, and I don't
have the book here, but I'd check it out.  It's part of the 
Andrew Schulmann (?sp) Undocumented Whatever series.

Will
cwr@crash.cts.com
Technical Details
Message-ID: <4nhbde$4qk@news3.cts.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <4ndisn$dtm@cpcug.org>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cd94,4048d0646749033
X-Google-Attributes: gid10cd94,public
X-Google-Thread: 11307a,4048d0646749033
X-Google-Attributes: gid11307a,public
From: cwr@cts.com (Will Rose)
Subject: Re: How to detect CPU type and speed from C?
Date: 1996/05/17
Message-ID: <4nhbde$4qk@news3.cts.com>
X-Deja-AN: 155257738
references: <4ndisn$dtm@cpcug.org>
organization: CTS Network Services (CTSNET), San Diego, CA
followup-to: comp.os.os2.programmer.misc,bit.listserv.os2-l
newsgroups: comp.os.os2.programmer.misc,bit.listserv.os2-l