Solved

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

Posted on 2001-08-14
9
228 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
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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

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 demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

810 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