![Very Happy :D](./images/smilies/icon_biggrin.gif)
Now I'm working on the stdlib for developers, and I've already run into a problem.
I'm trying this for my putc function:
Code: Select all
__asm__ __volatile__ ( "movb %0,%edx" : : "d" ( c ) );
__asm__ __volatile__ ( "movd $0x1,%eax" );
__asm__ __volatile__ ( "int $0x15" );
GCC complains with this error message:
Code: Select all
putc_stdlib.c:5: error: invalid 'asm': operand number missing after %-letter
Code: Select all
__asm__ __volatile__ ( "movb %0,%%dl" : : "d" ( c ) );
__asm__ __volatile__ ( "movb $0x1,%al" );
__asm__ __volatile__ ( "int $0x15" );
![Smile :)](./images/smilies/icon_smile.gif)
Check out the inline assembly examples for a much better way to do this kind of thing.
Also, the actual problem is in "mov %0, %dl", which should be "mov %0, %%dl" in this context.