So BIU takes care of all the address and data transfers on the buses.

Similar documents
MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

The x86 PC: Assembly Language, Design, and Interfacing 5 th Edition

8086 Microprocessor (cont..)

Faculty of Engineering Student Number:

BCD (ASCII) Arithmetic. Where and Why is BCD used? Packed BCD, ASCII, Unpacked BCD. BCD Adjustment Instructions AAA. Example

Complete 8086 instruction set

Microprocessor & Assembly Language

MICROPROCESSOR AND MICROCOMPUTER BASICS

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Unpacked BCD Arithmetic. BCD (ASCII) Arithmetic. Where and Why is BCD used? From the SQL Server Manual. Packed BCD, ASCII, Unpacked BCD

CHAPTER 6 TASK MANAGEMENT

MACHINE ARCHITECTURE & LANGUAGE

Intel 8086 architecture

Computer Organization and Architecture

Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z)

Writing an 8086 emulator in Python

PART B QUESTIONS AND ANSWERS UNIT I

Outline. Lecture 3. Basics. Logical vs. physical memory physical memory. x86 byte ordering

Machine Programming II: Instruc8ons

An Introduction to the ARM 7 Architecture

Chapter 5, The Instruction Set Architecture Level

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Computer Systems Design and Architecture by V. Heuring and H. Jordan

Chapter 2 Logic Gates and Introduction to Computer Architecture

Computer Organization. and Instruction Execution. August 22

CHAPTER 4 MARIE: An Introduction to a Simple Computer

(Refer Slide Time: 00:01:16 min)

PCI BIOS SPECIFICATION. Revision 2.1

CHAPTER 7: The CPU and Memory

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

Using Debug 1 INTRODUCING DEBUG

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 5 Instructor's Manual

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Let s put together a Manual Processor

Central Processing Unit

8085 INSTRUCTION SET

Systems Design & Programming Data Movement Instructions. Intel Assembly

Appendix C: Keyboard Scan Codes

8051 hardware summary

IA-32 Intel Architecture Software Developer s Manual

Z80 Instruction Set. Z80 Assembly Language

PROBLEMS (Cap. 4 - Istruzioni macchina)

The 80x86 Instruction Set

Addressing The problem. When & Where do we encounter Data? The concept of addressing data' in computations. The implications for our machine design(s)

Embedded x86 Programming: Protected Mode

Flash Microcontroller. Memory Organization. Memory Organization

An Overview of Stack Architecture and the PSC 1000 Microprocessor

1. Computer System Structure and Components

Keil Debugger Tutorial

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

LSN 2 Computer Processors

361 Computer Architecture Lecture 14: Cache Memory

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

Microcontroller Basics A microcontroller is a small, low-cost computer-on-a-chip which usually includes:

Traditional IBM Mainframe Operating Principles

Central Processing Unit (CPU)

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

CPU Organisation and Operation

Chapter 1 Computer System Overview

Programmer s Model = model of µc useful to view hardware during execution of software instructions

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

EECS 427 RISC PROCESSOR

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

Exception and Interrupt Handling in ARM

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

1 Classical Universal Computer 3

MACHINE INSTRUCTIONS AND PROGRAMS

Instruction Set Architecture

Assembly Language Tutorial

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

CHAPTER 2: HARDWARE BASICS: INSIDE THE BOX

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12

S7 for Windows S7-300/400

DDR4 Memory Technology on HP Z Workstations

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Computer Systems Structure Main Memory Organization

PCI-SIG ENGINEERING CHANGE NOTICE

İSTANBUL AYDIN UNIVERSITY

Machine-Level Programming II: Arithmetic & Control

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

TIn 1: Lecture 3: Lernziele. Lecture 3 The Belly of the Architect. Basic internal components of the Pointers and data storage in memory

Building a computer. Electronic Numerical Integrator and Computer (ENIAC)

Chapter 1. Bootstrap. Hardware

TIMING DIAGRAM O 8085

Levels of Programming Languages. Gerald Penn CSC 324

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

OVERVIEW OF MICROPROCESSORS

M25P05-A. 512-Kbit, serial flash memory, 50 MHz SPI bus interface. Features

COMPUTER ORGANIZATION AND ARCHITECTURE. Slides Courtesy of Carl Hamacher, Computer Organization, Fifth edition,mcgrawhill

Phoenix Technologies Ltd.

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:

CS201: Architecture and Assembly Language

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

ARM Cortex-M3 Assembly Language

Transcription:

8086 Architecture BIU (Bus Interface Unit):- It sends out tasks. It fetches instructions from memory. It reads data from memory and ports. It also writes data from memory and ports. So BIU takes care of all the address and data transfers on the buses.

Execution Unit:- It tells the BIU, from where to fetch the instruction or data. It decodes the fetched instructions. It executes the fetched instructions. EU takes care of performing operations on data. The Bus Interface unit (BIU):- This unit handles all transfer of data and addresses on the buses for the EU(execution unit). This unit sends out addresses, fetches instructions from memory, reads data from ports and memory and writes data to ports and memory. Different Parts of BIU: a. Segment Register b. Instruction Pointer c. The Queue

