How can I use asm inline in CodeBlock with GNU GCC Compiler? Why I can't do:
void SetGraphMode(char mode) {
_asm {
mov al, mode
mov ah, 0x0
int 0x10
}
}
Well with the GCC compiler using c++ an example will be the following:
int function(){
asm("movl $0, %eax\n\t");
}
The assembly syntax utilized on GCC is the AT&T asm. Here is a nice page with good info: http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html (http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html)
Good enough for getting started...