3-3
INSTRUCTION SET REFERENCE
3.1.1.2.INSTRUCTION COLUMN
The Instruction column gives the syntax of the instruction statement as it would appear in an
ASM386 program. The following is a list of the symbols used to represent operands in the
instruction statements:
rel8A relative address in the range from 128 bytes before the end of the instruction to
127 bytes after the end of the instruction.
rel16 and rel32A relative address within the same code segment as the instruction
assembled. The rel16 symbol applies to instructions with an operand-size attribute of 16
bits; the rel32 symbol applies to instructions with an operand-size attribute of 32 bits.
ptr16:16 and ptr16:32A far pointer, typically in a code segment different from that of
the instruction. The notation 16:16 indicates that the value of the pointer has two parts. The
value to the left of the colon is a 16-bit selector or value destined for the code segment
register. The value to the right corresponds to the offset within the destination segment.
The ptr16:16 symbol is used when the instruction's operand-size attribute is 16 bits; the
ptr16:32 symbol is used when the operand-size attribute is 32 bits.
r8One of the byte general-purpose registers AL, CL, DL, BL, AH, CH, DH, or BH.
r16One of the word general-purpose registers AX, CX, DX, BX, SP, BP, SI, or DI.
r32One of the doubleword general-purpose registers EAX, ECX, EDX, EBX, ESP, EBP,
ESI, or EDI.
imm8An immediate byte value. The imm8 symbol is a signed number between 128
and +127 inclusive. For instructions in which imm8 is combined with a word or
doubleword operand, the immediate value is sign-extended to form a word or doubleword.
The upper byte of the word is filled with the topmost bit of the immediate value.
imm16An immediate word value used for instructions whose operand-size attribute is
16 bits. This is a number between 32,768 and +32,767 inclusive.
Table 3-1. Register Encodings Associated with the +rb, +rw, and +rd Nomenclature
rb
rw
rd
AL
=
0
AX
=
0
EAX
=
0
CL
=
1
CX
=
1
ECX
=
1
DL
=
2
DX
=
2
EDX
=
2
BL
=
3
BX
=
3
EBX
=
3
rb
rw
rd
AH
=
4
SP
=
4
ESP
=
4
CH
=
5
BP
=
5
EBP
=
5
DH
=
6
SI
=
6
ESI=
6
BH
=
7
DI
=
7
EDI=
7