Solved

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

Posted on 2001-08-14
9
231 Views
Last Modified: 2010-04-21
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
Comment
Question by:absub1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 

Author Comment

by:absub1
ID: 6385720
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
 
LVL 5

Expert Comment

by:paulqna
ID: 6388502
Why don't you buy C++ for linux ?

General C++ and linux:
http://users.cyberelectric.net.au/%7Ecollins/
0
 

Author Comment

by:absub1
ID: 6389160
paulgna, I have Linux and the c/c++ compilers also. I want awnser to question in my text. Plz read fully.

0
Technology Partners: 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!

 
LVL 5

Expert Comment

by:paulqna
ID: 6390987
directly load registers, and do shift operations library code
0
 
LVL 5

Expert Comment

by:paulqna
ID: 6390990
Sorry for that last comment...
0
 
LVL 5

Accepted Solution

by:
bryanh earned 25 total points
ID: 6399468
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
 

Expert Comment

by:rasaraja
ID: 6404927
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
 
LVL 20

Expert Comment

by:jmcg
ID: 9915925
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question