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

本文介绍了如何在C代码中使用内联汇编语言。GCC提供了两种形式的内联汇编语句:基本形式(不带操作数)和扩展形式(包含一个或多个操作数)。扩展形式更适用于在同一函数中混合C和汇编语言,而基本形式用于顶级包含汇编语言。
1039

被折叠的 条评论
为什么被折叠?



