Anyone with a cpu...

Pages: 12
closed account (z05DSL3A)
Another on from me:

(cpuid; compiled Nov 28 2009 at 13:24:40; version 0.01)
(getting cpu information)
(cpuid calls up to 10 (0xa (ah)) supported)
(extended functions up to 0x80000008 (80000008h) supported)
(warning: clock frequency can be a little inaccurate)
(done)

General information:
        Manufacturer:  Intel
        Vendor string: GenuineIntel
        Brand string:  Genuine Intel(R) CPU           T2050  @ 1.60GHz
Model information:
        Stepping: 8
        Model:    14
        Family:   686
CPU information:
        Cache: L1: 0 KiB        L2: 0 KiB       L3: 0 KiB
        Frequency: 646 MHz

edit:
The L2 cache should be 2MB
Last edited on
Hmm... perhaps I should take another look at my frequency calculating thing.
closed account (z05DSL3A)
I have had a quick look at the specs for the T2050. It uses a Quad Data Rate bus so the effective bus speed of a 166MHz bus is 667MHz.

Edit:
I also can not be sure that it was not running power saving when I ran your prog.

Edit 2:
Just ran it again, making sure power management was off, and got a Frequency of 1586 MHz.
Last edited on
Interesting...

For some reason on my own CPU I get 0, which is bad because if I figure out how to fix it it might flip everything and then the code will only run on my computer :(

Edit: OK, good :)

Damn, cpuid is getting kinda boring now. I wonder if you can do the same for the hard disk, RAM, video card, etc...
Last edited on
I made a new version, if anyone wants to try that out:
http://www.mediafire.com/?sharekey=87c8095b302f26e47f7ec40ada4772a64b0638c3bcd24ca077b784fef9ed9be3
I made a bunch of zip files; but I couldn't make a windows binary :(

I'll make one later, but for now you'll either have to compile it yourself (which will literally take like a second) or whatever...
General information:
	Manufacturer:  Intel
	Vendor string: GenuineIntel
	Brand string:  Intel(R) Core(TM)2 Duo CPU     E7300  @ 2.66GHz
Model information:
	Stepping: 6
	Model:    7
	Family:   686	Type:     0
	CPU information:
	Cache: L1: 0 KiB	L2: 3072 KiB	L3: 0 KiB
	Frequency: 2665 MHz
	Cores:     0 
Hooray! It works alot better! I just did a google search; the E7300 has 3 MIB of L2 cache according to intel. 3072 KiB == 3 MiB! Yay :)
The frequency looks fairly accurate too!

Thanks :)
Now I wonder if we can get those AMD guys back...

I decided to get rid of the little messages; so if any text other than the main output shows up; it means there's an error.

For the record; I do plan to write a GUI eventually, but I hate writing them. I find it boring and usually pointless -- all they do is waste disk space and, if you run them, memory -- but most people prefer to look at a GUI and I feel like I need to write one as I've only ever written a GUI once; and that was with pure windows API...

I made a windows binary with mingw-gcc; it's really big for some reason (414KiB!), I guess because I compiled it with mingw on Wine. I've heard mingw makes large executables.

Same location as before: http://www.mediafire.com/?sharekey=87c8095b302f26e47f7ec40ada4772a64b0638c3bcd24ca077b784fef9ed9be3
Last edited on
I made a Windows executable with MingW, it is 28kb. Eclipse compiled it with
gcc -O3 -Wall -c -fmessage-length=0 -osrc\cpuid.o ..\src\cpuid.c
gcc -O3 -Wall -c -fmessage-length=0 -osrc\main.o ..\src\main.c
gcc -ochristest.exe src\main.o src\cpuid.o
I used
-O3 -Os -fexpensive-optimizations
now it's 413.3KiB.
Yeah!

:l

I'll get back on windows eventually and compile a new one. Maybe tomorrow.
Some AMD info.
1
2
3
4
5
6
7
8
9
10
11
12
13
General information:
        Manufacturer:  AMD
        Vendor string: AuthenticAMD
        Brand string:  AMD Turion(tm) X2 Dual-Core Mobile RM-70
Model information:
        Stepping: 1
        Model:    3
        Family:   1586
        Type:     0
CPU information:
        Cache: L1: 128 KiB      L2: 0 KiB       L3: 0 KiB
        Frequency: 1993 MHz
        Cores:     0
Last edited on
Thanks, that's cool.
That's strange. MinGW usually generates (for some reason) smaller executables for C than for C++. Normally of the size R0mai got.
@helios
I'd guess that's because C++ has a lot of stuff it needs added for the STL to work.

@garob
Thanks.
Last edited on
I'm getting a 7 kiB binary for a windows executable now. I compiled like this:
gcc -O3 -Os -fexpensive-optimizations -fomit-frame-pointer -fmessage-length=0 -s -o cpuid *.c
i386-mingw32-gcc -O3 -Os -fexpensive-optimizations -fomit-frame-pointer -fmessage-length=0 -s -o cpuid.exe *.c

I get a 5.4 kiB ELF and a 7 kiB PE file.

If only I could remember the switch to strip binary symbols...

Anyway; I wrote a shell script which outputs:

cpuid-Dec-6-2009.7z      : 9.8 kiB
cpuid-Dec-6-2009.tar.gz  : 10.9 kiB
cpuid-Dec-6-2009.tar.bz2 : 11.1 kiB
cpuid-Dec-6-2009.zip     : 1.6 kiB [ it's not working :( ]


I'm going to find a free server, so I can automatically rebuild the program every day and upload the new version. Then I can do this for every program I write; and take over the world spread my boring little programs to the masses.

Edit: http://synonymous.byethost9.com/
Don't ask about why the url is so retarded.
Last edited on
Topic archived. No new replies allowed.
Pages: 12