Changes

Jump to: navigation, search

Inline Assembly Language

273 bytes added, 00:47, 28 January 2014
Output and Input Operands
=== Output and Input Operands ===
Output and input operands, if are optional -- some asm code may do a task without anyinput or output values. If the asm code has input or output values, these operands are specified as an optional name in square brackets, a quoted string containing a constraint, and a C expression in parenthesis.
Constraints are specified as a string of characters. Some commonly use constraints are:
* % - in addition to one of the symbols above, declares that this operand and the following operand are commutable (interchangeable) for optimization. Only one commutable pair may be specified.
The constraint is followed by the a C expression in parenthesis the provides to provide the value (input operand) or receives receive the value (output operand). This is usually a variable name for output operands, but may be a variable name, evaluated expression, or a constant for input operands.
Here are some (trivial) examples in x86_64 assembler:

Navigation menu