Click here to Skip to main content
15,893,989 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
registers like AX,BX,CX etc are the primary register in assembly language :

mov ax,some value

work good but this doesnt work directly with c because it not defined is any way to access this register in c.

What I have tried:

i try to convert code of obj to c which use dos.h and int86 function,but its no use.
Posted
Updated 3-Apr-16 4:14am
Comments
Patrice T 3-Apr-16 10:45am    
What is your compiler ? what is your OS ?

1 solution

You can't. The compiler abstracts this from your C/C++ code and uses the registers as it see fit.

You CAN, however, if your C/C++ compiler supports Inline Assembly, inside which you can write assembly language code. Read up on it here[^] is you're using Visual Studio.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 3-Apr-16 12:24pm    
Right, a 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900