14
INTRODUCTION TO INTEL X-86 FAMILY

INTRODUCTION TO INTEL X-86 FAMILY

Embed Size (px)

DESCRIPTION

Features of 8086 Microprocessor: Intel 8086 was launched in 1978. It was the first 16-bit microprocessor. This microprocessor had major improvement over the execution speed of 8085. It is available as 40-pin Dual-Inline-Package (DIP). It consists of 29,000 transistors.

Citation preview

Page 1: INTRODUCTION TO INTEL X-86 FAMILY

INTRODUCTION TO INTEL X-86 FAMILY

Page 2: INTRODUCTION TO INTEL X-86 FAMILY

Features of 8086 Microprocessor:• Intel 8086 was launched in 1978.• It was the first 16-bit microprocessor.• This microprocessor had major improvement over

the execution speed of 8085.• It is available as 40-pin Dual-Inline-Package (DIP).• It consists of 29,000 transistors.

Page 3: INTRODUCTION TO INTEL X-86 FAMILY

Block Diagram of 8086

Page 4: INTRODUCTION TO INTEL X-86 FAMILY

8086 CPU is divided into two independent functional parts.

Bus Interface Unit (BIU) Execution Unit (EU)

• Queues• Segment Register• Instruction Pointer

• Flag Register• General Purpose

Registers• Stack Pointer Register• Base Pointer Registers• Index Registers

Page 5: INTRODUCTION TO INTEL X-86 FAMILY

Bus Interface Unit (BIU)• Sends address, fetches instruction from memory• Reads data from ports/memory and writes data to ports/memory.• It handles transfer of data & address on buses for execution unit.

Queue Segment Registers

Instruction Pointer

To speed up execution of program, BIU fetches 6 instruction bytes ahead of time from memory All six bytes are then held for EU in first in first out (FIFO) 6 byte register called instruction queue.

Extra Segment (ES)Code Segment (CS) Stack Segment (SS)Data Segment (DS)

The CS register holds 16-bit starting addr of segment, from which BIU is fetching instruction code bytes. The IP register holds 16-bit address of next code byte within code segment.

Page 6: INTRODUCTION TO INTEL X-86 FAMILY

Segment RegistersAdditional registers called segment registers generate memory address when combined with other in microprocessor. In 8086 microprocessor, memory is divided into 4 segments as follows:

• Code Segment (CS): The CS register is used for addressing a memory location in the Code segment of the memory, where the executable program is stored.

• Data Segment (DS): The DS contains most data used by program. Data are accessed in the data Segment by an offset address or the content of other register that holds the offset address.

• Stack Segment (SS): SS defined the area of memory used for the stack

• Extra Segment (ES): ES is additional data segment that is used by some of the string to hold the destination data.

Page 7: INTRODUCTION TO INTEL X-86 FAMILY

Execution Unit (EU)• Tells BIU where to fetch instructions or data• Decodes instructions & executes them.

Flag Register General purpose Registers

Stack Pointer

• Flag is a flip-flop, which indicates some status.• The 8086 has 16-

bit flag register with 9 active flags.

•8 general purpose registers AH, AL, BH, BL, CH, CL, DH, DL.These can be used individually for temporary storage of 8-bit data. •The AL reg is called accumulator•These registers in certain pairs can be used as 16-bit registersAX – 16-bit accumulatorBX – base register, holds the starting base location of a memory region within a data segment CX – Counter used in loop instructions to store loop countDX – Used to contain I/O port addresses for I/O instructions

The 8086 allows to set 64 KB of memory as stack.

Page 8: INTRODUCTION TO INTEL X-86 FAMILY

Flag Registers of 8086

• Flags Register determines the current state of the processor. They are modified automatically by

• CPU after mathematical operations, this allows to determine the type of the result, and to determine

• conditions to transfer control to other parts of the program. 8086 has 9 flags and they are divided into two categories:

1. Conditional Flags 2. Control Flags

Page 9: INTRODUCTION TO INTEL X-86 FAMILY

Trap Flag (TP):• a. It is used for single step control.• b. It allows user to execute one instruction of a program at a time

for debugging.• c. When trap flag is set, program can be run in single step mode.Interrupt Flag (IF):• a. It is an interrupt enable/disable flag.• b. If it is set, the maskable interrupt of 8086 is enabled and if it is

reset, the interrupt is disabled.• c. It can be set by executing instruction sit and can be cleared by

executing CLI instruction.Direction Flag (DF):• a. It is used in string operation.• b. If it is set, string bytes are accessed from higher memory

address to lower memory address.• c. When it is reset, the string bytes are accessed from lower

