Mail Archives: djgpp/2002/02/17/14:15:05
Luis (luisllo AT alumni DOT uv DOT es) wrote:
: Hi ciberfolks!!
: I have a problem using inline asm in my C code with DJGPP. I have read
: a lot of tutorials in the web, and all seems to be ok, but I always
: get the same error message when I try to compile the next code:
: ----------------------------------------------------------------------
: #include <stdio.h>
: asm(" pushl %%edx; movl %0,%%eax; mov %1,%%dx; movw %%dx,%%ss:(%%eax);
: popl %%edx" : : "m" (pcar), "m" (car));
: int main(void)
: {
: /* stuff */
: }
: ----------------------------------------------------------------------
: The error message is the next one:
: test.c:3: parse error before ':'
: I'm using a pentium machine with windows Me, and I don't have any idea
: of why it's not working, am I missing any header file?, please help!
You're trying to add program executable statements outside any
function. That won't work. Try moving your assembler statements into
main() or some other function.
Right,
MartinS
- Raw text -