EE2007 Microprocessor systems.

Similar documents
CG2007 Microprocessor systems.

Intel 8086 MICROPROCESSOR ARCHITECTURE

Code segment Stack segment

CC411: Introduction To Microprocessors

Introduction to Microprocessor

Intel 8086 MICROPROCESSOR. By Y V S Murthy

MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN

8086 INTERNAL ARCHITECTURE

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

16-Bit Intel Processor Architecture

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

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

PESIT Bangalore South Campus

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

ADVANCE MICROPROCESSOR & INTERFACING

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

icroprocessor istory of Microprocessor ntel 8086:

EC-333 Microprocessor and Interfacing Techniques

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

9/25/ Software & Hardware Architecture

EEM336 Microprocessors I. Data Movement Instructions

Hardware and Software Architecture. Chapter 2

1. Introduction to Assembly Language

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

Internal architecture of 8086

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

CS401 Assembly Language Solved MCQS From Midterm Papers

INTRODUCTION TO MICROPROCESSORS

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


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

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

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

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

Chapter Three Addressing Mode MOV AX, BX

Mr. Sapan Naik 1. Babu Madhav Institute of Information Technology, UTU

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

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

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

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

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

if 2 16bit operands multiplied the result will be

Chapter 2 COMPUTER SYSTEM HARDWARE

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

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

Experiment 3 3 Basic Input Output

UNIT 2 PROCESSORS ORGANIZATION CONT.

Intel 8086: Instruction Set

ORG ; TWO. Assembly Language Programming

Computer Architecture 1 ح 303

Architecture of 8086 Microprocessor

8086 Microprocessors & Peripherals

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

FIFTH SEMESTER B.TECH DEGREE EXAMINATION MODEL TEST QUESTION PAPER, NOVEMBER CS 305: Microprocessor and Microcontrollers PART A

Real instruction set architectures. Part 2: a representative sample

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI

Assembling, Linking and Executing 1) Assembling: .obj obj .obj.lst .crf Assembler Types: a) One pass assembler:

The Microprocessor and its Architecture

EEM336 Microprocessors I. The Microprocessor and Its Architecture

Introduction to IA-32. Jo, Heeseung

INTRODUCTION TO IA-32. Jo, Heeseung

Babu Madhav Institute of Information Technology, UTU

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-11: 80x86 Architecture

Basic Execution Environment

Module 3 Instruction Set Architecture (ISA)

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

Computer Architecture and System Software Lecture 06: Assembly Language Programming

Assignment no:4 on chapter no :3 : Instruction set of 8086

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

Section 001. Read this before starting!

Summer 2003 Lecture 4 06/14/03

SHEET-2 ANSWERS. [1] Rewrite Program 2-3 to transfer one word at a time instead of one byte.

PESIT Bangalore South Campus

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING

Tutorial Letter 103/3/2012 Computer Organization COS2621 Semesters 1 & 2

THE UNIVERSITY OF TRINIDAD & TOBAGO

Addressing Modes on the x86

x86 Assembly Tutorial COS 318: Fall 2017

Advanced Microprocessors

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

Week 2 The 80x86 Microprocessor Architecture

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.

CS 16: Assembly Language Programming for the IBM PC and Compatibles

Philadelphia University Student Name: Student Number:

EC 333 Microprocessor and Interfacing Techniques (3+1)

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

Project 1: Bootloader. COS 318 Fall 2015

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

Assembly Language Programming of 8085

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

Chapter 3: Addressing Modes

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

2. (a) Draw and explain the pin out diagram of (b) Explain the various operations performed by Bus Interfacing unit in 8086.

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


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

8051 Microcontrollers

The 80386SX Processor Bus and Real-Mode Instruction Set

Assembly Language. Lecture 2 - x86 Processor Architecture. Ahmed Sallam

MPID MICROPROCESSOR AND ITS INTERFACING DEVICES EEE III II SEMESTER OBJECTIVE QUESTIONS

Transcription:

EE2007 Microprocessor systems Tutorial 1 Semester 1 AY 2010-11 Ganesh Iyer ganesh.vigneswara@gmail.com (facebook, gtalk) http://ganeshniyer.com

About Me I have 3 years of Industry work experience in Bangalore, India. I have finished my masters from NUS in 2008. Currently doing PhD under the guidance of Assoc/Prof. Bharadwaj Veeravalli. Research interests: Cloud computing, Game theory, Wireless Networks Office: Computer Networks and Distributed Systems Lab, E4, Level 6, Room 12 Appointment: Details are available in my webpage: http://ganeshniyer.com Interests: Kathakali, Teaching, Travelling, Photography

(1a) Typical CPU architecture Macro view.

Introduction Bus Address bus Used to specify a physical address (memory and I/O) Data bus Carries data between CPU/memory, 8086 is 16 bit processor means data bus is 16 bit wide in 8086

Introduction Register High speed storage area inside CPU All data must be kept in register before processing 16 bit CPU means registers are 16-bit wide e.g. 8086 16-bit CPU, each register is 16 bit wide and each CPU instruction can manipulate 16 bit data

Introduction Executing a high level program High-level program (e.g. C, C++, JAVA) void main() { int a=10,b=20; --- } Object code Assembly code (e.g. 8086, pentium) MOV AX, 10 MOV BX,20 ----- Executable Binary (0 s and 1 s) 01010100011 10011101010 ----

