ia-32_instruction-set-ref_a-m

Co or 10 byte ct value following the opcode this value

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: te given at the left of the plus sign to form a single opcode byte. See Table 3-1 for the codes. The +ro columns in the table are applicable only in 64-bit mode. +i -- A number used in floating-point instructions when one of the operands is ST(i) from the FPU register stack. The number i (which can range from 0 to 7) is added to the hexadecimal byte given at the left of the plus sign to form a single opcode byte. Table 3-1. Register Codes Associated With +rb, +rw, +rd, +ro rb REX.R Reg Field Register Register rw REX.R REX.R Reg Field Register rd Reg Field ro (64-Bit Mode only) REX.R 0 0 0 0 N/A AL CL DL BL AH 0 0 0 0 No REX prefix 0 1 2 3 4 AX CX DX BX SP 0 0 0 0 No REX prefi x 0 1 2 3 4 EAX ECX EDX EBX ESP 0 0 0 0 No REX prefix 0 1 2 3 4 RAX RCX RDX RBX N/A 3-2 Vol. 2 Reg Field 0 1 2 3 N/A Register INSTRUCTION SET REFERENCE, A-M Table 3-1. Register Codes Associated With +rb, +rw, +rd, +ro (Contd.) rb Register Register REX.R Reg Field rw Register REX.R REX.R Reg Field rd Reg Field ro (64-Bit Mode only) Register REX.R N/A CH No REX prefix No REX prefix No REX prefix Any REX Prefix Any REX Prefix Any REX Prefix Any REX Prefix 1 1 1 1 1 1 1 1 5 BP No REX prefi x No REX prefi x No REX prefi x 0 5 EBP No REX prefix No REX prefix No REX prefix 0 5 N/A DH 6 SI 6 ESI 6 N/A N/A BH 7 DI 7 EDI 7 N/A N/A SPL 4 SP 4 ESP 4 RSP 0 BPL SIL DIL 5 6 7 BP SI DI 0 0 0 5 6 7 EBP ESI EDI 0 0 0 5 6 7 RBP RSI RDI 0 0 0 Registers R8 - R15 (see below): Available in 64-Bit Mode Only R8L R9L R10L R11L R12L R13L R14L R15L 0 1 2 3 4 5 6 7 R8W R9W R10W R11W R12W R13W R14W R15W 1 1 1 1 1 1 1 1 0 1 2 3 4 5 6 7 R8D R9D R10D R11D R12D R13D R14D R15D 1 1 1 1 1 1 1 1 0 1 2 3 4 5 6 7 R8 R9 R10 R11 R12 R13 R14 R15 1 1 1 1 1 1 1 1 0 1 2 3 4 5 6 7 Vol. 2 3-3 Reg Field N/A N/A N/A 4 5 6 7 INSTRUCTION SET REFERENCE, A-M 3.1.1.2 Instruction Column in the Opcode Summary Table 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: rel8 -- A relative address in the range from 128 bytes before the end of the instruction to 127 bytes after the end of the instruction. rel16, rel32, rel64 -- A relative address within the same code segment as the instruction assembled. The rel16 symbol applies to instructions with an operandsize attribute of 16 bits; the rel32 symbol applies to instructions with an operand-size attribute of 32 bits; the rel64 symbol applies to instructions with an operand-size attribute of 64 bits. ptr16:16, ptr16:32 and ptr16:64 -- A far pointer, typically to 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-si...
View Full Document

This note was uploaded on 10/01/2013 for the course CPE 103 taught by Professor Watlins during the Winter '11 term at Mississippi State.

Ask a homework question - tutors are online