asm

suggest change

The asm keyword takes a single operand, which must be a string literal. It has an implementation-defined meaning, but is typically passed to the implementation’s assembler, with the assembler’s output being incorporated into the translation unit.

The asm statement is a definition, not an expression, so it may appear either at block scope or namespace scope (including global scope). However, since inline assembly cannot be constrained by the rules of the C++ language, asm may not appear inside a constexpr function.

Example:

[[noreturn]] void halt_system() {
    asm("hlt");
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


keywords:
* class
* float
* bool
* void
* char
* short
* long
* double
* int
* enum
* if
* do
* else
* true
* false
* const
* for
* goto
* struct
* case
* catch
* return
* signed
* static
* this
* switch
* throw
* try
* break
* union
* asm
* sizeof

Table Of Contents
8 Arrays
11 Loops
14 keywords
39 Streams
51 Unions
56 Lambdas
60 SFINAE
62 RAII
67 Sorting
84 RTTI
87 Scopes
104 Profiling
107 Recursion
117 Iteration
125 Alignment
134 Semaphore
136 Debugging
139 Mutexes
142 decltype