Microprocessor I: Dr. Abouelmaaty M. Aly
Microprocessor I: Dr. Abouelmaaty M. Aly
Microprocessor I: Dr. Abouelmaaty M. Aly
ESI, EDI, EBP, ESP have only 16-bit names for lower half
R8 - R15 found in the Pentium 4 and Core2 if 64-bit extensions are enabled.
• data are addressed as 64-, 32-, 16-, or 8-bit sizes and are of general purpose.
Most applications will not use these registers until 64-bit processors are common.
• the 8-bit portion is the rightmost 8-bit only.
RFLAGS indicate the condition of the microprocessor and control its operation.
• Flags never change for any data transfer or program control operation.
EFLAG and FLAG register counts for the entire 8086 and Pentium microprocessor family
Status Flags
Status of arithmetic and logical operations
Control and System flags
Control the CPU operation
Programs can set and clear individual bits in the EFLAGS register
Generate memory addresses when combined with other registers in the microprocessor.
Following is a list of each segment register, along with its function in the system.
CS (code) segment holds code (programs and procedures) used by the microprocessor.
ES (extra) an additional data segment used by some instructions to hold destination data.
FS and GS segments are supplemental segment registers available in 80386 – Core2 microprocessors.
• allow two additional memory segments for access by programs.
• Processor runs in protected mode, and creates a virtual 8086 machine with 1 MB of address
space for each running program.
80286 processor and above operate in either the real or protected mode.
Real mode operation allows addressing of only the first 1M byte of memory space — even in
Pentium 4 or Core2 microprocessor.
• the first 1M byte of memory is called the real memory, conventional memory, or DOS memory
system.
The code segment register defines the start of the code segment.
The instruction pointer locates the next instruction within the code segment.
The next Figure shows a system that contains four memory segments.
• a memory segment can touch or overlap if 64K bytes of memory are not required for a segment.
TI = Table Indicator
Select the descriptor table
0 = Global Descriptor Table
1 = Local Descriptor Table
With memory paging, the linear address is invisibly translated to any physical
address.
The operating
system uses Page m ... Page n
space of Program 2
page tables to ... ...
map the pages
Page 2 Page 2
in the linear
virtual address Page 1 Page 1
space onto Page 0 Page 0
main memory
Hard Disk
Pages that cannot The operating system
Each running
fit in main memory swaps pages
program has its
are stored on the between memory
own page table
hard disk and the hard disk
As a program is running, the processor translates the linear virtual addresses onto real memory (called
also physical) addresses
The page directory contains 1024 double word addresses that locate up to 1024
page tables.
Next Figure shows the page directory, a few page tables, and some memory
pages.