memory address to higher memory address.

Page 10: INTRODUCTION TO INTEL X-86 FAMILY

8086 80286 80386 80486 80586/Pentium

16-bit µp (1978).Designed to be used as CPU in microcomputer systems.16-bit data bus, 20-bit addr bus.Can address Physical memory of 1 MB. 10 MHzLeast significant 8-bit addr bus is multiplexed with data bus.Words are stored in 2 consecutive bytes. If 1st byte has even addr then it can read it in single operationSupport multiplication & division

16-bit µp (1982)Designed to be used as CPU in multitasking operating systems.16-bit data bus, 24-bit addr busHas real & protected modes of operation. Can address 1 MB in real mode, 16 MB in protected mode. 6-20 MHzWork upto 1 GB of virtual memory.Added hardware multitasking. The program written for 8086 can run on 80826.

32-bit µp (1985)32-bit data bus, 32-bit nonmu-xed addr busCan address Physical memory of 4GB. 25 MHzCan be operated in 2 memory management modes-Paged mode & Non-paged mode.In paged mode it switches paging unit then after the segment unit. The paging unit allows memory pages of 4 KB each to be swapped in & out from disk. Non-paged mode is similar to 80286

32-bit µp (1989)32-bit data bus, 32-bit addr busCan address Physical memory of 4 GB. 60 MHzIt is a large integral circuit, contains a fast built in math co-processor, a (MMU) & 8KB cache memory.Has DX & SX versions.Has high speed operation from its faster clock speeds, internal pipe-lined architecture.DX2 & DX4 has double & triple clock speed resp.

64-bit µp (1993)64-bit data bus, 36-bit addr busCan address Physical memory of 64 GB. 100 MHzIt can process more than 1 instruction per clock cycle due to a dual pipe lined processor.Both data & code cache on chip responsible for increased processing speed.Has Branch prediction. Has 64-bit data bus, so perform data transfer with double speed.

Page 11: INTRODUCTION TO INTEL X-86 FAMILY

Programming model for 16-bit version of X-86 family with register set 15 8 7 0

AX AH AL AccumulatorBX BH BL Base RegisterCX CH CL CountDX D

HDL Data

SI Source IndexDI Destination IndexBP Base PointerSP Stack Pointer

CS Code SegmentSS Stack SegmentDS Data SegmentES Extra Segment

IP Instruction PointerFlag Register

General Purpose Registers

Segment Register

• 16-bit version includes 8088, 8086, 80286• 3 register groups• 1st group contains 8 general purpose

registers– A, B, C, D, SI, DI, BP, SP registers. AL, BL… indicates lower bytes & AH, BH….indicates higher bytes. Full 16-bit reg are AX, BX, CX, DX where X stands for extended. SI, DI, BP, SP are 16-bit reg called pointer reg as they are used to point location within a segment.• 2nd group is segment register

consisting of code segment, stack segment, data segment, extra segment. This reg manages operation with external memory. Addr computation & Data movements are performed here.• 3rd group contains instruction pointer

& flag register.

Page 12: INTRODUCTION TO INTEL X-86 FAMILY

Programming model for 32-bit version of X-86 family

31 16 15 8 7 0EAX AH AL AccumulatorEBX BH BL Base RegisterECX CH CL CountEDX DH DL DataESI SI Source IndexEDI DI Destination IndexEBP BP Base PointerESP SP Stack Pointer

CS Code SegmentSS Stack SegmentDS

Data SegmentsESGSFS

EIP IP Instruction PointerE Flag

General Purpose Registers

Segment Register

• 32-bit version includes 80386, 80486• 3 register groups• 1st group contains 8 general purpose

registers– EAX, EBX, ECX, EDX, ESI, EDI, EBP, ESP registers. E tells they can have extended length. Each can be addressed in 8, 16 or 32-bit models• 2nd group is segment register

consisting of code segment (CS), stack segment (SS), data segment (DS) and extra segment (ES, FS, GS). This register manages operation with external memory. Addr computation & Data movements are performed here.• 3rd group contains instruction pointer

& flag register.

Page 13: INTRODUCTION TO INTEL X-86 FAMILY

31……… 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

RESERVED AC VM RF O NT IO PL O D I T S Z - A - P - C

C…. Carry flagP – Parity flagA – Auxilliary carry flagZ – Zero flagS – Sign flagT – Trap flagI – Interrupt flagD – Direction flagO – Overflow flag IO, PL – I/O Privilege levelNT – Nested Task flagRF - Resume flagVM – Virtual mode flagAC – Alignment flag

Page 14: INTRODUCTION TO INTEL X-86 FAMILY