icroprocessor istory of Microprocessor ntel 8086:

Similar documents
Intel 8086 MICROPROCESSOR ARCHITECTURE

MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN

Intel 8086 MICROPROCESSOR. By Y V S Murthy

Code segment Stack segment

Internal architecture of 8086

8086 INTERNAL ARCHITECTURE

9/25/ Software & Hardware Architecture

A Presentation created By Ramesh.K Press Ctrl+l for full screen view

Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit

Introduction to Microprocessor

CC411: Introduction To Microprocessors

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013)

EXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM

Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions.

UNIT 2 PROCESSORS ORGANIZATION CONT.

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

EC-333 Microprocessor and Interfacing Techniques

Basic characteristics & features of 8086 Microprocessor Dr. M. Hebaishy

UNIT II OVERVIEW MICROPROCESSORS AND MICROCONTROLLERS MATERIAL. Introduction to 8086 microprocessors. Architecture of 8086 processors

Microprocessor. By Mrs. R.P.Chaudhari Mrs.P.S.Patil

ADVANCE MICROPROCESSOR & INTERFACING

UNIT-I. 1.Draw and explain the Architecture of a 8085 Microprocessor?

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

16-Bit Intel Processor Architecture


ELE 3230 Microprocessors and Computer Systems

Lecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers.

Northern India Engineering College, Delhi (GGSIP University) PAPER I

INTRODUCTION TO MICROPROCESSORS

EEM336 Microprocessors I. The Microprocessor and Its Architecture

Hardware and Software Architecture. Chapter 2

US06CCSC04: Introduction to Microprocessors and Assembly Language UNIT 1: Assembly Language Terms & Directives


Architecture of 8086 Microprocessor

Chapter 2 COMPUTER SYSTEM HARDWARE

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

Unit I Introduction. Department of Electronics and Communication Engineering VARDHAMAN COLLEGE OF ENGINEERING Shamshabad, Hyderabad , India.

8086 Microprocessors & Peripherals

Lecture (02) The Microprocessor and Its Architecture By: Dr. Ahmed ElShafee

Topic 2 :16 Bit Microprocessor: 8086 (24 Marks)

Basic Execution Environment

Assembly Language. Dr. Esam Al_Qaralleh CE Department Princess Sumaya University for Technology. Overview of Assembly Language

Module 3 Instruction Set Architecture (ISA)

Microcomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات

Lecture 15 Intel Manual, Vol. 1, Chapter 3. Fri, Mar 6, Hampden-Sydney College. The x86 Architecture. Robb T. Koether. Overview of the x86

The 8086 Microprocessor

Addressing Modes on the x86

Microprocessor and Assembly Language Week-5. System Programming, BCS 6th, IBMS (2017)

The Microprocessor and its Architecture

Marking Scheme. Examination Paper Department of CE. Module: Microprocessors (630313)

WINTER 12 EXAMINATION Subject Code : Model Answer Page No : / N. a) Describe the function of SID and SOD pins of 8085 microprocessor

SYSC3601 Microprocessor Systems. Unit 2: The Intel 8086 Architecture and Programming Model

Assembler Programming. Lecture 2

The x86 Architecture

We can study computer architectures by starting with the basic building blocks. Adders, decoders, multiplexors, flip-flops, registers,...

MICROPROCESSOR ALL IN ONE. Prof. P. C. Patil UOP S.E.COMP (SEM-II)

UNIT-1. It is a 16-bit Microprocessor (μp).it s ALU, internal registers works with 16bit binary word.

CS401 Assembly Language Solved MCQS From Midterm Papers

Introduction to IA-32. Jo, Heeseung

INTRODUCTION TO IA-32. Jo, Heeseung

MICROPROCESSOR MICROPROCESSOR ARCHITECTURE. Prof. P. C. Patil UOP S.E.COMP (SEM-II)

Chapter Three Addressing Mode MOV AX, BX

An 8-Bit Scientific Calculator Based Intel 8086 Virtual Machine Emulator

1. Introduction to Assembly Language

UNIT 1. Introduction to microprocessor. Block diagram of simple computer or microcomputer.

