THE UNIVERSITY OF TRINIDAD & TOBAGO

Similar documents
Code segment Stack segment

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

Section 001. Read this before starting!

9/25/ Software & Hardware Architecture

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

CC411: Introduction To Microprocessors

Section 001 & 002. Read this before starting!

EC-333 Microprocessor and Interfacing Techniques

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

ADVANCE MICROPROCESSOR & INTERFACING

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 UNIVERSITY OF TRINIDAD & TOBAGO

MODE (mod) FIELD CODES. mod MEMORY MODE: 8-BIT DISPLACEMENT MEMORY MODE: 16- OR 32- BIT DISPLACEMENT REGISTER MODE

Ex: Write a piece of code that transfers a block of 256 bytes stored at locations starting at 34000H to locations starting at 36000H. Ans.

Chapter 3: Addressing Modes

Intel 8086 MICROPROCESSOR ARCHITECTURE

8086 INTERNAL ARCHITECTURE

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

MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN

Read this before starting!

EEM336 Microprocessors I. Data Movement Instructions

EEM336 Microprocessors I. Addressing Modes

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

The x86 Architecture

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

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

Lecture 16: Passing Parameters on the Stack. Push Examples. Pop Examples. CALL and RET

Section 002. Read this before starting!

PESIT Bangalore South Campus

X86 Addressing Modes Chapter 3" Review: Instructions to Recognize"

1. Introduction to Assembly Language

Addressing Modes on the x86

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

Intel 8086 MICROPROCESSOR. By Y V S Murthy

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI

Experiment 3 3 Basic Input Output

EC-333 Microprocessor and Interfacing Techniques

Assembly Language Each statement in an assembly language program consists of four parts or fields.

Intel 8086: Instruction Set

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

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

icroprocessor istory of Microprocessor ntel 8086:

db "Please enter up to 256 characters (press Enter Key to finish): ",0dh,0ah,'$'

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

EC 333 Microprocessor and Interfacing Techniques (3+1)

Chapter Three Addressing Mode MOV AX, BX

Data Movement Instructions

Introduction to Microprocessor

Computer Architecture and System Software Lecture 07: Assembly Language Programming

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

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

Hardware and Software Architecture. Chapter 2

CS401 Assembly Language Solved MCQS From Midterm Papers

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

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

EC 333 Microprocessor and Interfacing Techniques (3+1)

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

UNIVERSITY OF CALIFORNIA, RIVERSIDE

CG2007 Microprocessor systems.

Arithmetic Instructions

Computer Architecture 1 ح 303

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

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

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

Chapter Four Instructions Set

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

The Microprocessor and its Architecture

EE2007 Microprocessor systems.

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

x86 Assembly Tutorial COS 318: Fall 2017

Computer Architecture and System Software Lecture 06: Assembly Language Programming

Lesson 1. Fundamentals of assembly language

3- ADDRESSING MODES in 8086: In this section we use the MOV instruction to describe the data-addressing modes. Figure 3-1 shows the MOV instruction.

Reverse Engineering II: Basics. Gergely Erdélyi Senior Antivirus Researcher

UMBC. A register, an immediate or a memory address holding the values on. Stores a symbolic name for the memory location that it represents.

CONTENTS. 1. Display a Message Display a one Digit Number Accept a Character from keyboard and display the character 4

UNIT 2 PROCESSORS ORGANIZATION CONT.

if 2 16bit operands multiplied the result will be

Reverse Engineering II: The Basics

16-Bit Intel Processor Architecture

Come and join us at WebLyceum

FACULTY OF ENGINEERING LAB SHEET

Basic Execution Environment

Computer Organization & Assembly Language Programming. CSE 2312 Lecture 15 Addressing and Subroutine

ELCT 707 Micro Computer Applications Final-term Exam, Winter 2009

1-Operand instruction types 1 INC/ DEC/ NOT/NEG R/M. 2 PUSH/ POP R16/M16/SR/F 2 x ( ) = 74 opcodes 3 MUL/ IMUL/ DIV/ DIV R/M

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

