Information Technology Reference
In-Depth Information
Displacement from
2 nd word of instruction
Shifted 16 bits
Original 16 bits
7/15/31
0
15
0
Op Code
Address
Logical Address
Segment base
Address
Σ
Physical Address
Figure 3.8 Direct addressing in the X86 family
2's complement format. Data transfer, arithmetic and logical instructions can act on
immediate data, registers, or memory locations.
In the X86 family, direct and indirect memory addressing can be used. In direct
addressing, a displacement address consisting of a 8-, 16-, or 32-bit word is used as
the logical address. This logical address is added to the shifted contents of the seg-
ment register (segment base address) to give a physical memory address. Figure 3.8
illustrates the direct addressing process.
Address indirection in the X86 family can be obtained using the content of a
base pointer register (BPR), the content of an index register, or the sum of a base
register and an index register. Figure 3.9 illustrates indirect addressing using
the BPR.
The X86 family of processors defines a number of instruction types. Using the
naming convention introduced before, these instruction types are data movement,
arithmetic and logic, and sequencing (control transfer). In addition, the X86
family defines other instruction types such as string manipulation, bit manipulation,
and high-level language support.
Data movement instructions in the X86 family include mainly four subtypes.
These are the general-purpose, accumulator-specific, address-object, and flag
instructions. A sample of these instructions is shown in Table 3.9.
Arithmetic and logic instructions in the X86 family include mainly five subtypes.
These are addition, subtraction, multiplication, division, and logic instructions.
A sample of the arithmetic instructions is shown in Table 3.10.
Logic instructions include the typical AND, OR, NOT, XOR, and TEST. The latter
performs a logic compare of the source and the destination and sets the flags accord-
ingly. In addition, the X86 family has a set of shift and rotate instructions. A sample
of these is shown in Table 3.11.
Search WWH ::




Custom Search