About
Instruction (Machine Language) in Assembly
Articles Related
Syntax
The syntax of an instruction in assembly is as follow:
label: mnemonic [operandArgument{0,3}] [;comment]
where:
- A label
- A mnemonic is a reserved name for a class of instruction opcodes which have the same function.
- The operands argument.
- An optional comment
When two operands are present in an arithmetic or logical instruction, the right operand is the source and the left operand is the destination. Some assembly languages put the source and destination in reverse order.
Example:
LOADREG: MOV EAX, SUBTOTAL
- LOADREG is a label
- MOV is the mnemonic identifier,
- EAX is the destination operand,
- SUBTOTAL is the source operand.
Management
List
The list of all instruction are found in the instruction set of the device.
Example: see Intel Instruction Interpretation