FACULTY OF ENGINEERING LAB SHEET

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

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

Introduction to IA-32. Jo, Heeseung

ORG ; TWO. Assembly Language Programming

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

Week /8086 Microprocessor Programming I

4- MACHINE LANGUAGE CODING 4-1THE INSTRUCTION SET:

INTRODUCTION TO IA-32. Jo, Heeseung

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

Registers. Ray Seyfarth. September 8, Bit Intel Assembly Language c 2011 Ray Seyfarth

A4 Sample Solution Ch3

Experiment #2. Addressing Modes and Data Transfer using TASM

Transcription:

THE UNIVERSITY OF TRINIDAD & TOBAGO FINAL ASSESSMENT/EXAMINATIONS DECEMBER 2012 Course Code and Title: Microprocessor Architecture & Interfacing Programme: Computer Engineering Technician Date and Time: [Please insert in accordance to the timetable] Duration: 3hrs PLEASE READ ALL INSTRUCTIONS CAREFULLY BEFORE YOU BEGIN THIS EXAMINATION Instructions to Candidates 1. This paper has 10 pages and 5 sections. 2. You are required to answer all questions. 3. All questions must be answered on the answer booklet and numbered correctly. 4. The use of scientific calculators are Allowed. 5. You must return the question paper along with your answer booklet and other writing paper to the Invigilator at the end of the examination. Key Examination Protocol 1. Students please note that academic dishonesty (or cheating) includes but is not limited to plagiarism, collusion, falsification, replication, taking unauthorised notes or devices into an examination, obtaining an unauthorised copy of the examination paper, communicating or trying to communicate with another candidate during the examination, and being a party to impersonation in relation to an examination. 2. The above mentioned and any other actions which compromise the integrity of the academic evaluation process will be fully investigated and addressed in accordance with UTT s academic regulations. 3. Please be reminded that speaking without the Invigilator s permission is NOT allowed. The University of Trinidad & Tobago Page 1 of 10

SECTION A- [25mks] 1. State TRUE or FALSE for the following statements: a) Values cannot be loaded directly into any segment register (CS, DS, ES, or SS). (1mk) b) The ADD instruction has the following format. ADD source,destination (1mk) c) In Register addressing mode the source and destination registers must match in size. (1mk) d) The 20 bit address that is placed on the address pins of the 8086 microprocessor is called the physical address. (1mk) e) The offset address is a location within a 64K-byte segment range. (1mk) f) The ADD and the MOV instructions do not affect the source operand. (1mk) g) The general purpose registers of the 8088 are usually referred to as the workhorses. (1mk) h) The 8088 CPU is capable of only operating on operands this is 16 bits in size. (1mk) i) When data is pushed onto the stack, the stack pointer is incremented, but when data is popped off the stack, the stack pointer is decremented. (1mk) j) In the CPU registers are used to store information permanently. (1mk) The University of Trinidad & Tobago Page 2 of 10

2. Which of the following instructions cannot be coded in 8088/8086 Assembly language? Give the reason why not, if any. Assume all numbers are in hex. a) MOV AX,27 b) MOV AL,97F c) MOV AX,27 d) MOV DS,9BF2 e) MOV CX,397 f) MOV SI, 9516 g) MOV AX,27 h) MOV CS, 3490 i) MOV DS,BX j) MOV BX,CS k) MOV CH, AX l) MOV AX, 23FB9 m) MOV CS, BH n) MOV AX, DL o) MOV AABC,CX The University of Trinidad & Tobago Page 3 of 10

