Lecture 3_Chapter 2 part 2 and chapter 3 part 1
Lecture 3_Chapter 2 part 2 and chapter 3 part 1
ARCHITECTURE
LECTURE OUTLINE
Limit : 00FF
Base (starting address) : 100000
Access Rights : 92
Closed: 0000
Address : 100000
+ 00FF
-----------------------
1000FF
PROGRAM-INVISIBLE REGISTERS
Global and local descriptor tables are found
in the memory system.
To access & specify the table addresses, 80286–Core2
contain program-invisible registers.
not directly addressed by software
Each segment register contains a program-invisible portion
used in the protected mode.
often called cache memory because cache is any memory
that stores information
Figure 2–10 The program-invisible register within the 80286–Core2 microprocessors.
When a new segment number is placed in a segment
register, the microprocessor accesses a descriptor
table and loads the descriptor into the program-
invisible portion of the segment register.
held there and used to access the memory segment
until the segment number is changed
This allows the microprocessor to repeatedly access a
memory segment without referring to the descriptor
table.
2–5 Flat Mode Memory
FIGURE 3–1 The MOV instruction showing the source, destination, and direction of data flow.
Figure 3–2 shows all possible variations of the data-addressing
modes using the MOV instruction.
Note that these are the same data-addressing modes found with all
versions of the Intel microprocessor.
- except for the scaled-index-addressing mode, which is found only in
the 80386 through the Core2.
THE DATA-ADDRESSING MODES ARE AS
FOLLOWS:
Register Addressing
Immediate Addressing
Direct Addressing
Register indirect Addressing
Base-plus-index Addressing
Register Relative Addressing
Relative-plus-index Addressing
Scaled index Addressing
FIGURE 3–2 8086–Core2 data-addressing modes.
1- REGISTER ADDRESSING
The most common form of data addressing.
Once register names learned, easiest to apply.
The microprocessor contains these 8bit register names used with register
addressing: AH, AL, BH, BL, CH, CL, DH, DL.
The microprocessor contains these 16bit register names used with register
addressing: AX, BX, CX, DX, SP, BP, SI, DI.
In the 80386 and above, the extended 32-bit register names are: EAX, EBX, ECX,
EDX, ESP, EBP, EDI, and ESI.
In the 64-bit mode of the Pentium 4, the register names are: RAX, RBX, RCX, RDX,
RSP, RBP, RDI, RSI, and R8 through R15.
Example
Instruction: MOV AX, BX
Type: Register Addressing Mode
Rule: copy the contents from register BX to register AX
1- REGISTER ADDRESSING
Memory is not accessed when this addressing mode is executed;
therefore, it is relatively fast.
It is important for instructions to use registers that are the same size.
• Never mix an 8-bit register with a 16-bit register, an 8-bit register with
a 32-bit register, or a l6-bit register with a 32-bit register because this
is not allowed by the microprocessor and results in an error when
assembled.
It should be noted that the source and destination registers must match
in size.
In other words coding “ MOV CL, AX” will give an error.
FIGURE 3–3 The effect of executing the MOV BX, CX instruction at the point just before
the BX register changes. Note that only the rightmost 16 bits of register
EBX change.