Week 2 The 80x86 Microprocessor Architecture

Moodle WILLINGDON COLLEGE SANGLI (B. SC.-II) Digital Electronics

6/17/2011. Introduction. Chapter Objectives Upon completion of this chapter, you will be able to:

MICROPROCESSOR MICROPROCESSOR ARCHITECTURE. Prof. P. C. Patil UOP S.E.COMP (SEM-II)

Signed number Arithmetic. Negative number is represented as

Unit 08 Advanced Microprocessor

Chapter 2: The Microprocessor and its Architecture

Intel 8086: Instruction Set

Vidyalankar. Vidyalankar T.E. Sem. V [CMPN] Microprocessors Prelim Question Paper Solution. 1. (a)

Complex Instruction Set Computer (CISC)

EC 333 Microprocessor and Interfacing Techniques (3+1)

Marking Scheme. Examination Paper. Module: Microprocessors (630313)

EE2007 Microprocessor systems.

Section 001. Read this before starting!

Dr. Ramesh K. Karne Department of Computer and Information Sciences, Towson University, Towson, MD /12/2014 Slide 1

Computer Architecture 1 ح 303

MICROPROCESSOR MCQs. 1) What does the microprocessor comprise of? a. Register section b. One or more ALU c. Control unit d.

PESIT Bangalore South Campus

MA Unit 4. Question Option A Option B Option C Option D

Chapter Four Instructions Set

Real instruction set architectures. Part 2: a representative sample

The Instruction Set. Chapter 5

80C186XL/80C188XL Microprocessor User s Manual

INDEX. 1 Study of intel 8085 micropeocessor kit. 2 Program to find addition of two 8 bit no. 3 Program to find subtraction of two 8 bit no.

CG2007 Microprocessor systems.

Arithmetic Instructions

Ex : Write an ALP to evaluate x(y + z) where x = 10H, y = 20H and z = 30H and store the result in a memory location 54000H.

Section 002. Read this before starting!

BAHAR DÖNEMİ MİKROİŞLEMCİLER LAB3 FÖYÜ

EC6504 MICROPROCESSOR AND MICROCONTROLLER

Computer Processors. Part 2. Components of a Processor. Execution Unit The ALU. Execution Unit. The Brains of the Box. Processors. Execution Unit (EU)

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY COMMUNICATION ENGINEERING REG 2008 TWO MARKS QUESTION AND ANSWERS

Microprocessor Memory Mapping. Dr. Cahit Karakuş, February-2018

IA32 Intel 32-bit Architecture

Microcomputer Architecture and Programming

Transcription:

Microprocessor A microprocessor is an electronic device which computes on the given input similar to CPU of a computer. It is made by fabricating millions (or billions) of transistors on a single chip. History of Microprocessor Microprocessor journey started with a 4-bit processor called 4004; it was made by Intel Corporation in 1971. It was 1st single chip processor. Then the idea was extended to 8-bit processors like 8008, 8080 and then 8085 (all are Intel products). 8085 was a very successful one among the 8-bit processors; however its application is very limited because of its slower computing speed and other quality factors. Some years later Intel came up with its 1st 16-bit processors 8086. Intel 8086: The 8086 is a 16-bit microprocessor chip designed by Intel corporation in between early 1976 and mid-1978. The release of Intel's 8086 microprocessor in 1978 was a watershed moment for personal computing. 1

Elements of the 8086 The 80x86 has: 16-bit internal data bus 20-bit address bus: 220 = 1,048,576 = 1 megabyte Control bus Execution Unit Bus Interface Unit Among the on-chip peripherals are: 2 direct memory access controllers (DMA) Three 16-bit programmable timers Clock generator Chip select unit Programmable Control Registers The 8086 Processor Model The simplified block diagram of the 80x86 processor model is organized as two separate processors : 1) Bus Interface Unit (BIU) 2) Execution Unit (EU). 2

