use of the asm keyword in GNU C
Clark, John III
JClark3@xs2.lp.averstar.com
Tue Dec 21 08:07:00 GMT 1999
I currently am migrating some older software from LynxOS version 2.3 ( x86 )
to 3.0 ( x86 ) and in particular, driver software. In one driver, there is
some assembly code intended for an Intel processor, like so:
50 asm { mov EDX, port[EBP]
51 mov AL, x[EBP]
52 out DX, AL
53 }
So far, I have not been able to fix this syntax error:
Line 50: syntax error before {
I have read through the GNU compiler documentation provided by Lynx but
there does not seem to be any option(s) to use except ones controlling
optional keywords, such as __asm__ ( this approach does not appear to work
however...). Their documentation has a section on using assembler
instructions with C expression operands which is promising, but I am unsure
whether or not it will work with the code fragment listed above. If I need
to rewrite this code, it will not be a headache ( only 6 lines total ).
Brian M Foley
Dynamics Research Corp
Test Equipment Division
93 Border Street
West Newton, MA. 02465
More information about the Gcc-help
mailing list