Faculty of Engineering Student Number:



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

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

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

MACHINE ARCHITECTURE & LANGUAGE

8. MACROS, Modules, and Mouse

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

Complete 8086 instruction set

CPU Organization and Assembly Language

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

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

Z80 Instruction Set. Z80 Assembly Language

8086 Microprocessor (cont..)

Exceptions in MIPS. know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine

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

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

The 80x86 Instruction Set

PC Assembly Language. Paul A. Carter

PART B QUESTIONS AND ANSWERS UNIT I

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

Chapter 2 Logic Gates and Introduction to Computer Architecture

MICROPROCESSOR AND MICROCOMPUTER BASICS

Chapter 5 Instructor's Manual

Assembly Language Tutorial

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

A Tiny Guide to Programming in 32-bit x86 Assembly Language

Computer Organization and Architecture

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

Computer Organization and Assembly Language

How To Use A Computer With A Screen On It (For A Powerbook)

EE361: Digital Computer Organization Course Syllabus

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II

CHAPTER 6 TASK MANAGEMENT

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

CSC 2405: Computer Systems II

Machine Programming II: Instruc8ons

8051 hardware summary

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: COMPUTER ORGANIZATION AND ARCHITECTURE (Code: )

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

Assessment Plan for CS and CIS Degree Programs Computer Science Dept. Texas A&M University - Commerce

Using Debug 1 INTRODUCING DEBUG

IA-32 Intel Architecture Software Developer s Manual

Flash Microcontroller. Memory Organization. Memory Organization

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 20: Stack Frames 7 March 08

8085 INSTRUCTION SET

INTRODUCTION TO PROGRAMMING THE 8086

Hacking Techniques & Intrusion Detection. Ali Al-Shemery arabnix [at] gmail

Assessment for Master s Degree Program Fall Spring 2011 Computer Science Dept. Texas A&M University - Commerce

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

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

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

DNA Data and Program Representation. Alexandre David

Character Translation Methods

Administration. Instruction scheduling. Modern processors. Examples. Simplified architecture model. CS 412 Introduction to Compilers

PCI BIOS SPECIFICATION. Revision 2.1

King Fahd University of Petroleum and Minerals. College of Computer Science and Engineering. Computer Engineering Department COE 205

CS61: Systems Programing and Machine Organization

612 CHAPTER 11 PROCESSOR FAMILIES (Corrisponde al cap Famiglie di processori) PROBLEMS

B.Sc.(Computer Science) and. B.Sc.(IT) Effective From July 2011

(Cat. No L3) Product Data

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

Chapter 7D The Java Virtual Machine

Microprocessor & Assembly Language

MS-DOS, PC-BIOS, and File I/O Chapter 13

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

CPU performance monitoring using the Time-Stamp Counter register

HC12 Assembly Language Programming

2 ASCII TABLE (DOS) 3 ASCII TABLE (Window)

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Introduction to Microcontrollers

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

Writing an 8086 emulator in Python

Intel 64 and IA-32 Architectures Software Developer s Manual

Mouse Programming Mouse Interrupts Useful Mouse functions Mouselib.h Mouselib.c

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

2011, The McGraw-Hill Companies, Inc. Chapter 3

High-speed image processing algorithms using MMX hardware

Use of Simulator in Teaching Introductory Computer Engineering*

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

LSN 2 Computer Processors

An Introduction to Assembly Programming with the ARM 32-bit Processor Family

Phoenix Technologies Ltd.

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Instruction Set Design

Microtronics technologies Mobile:

DATA ITEM DESCRIPTION


Operating Systems. Lecture 03. February 11, 2013

1 Classical Universal Computer 3

x64 Cheat Sheet Fall 2015

X86-64 Architecture Guide

8051 MICROCONTROLLER COURSE

Processor Architectures

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

CHAPTER 7: The CPU and Memory

Chapter 5, The Instruction Set Architecture Level

W25Q80, W25Q16, W25Q32 8M-BIT, 16M-BIT AND 32M-BIT SERIAL FLASH MEMORY WITH DUAL AND QUAD SPI

The AVR Microcontroller and C Compiler Co-Design Dr. Gaute Myklebust ATMEL Corporation ATMEL Development Center, Trondheim, Norway

How To Write Portable Programs In C

Intel 8086 architecture

Transcription:

Philadelphia University Student Name: Faculty of Engineering Student Number: Dept. of Computer Engineering Final Exam, First Semester: 2012/2013 Course Title: Microprocessors Date: 17/01//2013 Course No: 0630313 Time Allowed: 2 Hours Lecturer: Dr. Qadri Hamarsheh No. Of Pages: 6 Information for Candidates 1.This examination paper contains 6 questions totaling 40 marks. 2.The marks for the questions are : Question 1 (10 marks), Question 2 (6 marks), Question 3 (7 marks) Question 4 (3 marks), Question 5 (6 marks), Question 6 (8 marks) Advice to Candidates 1. You should attempt ALL requested parts. 2. You should write your answers clearly. Basic notions: The aim of the questions in this part is to evaluate the required minimal student knowledge and skills. Answers in the pass category represent the minimum understanding of IA-32 Processor Architecture, Assembly Language Fundamentals: Instructions, Directives, Identifiers, Defining Data, Symbolic Constants, Data Transfers, Addressing, and Arithmetic instructions Addressing Modes, Conditional and Unconditional instructions, Stack, Pointers, Arrays and Procedures. Question 1 Multiple Choices (10 marks) Identify the choice that best completes the statement or answers the question. 1) Pipelining improves CPU performance due to a) reduced memory access time c) additional functional units b) increased clock speed d) the introduction of parallelism 2) Which of the following is an invalid instruction? a) MOV AX, [BP] c) MOV AX, CS b) MOV DS, CS d) None of the above 3) Which of the following is an illegal 8086 instruction? a) and bx, bx c) inc Al b) add ax, 30 d) mov 20, bx 4) An arithmetic instruction always modifies the a) an index register c) stack pointer b) program counter d) status register 5) Which of the following is not an MASM directive? a).data c) DWORD b) RET d).model 6) The call instruction is used to a) access subprograms c) perform I/O b) access memory d) access the Stack 7) The instruction jg operates with a) unsigned numbers c) 2 s complement numbers b) floating point numbers d) ASCII codes 8) The interrupt vector table (IVT) is located at addresses: a) 00000H 01024H c) 00000H 003FFH b) 00000H 000FFH d) FFF00H - FFFFFH 1

Assume the following same initial processor state to answer questions (9) and (10) below. Treat each part individually. AX BX CX 6521 H ABCD H 0105 H 9) What are the flags after CMP AH, CL a) C=1, Z=0, S=1 c) C=0, Z=1, S=1 b) C=0, Z=1, S=0 d) C=0, Z=0, S=0 10) What are the contents of BL after OR BL, 1FH a) DF H c) D2 H b) FC H d) DD H Question 2 (6 marks) a) Put in front of correct statement and in front of wrong one (3 marks) Statement Answer 1. The DI registers is a 16-bit register. 2. The register SI is divided to two registers each of 8 bits. 3. Data transfer instructions can affect the flag bits. 4. The registers SP/ESP are used with CS register to locate the next instruction. 5. Displacement is a signed value, so it can be both positive and negative. 6. In real mode, a far jump accesses any location within the first 1M byte by changing both CS and IP. b) Write instruction(s) to perform the following tasks: (3 marks) Task mark 1. Invert the seventh bit in DX (note: the LSB is the first bit) 2. Set the 5 th and the 11 th bits in AX 3. 4. 5. Calculate the 2's complement of AX Jump to label 'HELP' if AX is even Three different instructions that will subtract 1 from register DX 1 mark 2

Familiar and Unfamiliar problems solving: the aim of the questions in this part is to evaluate that the student has some basic knowledge of the key aspects of the lecture material and can attempt to solve familiar and unfamiliar problems of Assembly Language Fundamentals: Instructions, Directives, Identifiers, Defining Data, Symbolic Constants, Data Transfers, Addressing, and Arithmetic instructions Addressing Modes, Conditional and Unconditional instructions, Stack, Pointers, Arrays and Procedures. Question 3 (7 marks) a) Draw the basic components of a computer system (Microprocessor-based) and explain the main function of each component. (3 marks) a) List four types of registers used in Intel-based microprocessors (2 marks) b) Explain the various hardware and software interrupts in 8086 microprocessor. (2 marks) 3

Question 4 (3 marks) Write a complete assembly program that computes the following equation In your code: Define the 2-byte unsigned integer variables J, K, M, N and P. ; Initialize K to 9, M to 7, N to 5 and P to 3 4

Question 5 (6 marks) Write an Assembly Language program to compare two strings and display if they are equal. The program should: Use Real Mode Programming. Use Indirect Addressing Mode. Use Irvine16 library for output. Two strings must be assigned within the definition of the strings. Use EQU and $ operators to calculate the size of the string. Display the message "EQUAL" when the strings are equal and the message "NOT EQUAL" otherwise. DS must point to the segment address. 5

Question 6 (8 marks) Write an Assembly Language program which separates odd and even unsigned numbers from given 32-bit data array stored in memory locations and store in different arrays and add them individual in Assembly Language. The program should: Use Protected Mode Programming. Use Indirect Addressing Mode. The size of the array is 100 elements. The array data must be entered from the keyboard. Use Irvine32 library for the input and output operations. Good Luck 6