Bus Interface Unit (BIU) The BIU provides hardware functions. Including generation of the memory and I/0 addresses for the transfer of data between itself and the outside world. Following functions are supported by BIU. It provides a full 16 bit bidirectional data bus and 20 bit address bus. It sends address of memory or I/O. It fetches instruction from memory. It reads data from port/memory. It writes data into port/memory. It supports instruction queuing. It makes 8086 s interface to the outside world. The BIU uses a mechanism known as an instruction stream queue to implement a pipeline architecture. 3

If the BIU is already in the process of fetching an instruction when the EU request it to read or write operands from memory or I/O, the BIU first completes the instruction fetch bus cycle before initiating the operand read / write cycle. The BIU also contains a dedicated adder which is used to generate the 20bit physical address. Execution Unit (EU) The EU receives program instruction codes and data from the BIU, executes these instructions, and stores the results in the general registers. Following functions are supported by BIU. The Execution unit is responsible for decoding and executing all instructions. The EU extracts instructions from the top of the queue in the BIU. During the execution of the instruction, the EU tests the status and control flags and updates them based on the results of executing the instruction. If the queue is empty, the EU waits for the next instruction byte to be fetched and shifted to top of the queue. The EU accesses the queue from the output end. It reads one instruction byte after the other from the output of the queue. It tells BIU from where to fetch instructions or data, decodes instructions & execute instructions. The main linkage between the two functional blocks is the instruction queue, with the BIU looking ahead of the current instruction being executed in order to keep the queue filled with instructions for the EU to decode and operate on. Instruction Queue It is of 6 Bytes. To increase the execution speed, BIU fetches as many as six instruction bytes ahead to time from memory. It operates on the principle first in first out (FIFO). 4

Then all bytes are given to EU one by one. This pre-fetching operation of BIU may be in parallel with execution operation of EU. It improves the execution speed of the instruction. The Fetch and Execute Cycle The organization of the processor into a separate BIU and EU allows the fetch and execute cycles to overlap. To see this, consider what happens when the 8086 is first started. 1. The BIU outputs the contents of the instruction pointer register (IP) onto the address bus, causing the selected byte or word in memory to be read into the BIU. 2. Register IP is incremented by one to prepare for the next instruction fetch. 3. Once inside the BIU, the instruction is passed to the queue: a first-in/first-out storage register sometimes likened to a pipeline. 4. Assuming that the queue is initially empty, the EU immediately draws this instruction from the queue and begins execution. 5. While the EU is executing this instruction, the BIU proceeds to fetch a new instruction. Depending on the execution time of the first instruction, the BIU may fill the queue with several new instructions before the EU is ready to draw its next instruction. 6. The cycle continues, with the BIU filling the queue with instructions and the EU fetching and executing these instructions. The BIU is programmed to fetch a new instruction whenever the queue has room for two additional bytes. The advantage to this pipelined architecture is that the EU can execute instructions (almost) continually instead of having to wait for the BIU to fetch a new instruction. This is shown schematically in the following Figure 5

The Wait mode There are three conditions that will cause the EU to enter a "wait" mode. I. When an instruction requires access to a memory location. The BIU must suspend fetching instructions and output the address of this memory location. After waiting for the memory access, the EU can resume executing instruction codes from the queue, and the BIU can resume filling the queue. II. When the instruction to be executed is a jump instruction. In this case, control is to be transferred to a new address. The EU must wait while the instruction at the jump address is fetched. Any bytes presently in the queue must be discarded (they are overwritten). III. During the execution of slow-executing instructions. 6

The 8086 Programming Model The programming model for a microprocessor shows the various internal registers that are accessible to the programmer. The Following Figure is a model for the 8086. In general, each register has a special function. 7

General Purpose Registers Pointer and Index Registers Segment Registers Instruction Pointer Status Flags General Purpose Registers Registers of 8086 There are four 16-bit general purpose registers: AX BX CX DX Each of these 16-bit registers are further subdivided into two 8-bit registers. AX BX CX DX AH BH CH BH AL BL CL DL 1. AX Register: AX register is also known as accumulator register that stores operands for arithmetic operation like divided, rotate. 2. BX Register: This register is mainly used as a base register. It holds the starting base location of a memory region within a data segment. 3. CX Register: It is defined as a counter. It is primarily used in loop instruction to store loop counter. 8

