Solved

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

Posted on 2001-08-14
9
227 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
Comment Utility
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
Comment Utility
Why don't you buy C++ for linux ?

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

Author Comment

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

0
 
LVL 5

Expert Comment

by:paulqna
Comment Utility
directly load registers, and do shift operations library code
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 5

Expert Comment

by:paulqna
Comment Utility
Sorry for that last comment...
0
 
LVL 5

Accepted Solution

by:
bryanh earned 25 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now