An instruction is a statement that is executed by the processor at runtime after the program has been loaded into memory and started. An instruction contains four basic parts: (i) label, (ii) instruction mnemonic, (iii) operands, and (iv) comment.
The basic syntax is
[label:] mnemonic operand(s) [; comment]
Label (optional)
A label is an identifier that acts as a place marker for either instructions or data.
It could be a data label, identifying the location of a variable, such as
prompt3 BYTE 0Dh, 0Ah, "The result is ", 0
or it could be a code label, used as target of jumping and looping instructions, such as
L1: mov eax, 5000h
Instruction Mnemonic (required)
An instruction mnemonic is a short word that identifies the operation carried out by an instruction.
For example,
mov edx, OFFSET prompt3
Operand(s) (usually required)
An assembly language instruction can have between 0 and 3 operands, each of which can be a register, memory operand, constant expression, or I/O port.
Comment (optional)
Comments are a useful way for the programmer to communicate information about how the program works to a person reading the code.
For example,
call WriteString ; print prompt1