Team LiB   Previous Section   Next Section
asm definition Inline assembler definition

block-decl := asm-defn
asm-defn ::= asm ( string-literal ) ;

figs/acorn.gif

The asm definition is implementation-defined. Typically, the string-literal contains assembler instructions. Some compilers extend the asm syntax to make it easier to write larger blocks of assembler code.

Example

asm("mov 4, %eax"); // GNU on Intel IA32
asm("mov eax, 4");  // Borland on Intel IA32

See Also

declaration

    Team LiB   Previous Section   Next Section