LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-05-2007, 01:21 PM   #1
strycnine
Member
 
Registered: Jul 2006
Location: Romania
Distribution: Fedora 12
Posts: 160

Rep: Reputation: 31
cpuid


Code:
.section .data
output:
	.ascii "The procesor Type is 'xxxxxxxxxxxx' \n"
.section .text
.globl _start
_start:
	nop
	movl $1, %eax
	cpuid
	movl $output, %edi
	movl %ebx, 27(%edi)
	movl %edx, 31(%edi)
	movl %ecx, 35(%edi)
	movl $4, %eax
	movl $1, %ebx
	movl $output, %ecx
	movl $42, %edx
	int $0x80
	movl $1, %eax
        movl $0, %ebx
        int $0x80
I took this program form a book, and it must print me 'Procesor Type, family, model, and stepping information'.
but when I run it :
$./cpuid
$The procesor Type ƒxxxx'
where is the problem?
thx
 
Old 04-05-2007, 03:24 PM   #2
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
I don't know what kind of program that is but you've asked it to actually print 'xxxxxxxxxxxx'... perhaps the 'xxxxxxxxxxxx' was supposed to be something else.

btw, this command will likely give you what you're looking for:
cat /proc/cpuinfo

but if your just practising programming, keep at it and good luck.
cheers
 
Old 04-07-2007, 03:14 AM   #3
strycnine
Member
 
Registered: Jul 2006
Location: Romania
Distribution: Fedora 12
Posts: 160

Original Poster
Rep: Reputation: 31
In the place of the x's must be the stuff I want.
Yout try the program yourself just put 0 in eax.
I tooked the program from the book Professional assembly language.
Where can I find about the AMD Processor?
 
Old 04-08-2007, 05:44 PM   #4
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
try chipgeek
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling CPUID - kernel panic! RedHat 6.2 & AMD CPU rhinds1369 Red Hat 8 11-20-2005 12:44 PM
CPU Utility for Linux (Something like CPUID, Aida32, or etc) timswim78 Linux - Newbie 2 03-13-2005 06:56 PM


All times are GMT -5. The time now is 07:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration