1 Adv MP Unit-II
1 Adv MP Unit-II
1 Adv MP Unit-II
MICROPROCESSORS AND
MICROCONTROLLERS
UNIT II
HIGH PERFORMANCE CISC ARCHITECTURE PENTIUM
EAX
EBX
EBP
ECX
ESI
EDX
EDI
ESP
CS
ES
SS
FS
DS
GS
NT (nested task)
The nested task flag indicates that the current task is nested within another task in protected mode operation.
RF (resume)
The resume flag is used with debugging to control the resumption of execution after the next instruction.
VM (virtual mode)
The VM flag bit selects virtual mode operation in a protected mode system. A virtual mode system allows multiple DOS
memory partitions that are 1M byte in length to coexist in the memory system. Essentially, this allows the system
program to execute multiple DOS programs.
ID (identification)
The ID flag indicates that the Pentium-Pentium II microprocessors support the CPUID instruction.
FEATURES
The Pentium processor achieves higher performance than the fastest Intel486 processor by
making use of the following advanced technologies.
SUPERSCALAR EXECUTION: The Intel486 processor can execute only one instruction at a time.
With superscalar execution, the Pentium processor can sometimes execute two instructions
simultaneously.
PIPELINE ARCHITECTURE: Like the Intel486 processor, the Pentium processor executes
instructions in five stages. This staging, or pipelining, allows the processor to overlap multiple
instructions so that it takes less time to execute two instructions in a row. Because of its
superscalar architecture, the Pentium processor has two independent processor pipelines.
INSTRUCTION OPTIMIZATION: The Pentium processor has been optimized to run critical
instructions in fewer clock cycles than the Intel486 processor.
FLOATING-POINT OPTIMIZATION: The Pentium processor executes individual instructions
faster through execution pipelining, which allows multiple floating-point instructions to be
executed at the same time.
PENTIUM EXTENSIONS: The Pentium processor has fewer instruction set extensions than the
Intel486 processors. The Pentium processor also has a set of extensions for multiprocessor (MP)
operation. This makes a computer with multiple Pentium processors possible.
ADDRESSING MODES
The way to accessing the operands in a instruction is
called addressing mode.
Types :
Register, Data, Memory & I/O.
Effective Address = base reg + (index reg * scaling factor) + disp
Where,
base reg is EAX, EBX, ECX, EDX or ESP or EBP;
index reg is EDI or ESI;
scaling factor is 1, 2, 4, or 8 .
Addressing Modes
REGISTER MODE:
Both operands are registers in a instruction.
Eg: MOV EAX,ECX
Both operands use register mode. The contents of register
ECX is copied to register EAX.
IMMEDIATE MODE :
The source operand is immediate data.
Eg: MOV EAX, 12345678
The second operand uses immediate mode. It is copied to
register EAX.
Addressing Modes
DIRECT MODE :
The Effective address is in the instruction.
Eg: MOV EAX, m_addr
The second operand uses direct mode. The instruction
contains the effective address. The contents of memory at the
effective address are copied into register EAX.
REGISTER INDIRECT MODE :
The effective address is in a register.
Eg: MOV EAX, [EBP]
The second operand uses register indirect mode. The contents
of register EBP is the effective address. The contents of
memory at the effective address are copied into register EAX.
Addressing Modes
BASE DISPLACEMENT MODE :
The effective address is the sum of a constant and the contents of a register.
Eg: MOV EAX, [EBP + 4000]
The second operand uses base displacement mode. The instruction contains
a constant. That constant is added to the contents of register EBP to form an
effective address. The contents of memory at the effective address are copied
into register EAX.
INDEX DISPLACEMENT MODE:
The effective address is the sum of a constant and the contents of a register.
Eg: MOV EAX,[ESI+4000]
The second operand uses base displacement mode. The instruction contains
a constant. That constant is added to the contents of register ESI to form an
effective address. The contents of memory at the effective address are copied
into register EAX.
Addressing Modes
BASE INDEXED MODE:
The effective address is the sum of the contents of two registers.
Eg: MOV EAX, [EBP][ESI]
The contents of registers EBP and ESI are added to form an effective
address. The contents of memory at the effective address are copied into
register EAX.
RELATIVE BASED INDEXED MODE :
The effective address is the sum of a constant and the contents of registers.
Eg: MOV EAX, [EBP] [ESI + 4000]
The second operand uses base displacement mode. The instruction contains
a constant. That constant is added to the contents of registers ESI & EBP to
form an effective address. The contents of memory at the effective address
are copied into register EAX.
Addressing Modes
INTRA SEGMENT INDIRECT:
INTRA SEGMENT DIRECT :
INTER SEGMENT INDIRECT:
INTER SEGMENT DIRECT :
DIRECT I/O:
INDIRECT I/O:
IMPLIED / IMPLICIT / INHERENT:
INSTRUCTION SETS
Instruction set is divided into 9 categories of operations. In addition to
commonly available instructions, high level language support and operating
system support.
An instruction may have 0-3 operands and the operand can be 8, 16, or 32bits long.
handles various types of data such as Single bit, string of bits, signed and
unsigned 8, 16, 32 and 64 bit data, ASCII character and BCD numbers.
Integer Arithmetic
Logical Arithmetic
Floating Point Arithmetic
I/O
Control Instructions
Instruction Sets
Many of the instructions have exactly 2 operands. If there are 2 operands,
then one of them will be required to use register mode, and the other will
have no restrictions on its addressing mode.
There are most often ways of specifying the same instruction for 8-, 16-, or
32-bit operands.
INSTRUCTION
FUNCTION
CMPXCHG
CPUID
RDTSC
Read time
time--stamp counter
RDMSR/WRMSR
Read/Write model
model--specific register
RSM
OPERATING MODES
PROTECTED MODE:
This is the native state of the microprocessor. In this mode all instructions and architectural features
are available, providing the highest performance and capability. This is the recommended mode that all
new applications and operating systems should target.
Among the capabilities of protected mode is the ability to directly execute "real-address mode" 8086
software in a protected, multi-tasking environment. This feature is known as Virtual-8086 "mode" (or
"V86 mode").
REAL-ADDRESS MODE:
This mode provides the programming environment of the Intel 8086 processor, with a few extensions.
Reset initialization places the processor in real mode where, with a single instruction, it can switch to
protected mode.
SYSTEM MANAGEMENT MODE:
The Pentium microprocessor also provides support for System Management Mode (SMM). SMM is a standard
architectural feature unique to all new Intel microprocessors, beginning with the Intel386 SL processor, which
provides an operating-system and application independent and transparent mechanism to implement system
power management. SMM is entered through activation of an external interrupt pin (SMI#), which switches
the CPU to a separate address space while saving the entire context of the CPU. SMM-specific code may then
be executed transparently.
Bus Operations
Bus Operations
Bus Operations
Bus Operations
Bus Operations
Bus Operations
PIPELINING
Pipelining
Branch Prediction
BTB Branch Target Buffer, a special Cache stores the inst and target addr of any branch inst
Floating--Point Unit
Floating
Floating--Point Unit
Floating
Unit
Floating--Point Unit
Floating
Unit
SEGMENTATION
Segmentation
Segmentation
Segmentation
Segmentation
Segmentation
PAGING
Paging
Paging
Paging
MULTITASKING
Multitasking
Multitasking
Multitasking
Multitasking
Multitasking