This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Assembly in Gcc
Hello all,
I am new to doing inline asembly in gcc and have a few questions - hopefully
someone can help me out.
I read the section of the manual on the doing inline assembly. It is quite
different than the old Borland compiler I used to use on DOS - I could just
put an "asm " and enclose all of my Intel syntax assmebly instructions
inside there. Is there any way to do this in gcc? I found the intel_syntax
directive and passed that in, but it seems that I still need to put %' s in
front of register names, etc.
The project I am working on involves integrating a large chunk (~ 40 pages)
of Intel assembly instructions into a program which I must compile with gcc.
So, my goal is to be able to do something like this:
asm {
mov dx, 378
mov al, FF
out dx, al
} ;
... Without reformatting the code. Is this possible?
Thanks in advance
Mark
Mark Cuss, B. Sc.
Junior Real Time Systems Analyst
CDL Systems Ltd
3553 - 31 Street NW
Calgary, Alberta
(403) 289-1733 ext 226
mcuss@cdlsystems.com