Name

asm definition — Inline assembler definition

Synopsis

               block-decl := asm-defn
               asm-defn ::= asm ( string-literal ) ;
image with no caption

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

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.