V
volvox
hi, is it possible to access protected mode registers (EAX ,
EBX,ECX...) via assembly in C .
EBX,ECX...) via assembly in C .
volvox said:hi, is it possible to access protected mode registers (EAX ,
EBX,ECX...) via assembly in C .
volvox said:hi, is it possible to access protected mode registers (EAX ,
EBX,ECX...) via assembly in C .
Yes, you can. But, not with standard C.
Also, it's not wise to do so unless you know assembly. And, you know
'intimate' details of how the compiler generates code.
DJGPP has the C '__asm__()' directive for assembly. OpenWatcom has the C
'_asm{}' directive and '#pragma aux' for assembly.
An example of an 'intimate' details you may need to know, most C routines
have a prolog and epilog that does things which are hidden from C
programmers.
Jack Klein said:Then why not stop right there? Why wander into completely oft-topic
and potentially useless material?
Nobody needs to know any of these "intimate" details to do anything
that can be discussed topically in this group.
It's not possible to access registers or to use assembly at all in
standard C.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.