Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help again with Registers

Status
Not open for further replies.

Piv

Programmer
Apr 28, 2003
5
AR
How can I do to work with assembler and C??? I need to have access to the contents of Registers and save them. Please answer me with a written code on how to do this.
 
If you want to do inline assembly, we have to know what compiler you have before we can give any code. Typically, it's something like:

Code:
asm
{
    // assembly code
}


The other way would be to just link a C module with an assembly module.
 
It might help to know why you need to fiddle with the processor's registers directly. There are very, very few occasions where it is useful to do this in C (or any other high-level language) and you need to know how C is using the registers. If you change values in some of them (most obviously ss, ds, bp, sp) things will go very wrong.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top