(2) Memory components

(1b) Typical CPU architecture Micro view.

(7) Instruction Execution Fetching the instruction Store in Instruction Queue Decode the instruction Execute the instruction

(3) Memory map of IBM PC Vendor s Firmware No installed memory Video Display Memory Top of RAM (= 0x000A0000) ROM-BIOS Video-ROM VRAM Extended BIOS Data 64+ kbytes 128 kbytes Volatile Program Memory RAM Different Segments (CS,DS,ES, SS) are created here 1-MB 0x00007E00 0x00007C00 0x00000500 0x00000400 0x00000000 BOOT_LOCN RBDA IVT 512 bytes 256 bytes 1024 bytes

(5,12,13) Registers General Purpose Data Registers: AX Accumulator, interrupt, general use; BX Base addressing; CX Counter; and DX Data in I/O operations Segment Registers: CS Code segment : Program Instructions SS Stack segment : Stack DS Data segment : Data area ES Extra segment : General addressing, destination segment in string ops Pointers and Index Registers: SP Stack pointer : Current stack offset (SS) BP Base pointer : Base for referencing values stored on stack (SS) SI Source index : General addressing, source offset in string ops (DS) DI Destination index : General addressing, destination in string ops (ES) AX 16 bit AH 8 bits MSB AL 8 bits LSB

(4) Segments Code Segment (CS): Program instructions Data Segment (DS): Data residing Area Stack Segment (SS): Used as Stack Extra Segment (ES): Special purposes, usually with data in string manipulations 1MB of space is divided evenly into 16 logical segments (2 20 / 2 4 )= 2 16 = 2 6. 2 10 = 64Kbytes => each segment s length

(9) How much memory can be active at a given time in the 8088 microprocessor? 4 x 64K 4 segments = CS, DS, SS, and ES each of size 64K

(15) A data segment is to be located from address A0000 to AFFFF; what value must be loaded into DS? A000h

(6) If CS = 1253H, what is the starting physical address of your code/program? What will be loaded into the IP register prior to the execution of the first instruction? Describe the function of IP Starting Physical address = CS*10h+Offset IP: 0000H (IP is the offset) = 1253*10h+0000h = 12530h IP works on CS space by pointing to the instruction to be executed next; After an instruction is fetched by the CPU, during the execution of the current instruction, IP is incremented to point to the next instruction to be executed.

(10) If the current values in CS and IP are 0200 and 01AC respectively, what is the address of the next instruction? CS*10h+IP = 0200h*10h+01ACh = 02000+01AC = 021ACh

(8) Show how the double word 12345678 will be stored in memory starting at address A001. A004 12 A003 34 A002 56 A001 78

(14a) Flags in 8086

(14b) How are status flags used by software? Use as decision to branch to other parts of the program Eg: JC Jump Carry jump if CF = 1 JNZ Jump No Zero jump if ZF = 0

(16 & 17) Addressing Modes in 8086 with MOV example

(18) Load 1234H and 1200H in data registers and add them. Store the result in the register DX, Also store the result in a location whose offset is 1279H. - - - - - - MOV AX, 1234H MOV BX, 1200H ADD AX,BX MOV DX,AX MOV [1279H],AX - - - - - -

(11) What is stored at address FFFF0 and what is so important about this address? Reset Address Reset Address - is a pre-set address that all processors will point to each time the reset pin is active. There is a jump instruction at this location (ROM BIOS CHIP) that will point to the beginning of the ROM BIOS program.

DUP operator If you need to declare a large array you can use DUP operator. The syntax for DUP: number DUP ( value(s) ) number - number of duplicate to make (any constant value). value - expression that DUP will duplicate. Data1 db 6 DUP(10h) Fill 6 bytes with 10 Data2 db 10 DUP(?) Reserve 10 bytes Data4 db 3 DUP(00,01) 6 bytes of alternate 00,01

BONUS!!!! If the current values in CS and IP are 0200h and 01AEh respectively, what is the address of the next instruction? Address of next instruction = 10h*0200h + 01AEh = 021AEh where 10h* operation represents a left-shift of 1 hexadecimal digit or a left-shift of 4 bits. (16 in decimal = 10 in hexa)

BONUS!!! The last stored items in the stack are the following hexadecimal values: 08, FA, 14, 92, 5E, 38 (very last), etc. Assume SS=00E0h and SP=01CBh. What is the physical address of the location containing 38? Item 38 is at the top of the stack since it is stored very last. The physical address of top of the stack = SS: SP or 10h*SS + SP = 00E00 + 01CB = 00FCBh.

BONUS!!! The size of your memo.txt file on your 8088- based PC is 365 bytes. Suppose this file is placed at the memory address DS:SI = 1200:25FF, what should be the address of last byte of this file? The starting address of the file is 12000+25FF = 145FFh. 365 bytes in Hex is 16D bytes. The last byte of this file should locate at 145FF + 16D 1 = 1476Bh.

BONUS!!! Which flag determines whether the address for a string operation is incremented or decremented? And which flag determines if interrupt to the micro-processor is enabled? Direction flag DF, and the interrupt flag IF

BONUS!!! What are the word sizes of the 8086/8088 and the 80386? 16-bit and 32-bit, respectively.

Thank you! http://ganeshniyer.com