1.)Segment Register:- BIU contains four 16-bit segment registers as follows: Code segment (CS) register Stack segment (SS) register Extra segment (ES) register Data segment (DS) register Function of Segment Register:- In 8086 complete 1MB memory is divided into 16 logical segments. Each segment thus contains 64 KB of memory. While addressing any location in the memory bank, the Physical address is calculated from two parts, the first part is Segment address, and the second is Offset. The segment registers contain 16-bit segment base addresses related to different segments. Thus the CS, DS, ES, SS segment registers, respectively contain the segment addresses for the Code, Data, Extra and Stack segments. They may or may not be physical separated.

Each segment register contains a 16-bit base address that points to the lowest-addressed byte of that particular segment in memory. Generation of physical address:- Segment address- 1005H Offset address - 5555H Segment address-1005h- 0001 0000 0000 0101 Shifted by 4-bit positions-0001 0000 0000 0101 0000 + Offset address - 0101 0101 0101 0101 Physical address -0001 0101 0101 1010 0101 1 5 5 A 5 Instruction Pointer:- It is 16-bit register, which identifies the location of the next word of instruction code that is to be fetched in the current code segment. IP contains an offset instead of the actual address of the next instruction.

The 20-bit address produced after addition of the offset stored in IP to segment base address in the CS is called the Physical address of the code byte. The Queue:- The last section of BIU is the FIFO group of registers called a queue. It is basically a group of registers. This arrangement makes possible for the BIU to fetch the instruction byte while EU is decoding an instruction or executing an instruction which does not require use of buses. This arrangement is called pipelining. This is done to speed up the program execution. Execution Unit (EU) : Execution unit receives program instruction codes and data from the BIU, executes them and stores the results in the general registers. It can also store the data in a memory location or send them to an I/O device by passing the data back to the BIU. This unit, EU, has no connection with the system Buses. It receives and outputs all its data through BIU.

ALU (Arithmetic and Logic Unit) : The EU unit contains a circuit board called the Arithmetic and Logic Unit. The ALU can perform arithmetic, such as, +,-,,/ and logic such as OR, AND, NOT operations. Register : A register is like a memory location where the exception is that these are denoted by name rather than numbers. It has 4 data registers, AX, BX, CX, DX and 2 pointer registers SP, BP and 2 index registers SI, DI and 1 temporary register and 1 status register FLAGS. AX, BX, CX and DX registers has two 8-bit registers to access the high and low byte data registers. The high byte of AX is called AH and the low byte is AL. Similarly, the high and low bytes of BX, CX, DX are BH and BL, CH and Cl, DH and DL respectively. All the data, pointer, index and status registers are of 16 bits. Else these, the temporary register holds the operands for the ALU and the individual bits of the FLAGS register reflect the result of a computation. Memory Segmentation The total memory size is divided into segments of various sizes. A segment is just an area in memory. The process of dividing memory this way is called Segmentation.

In memory, data is stored as bytes. Each byte has a specific address. Intel 8086 has 20 lines address bus. With 20 address lines, the memory that can be addressed is 2^20bytes. 2^20= 1,048,576 bytes (1 MB). 8086 can access memory with address ranging from 00000 H to FFFFF H. In 8086, memory has four different types of segments. These are: Each of these segments are addressed by an address stored in corresponding segment register. -bit in size. corresponding segment.

the upper 16 bits nnot store 20 bits, they only store. IP - the instruction pointer: Always points to next instruction to be executed Offset address relative to CS IP register always works together with CS segment register and it points to currently executing instruction. FLAGS REGISTER 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. Generally you cannot access these registers directly. Carry Flag (CF) - this flag is set to 1 when there is an unsigned overflow. For example when you add bytes 255 + 1 (result is not in range 0...255). When there is no overflow this flag is set to 0. Parity Flag (PF) - this flag is set to 1 when there is even number of one bits in result, and to 0 when there is odd number of one bits. Auxiliary Flag (AF) - set to 1 when there is an unsigned overflow for low nibble (4 bits).

Zero Flag (ZF) - set to 1 when result is zero. For non-zero result this flag is set to 0. Sign Flag (SF) - set to 1 when result is negative. When result is positive it is set to 0. (This flag takes the value of the most significant bit.) Trap Flag (TF) - Used for on-chip debugging. Interrupt enable Flag (IF) - when this flag is set to 1 CPU reacts to interrupts from external devices. Direction Flag (DF) - this flag is used by some instructions to process data chains, when this flag is set to 0 - the processing is done forward, when this flag is set to 1 the processing is done backward. Overflow Flag (OF) - set to 1 when there is a signed overflow. For example, when you add bytes 100 + 50 (result is not in range - 128...127).