Compiling inline assembler
I am trying to compile a program with inline assembler.
I have to do this in Intel format code, so that I can share the source with a Windows program.
From what I have been able to gather from various online sources this code should work, but does not.
This is an example, not the complete code:
void asmTest(uint *pData, uint *pDest, uint *pOffsetCorrImage, int nCount)
mov esi, pData
mov edi, pOffsetCorrImage
mov ecx, nCount
mov edx, pDest
To compile I use:
david@perkinel-e586cd:~/cfiles/HIS> gcc -c - masm=intel /home/david/cfiles/HIS/asmtest.c
I get the error message:
/home/david/cfiles/HIS/asmtest.c:9:15: missing terminating " character
/home/david/cfiles/HIS/asmtest.c: In function `asmTest':
/home/david/cfiles/HIS/asmtest.c:10: error: parse error before "mov"
/home/david/cfiles/HIS/asmtest.c:14:17: missing terminating " character
I have tried it without " -masm=intel" and get exactly the same message.
I am using gcc v3.3.3
I would like to keep the assembler as Intel code and as unchanged as possible as there are hundreds of lines of it.