• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

Accessing 32bit registers from C/C++ compilers in Lin

Hai,

I have done C/C++ programming in DOS/WIN that access the 32 bit registers and performs operations on them.
I wan't to be able to do the same.

I wan't to directly load registers, and do shift operations.

Is it possible. (Suggest Lib's or code etc!)

I wan't to do this on intel celerons. (or any Intel bit 32 cpu for that matter).

Sincerely,
Bhaskar
Thanx for your time.
0
absub1
Asked:
absub1
1 Solution
 
absub1Author Commented:
I don't mind if I have to be a previlaged user to do this. But I don't think that will be needed.
0
 
paulqnaCommented:
Why don't you buy C++ for linux ?

General C++ and linux:
http://users.cyberelectric.net.au/%7Ecollins/
0
 
absub1Author Commented:
paulgna, I have Linux and the c/c++ compilers also. I want awnser to question in my text. Plz read fully.

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
paulqnaCommented:
directly load registers, and do shift operations library code
0
 
paulqnaCommented:
Sorry for that last comment...
0
 
bryanhCommented:
I don't know how you access 32 bit registers in C/C++ in DOS/WIN, so I don't necessarily know what you're asking for.

But in the GNU compiler, you can manipulate registers with assembler code embedded in an otherwise C or C++ program.  See <http://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_5.html#SEC102>
.
0
 
rasarajaCommented:
U can use assembly language,registers eax,ebx are 32 bit ( e for enhanced ) .
so mov eax,(32 bit val) will work
Hope that helps.
0
 
jmcgOwnerCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: bryanh {http:#6399468}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now