SECTION B-[25 mks] 1. Assume that SP = FFFEH,AX = 3291 H, BX = F43CH AND CX =09. Find the content of the stack and the stack pointer after the execution of each of the following instructions. PUSH AX PUSH BX PUSH CX (3 Marks) 2. In order for each register to get back their original values in part (a), show the sequence of instructions that needs to be executed. Show the content of SP at each point. (3 Marks) 3. How many external data leads does the 8088 have? 4. The 8088 CPU is capable of operating on size or size operands. (1 Mark) (2 Marks) 5. Assume that the registers have the following values (all in hex ) and CS = 1000, DS=2000, SS=3000,SI=4000,DI = 5000, BX = 6080, BP = 7000,AX =25FF, CX=8791, and DX = 1299. Calculate the physical address of the memory where the operand is stored and the contents of the memory locations in each of the following addressing examples. (a) MOV [SI], AL (b) MOV [3600], AX (c) MOV [BX], CX (6 Marks) 6) When data is pushed onto the stack, the stack pointer is by 2, but when data is popped off the stack, the stack pointer is by 2. (2 Marks) 7) How is the little endian convention utilized by Intel microprocessors? (2 Marks) 8) A segment is an area of memory that includes up to bytes. (1 Mark) 9) Which resgister is used as the offset register with segment register CS? (1 Mark) The University of Trinidad & Tobago Page 4 of 10

10) (i) If BX=1234H and the instruction MOV [2400],BX were executed, what would be the contents of memory locations at offsets 2400 and 2401? (2 Marks) (ii) Also state how many and what type of bus cycles would be required to perform this instruction. (2 Marks) The University of Trinidad & Tobago Page 5 of 10

Section C- [15 Mks] 1. What are the final values in the AX and BX registers for the following program? MOV AX,1234 MOV BL,AL MOV BH,AH ADD BX,03C6 INT 20 (3 marks) 2. What are the final values stored in memory locations 0200 and 0201 for the following program? MOV AL,13 MOV [ 0200],AL MOV BL,12 MOV [ 0201],BL MOV SI,0200 MOV AX,1213 ADD [SI],AX INT 20 (6 marks) The University of Trinidad & Tobago Page 6 of 10

3. What will AX equal after the following instructions have executed? 107C:0200 1A 2D 107C:0300 3B 4C MOV AX, [200] INC AX ADD AH,1 SUB AX, [200] INT 20 (6 marks) The University of Trinidad & Tobago Page 7 of 10

Section D -[20 Mks] 1. For each of the subsequent 8088 instructions, write down the following information: (i) How long (how many bytes) is the machine code (object code)? (ii) How many operands (0, 1 or 2)? (4 Marks) (4 Marks) (iii) Which is the source operand? Destination operand? If operand is in memory, where? (4 Marks) (iv) Name the addressing mode used for each instruction. (4 Marks) (v) Is the operation being performed on BYTE -sized or WORD-sized operands? (4 Marks) -u 100 128 0E97:0100 89D8 MOV AX, BX 0E97:0102 88CC MOV AH, CL 0E97:0104 01CA ADD DX, CX 0E97:0106 46 INC SI 0E97:0107 343E XOR AL, 3E 0E97:0109 B83412 MOV AX, 1234 0E97:010C 223C AND BH, [SI] 0E97:010E 0B05 OR AX, [DI] 0E97:0110 F8 CLC 0E97:0111 8A260002 MOV AH, [0200] The University of Trinidad & Tobago Page 8 of 10

Section E [15 Mks] 1. After the following instructions are executed, what will be the values of AL and BL? Add appropriate comments. dseg SEGMENT val1 DB 80H val2 DB 99H dseg ENDS cseg SEGMENT ASSUME ss:sseg,ds:dseg,cs:cseg mov al,val1 mov bl, val2 cmp al,bl ja label1 mov al,bl jmp exit label1: mov bl, al exit: cseg mov ax,4c00h ;return to DOS! (bye-bye) int 21h ENDS END start AL= BL= (9 marks) The University of Trinidad & Tobago Page 9 of 10

2. Write 8086 assembly language code to implement the following high-level construct. Assume all comparisons are made on signed numbers. Val1 db 40h Val2 db 10h Val3 db 8h IF (VAL1 < VAL2) CX = 1 ELSE CX = 0 ENDIF (6 marks) The University of Trinidad & Tobago Page 10 of 10