4. DX Register: DX register is used to contain I/O port address for I/O instruction. Pointers and Index Registers Following four registers are under this category: 1. Stack Pointer (SP), 2. Base Pointer (BP), 3. Source Index (SI), 4. Destination Index (DI). Following Registers can also be used as a general Purpose Registers. 1. Stack Pointer (SP) is a 16-bit register pointing to program Stack, also contains 16-Bit offset address. 2. Base Pointer (BP) is a 16-bit register pointing to data in stack segment. BP register is usually used for based indexed or register indirect addressing. 3. Source Index (SI) is a 16-bit register. SI is used for indexed, based indexed and register indirect addressing, as well as a source data address in string manipulation Instructions 4. Destination Index (DI) is a 16-bit register. DI is used for indexed, based indexed and register indirect addressing, as well as a destination data address in string manipulation instructions. Segment Register There are four segment registers in Intel 8086: 1. Code Segment Register (CS), 2. Data Segment Register (DS), 3. Stack Segment Register (SS), 4. Extra Segment Register (ES). A segment register points to the starting address of a memory segment, For Example: The code segment register points to the starting address of the code segment. 9

The data segment register points to the starting address of the data segment, and so on. The maximum capacity of a segment may be up to 64 KB. Code segment (CS):- It is a 16-bit register containing address of 64 KB segment with processor instructions. The processor uses CS segment for all accesses to instructions referenced by instruction pointer (IP) register. CS register cannot be changed directly. The CS register is automatically updated during far jump, far call and far return instructions. Stack segment (SS):- It is a 16-bit register containing address of 64KB segment with program stack. By default, the processor assumes that all data referenced by the stack pointer (SP) and base pointer (BP) registers is located in the stack segment. SS register can be changed directly using POP instruction. Data segment (DS):- It is a 16-bit register containing address of 64KB segment with program data. By default, the processor assumes that all data referenced by general registers (AX, BX, CX, DX) and index register (SI, DI) is located in the data segment. Extra segment (ES):- It is a 16-bit register containing address of 64KB segment, usually with program data. By default, the processor assumes that the DI register references the ES segment in string manipulation instructions. It is possible to change default segments used by general and index registers by prefixing instructions with a CS, SS,DS or ES prefix. Concept of Segmented Memory It allows the memory addressing capacity to be 1 Mbytes. 10

It allows instruction code, data stack and portion of program to be more than 64KB long. It facilitates use of separate memory areas for program, data and stack. It permits a program or its data to be put in different areas of memory In this program can be relocated which is very useful in multiprogramming i.e. multitasking becomes easy. Concept of Segmented Memory 64KB 64KB 64KB 64KB FFFFFH 7FFFFH 5FFFFH 50000H 4489FH 348A0H 2FFFFH 20000H Highest Address Top Of Extra Segment Extra Segment Base ES=7000H Top Of Stack Segment Stack Segment Base SS=5000H Top Of Code Segment Code Segment Base CS=348AH Top Of Data Segment Bottom Of Data Segment 22 Instruction Pointer The Instruction Pointer (IP) in 8086 acts as a Program Counter. It points to the address of the next instruction to be executed. Its content is automatically incremented when the execution of a program proceeds further. The contents of the IP and Code Segment Register are used to compute the memory address of the instruction code to be fetched. This is done during the Fetch Cycle. Status Flags 11

Status Flags determines the current state of the accumulator. They are modified automatically by CPU after mathematical operations. This allows to determine the type of the result. 8086 has 16-bit status register. It is also called Flag Register or Program Status Word (PSW). There are nine status flags and seven bit positions remain unused. The following Figure shows the bit definitions for the 16-bit flag register. 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 OF DF IF TF SF ZF AF PF CF Undefined Overflow Flag Trap Flag Interrupt Flag Direction Flag Sign Flag Zero Flag Parity Flag Auxiliary Carry Flag Carry Flag 25 Six of the flags are status indicators reflecting properties of the result of the last arithmetic or logical instruction 8086 flag word. DF, IF, and TF can be set or reset to control the operation of the processor. The remaining flags are status indicators. Bits marked X are undefined. 12