gcc: Using Assembly Language with C
1
1 6.45 How to Use Inline Assembly Language in C Code
1 ==================================================
1
1 The 'asm' keyword allows you to embed assembler instructions within C
1 code. GCC provides two forms of inline 'asm' statements. A "basic
1 'asm'" statement is one with no operands (⇒Basic Asm), while an
1 "extended 'asm'" statement (⇒Extended Asm) includes one or more
1 operands. The extended form is preferred for mixing C and assembly
1 language within a function, but to include assembly language at top
1 level you must use basic 'asm'.
1
1 You can also use the 'asm' keyword to override the assembler name for a
1 C symbol, or to place a C variable in a specific register.
1
Menu