Section 002. Read this before starting!

Similar documents
Section 001. Read this before starting!

Section 001. Read this before starting!

Read this before starting!

Section 001 & 002. Read this before starting!

Read this before starting!

Section 001. Read this before starting!

Read this before starting!

Section 001. Read this before starting! You may use one sheet of scrap paper that you will turn in with your test.

East Tennessee State University Department of Computer and Information Sciences CSCI 4717 Computer Architecture TEST 3 for Fall Semester, 2005

Read this before starting!

East Tennessee State University Department of Computer and Information Sciences CSCI 4717 Computer Architecture TEST 2 for Fall Semester, 2007

East Tennessee State University Department of Computer and Information Sciences CSCI 4717 Computer Architecture TEST 3 for Fall Semester, 2006

East Tennessee State University Department of Computer and Information Sciences CSCI 1710/Section 001 Web Design I TEST 1 for Fall Semester, 2000

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

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

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

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.

Read this before starting!

Read this before starting!

Intel 8086 MICROPROCESSOR ARCHITECTURE

Read this before starting!

Read this before starting!

9/25/ Software & Hardware Architecture

Read this before starting!

LABORATORY WORK NO. 7 FLOW CONTROL INSTRUCTIONS

Read this before starting!

Intel 8086 MICROPROCESSOR. By Y V S Murthy

CHAPTER SEVENTEEN Assemblers versus Compilers. Intel 80x86 Assembly Language

IFE: Course in Low Level Programing. Lecture 6

CC411: Introduction To Microprocessors

icroprocessor istory of Microprocessor ntel 8086:

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.

MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN

Signed number Arithmetic. Negative number is represented as

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

Code segment Stack segment

Selection and Iteration. Chapter 7 S. Dandamudi

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

Chapter 12. Selected Pentium Instructions

8086 INSTRUCTION SET

Week /8086 Microprocessor Programming

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

Read this before starting!

8086 INTERNAL ARCHITECTURE

Arithmetic and Logic Instructions And Programs

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

Read this before starting!

8086 Programming. Multiplication Instructions. Multiplication can be performed on signed and unsigned numbers.

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

CSC 2400: Computer Systems. Towards the Hardware: Machine-Level Representation of Programs

Intel Instruction Set (gas)

EC 333 Microprocessor and Interfacing Techniques (3+1)

It is possible to define a number using a character or multiple numbers (see instruction DB) by using a string.

CSC 8400: Computer Systems. Machine-Level Representation of Programs

Summer 2003 Lecture 4 06/14/03

THE UNIVERSITY OF TRINIDAD & TOBAGO

Q1: Multiple choice / 20 Q2: Protected mode memory accesses

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

Basic Assembly SYSC-3006

Lab 6: Conditional Processing

CS401 Assembly Language Solved MCQS From Midterm Papers

Lecture (08) x86 programming 7

mith College Computer Science CSC231 Assembly Week #9 Spring 2017 Dominique Thiébaut

Introduction to Microprocessor

CMSC 313 Lecture 05 [draft]

Internal architecture of 8086

UNIT 2 PROCESSORS ORGANIZATION CONT.

CSE351 Spring 2018, Midterm Exam April 27, 2018

Intel 8086: Instruction Set

ADVANCE MICROPROCESSOR & INTERFACING

Lecture 8: Control Structures. Comparing Values. Flags Set by CMP. Example. What can we compare? CMP Examples

SOEN228, Winter Revision 1.2 Date: October 25,

Arithmetic Instructions

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

CS-202 Microprocessor and Assembly Language

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

Conditional Processing

PESIT Bangalore South Campus

Chapter 6 (Part a) Conditional Processing

Introduction to 8086 Assembly

Logic Instructions. Basic Logic Instructions (AND, OR, XOR, TEST, NOT, NEG) Shift and Rotate instructions (SHL, SAL, SHR, SAR) Segment 4A

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

If a b or a c, then a bc If a b and b c, then a c Every positive integer n > 1 can be written uniquely as n = p 1 k1 p 2 k2 p 3 k3 p 4 k4 p s

Chapter Four Instructions Set

CSE 351 Midterm Exam

Assembly Language Lab # 6

Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION 80x86 Instructions

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

Basic Assembly Instructions

if 2 16bit operands multiplied the result will be

CSE2421 FINAL EXAM SPRING Name KEY. Instructions: Signature

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

Read this before starting!

x64 Cheat Sheet Fall 2014

APPENDIX C INSTRUCTION SET DESCRIPTIONS

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI

Lecture 9. INC and DEC. INC/DEC Examples ADD. ADD Examples SUB. INC adds one to a single operand DEC decrements one from a single operand

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

IBM PC Hardware CPU 8088, Pentium... ALU (Arithmetic and Logic Unit) Registers. CU (Control Unit) IP.

An Introduction to x86 ASM

Transcription:

Points missed: Student's Name: _ Total score: /100 points East Tennessee State University -- Department of Computer and Information Sciences CSCI 2150 Computer Organization Final Exam for Fall Semester, 2001 Instructor: David Tarnoff Section 002 Read this before starting! The total possible score for this test is 100 points. This test is closed book and closed notes All answers must be placed in blanks provided. Failure to do so will result in no credit for answer. 1 point will be deducted per answer for missing or incorrect units when required. No assumptions will be made for hexadecimal versus decimal, so you should always include the base in your answer. If you perform work on the back of a page in this test, indicate that you have done so in case the need arises for partial credit to be determined. Calculators are not allowed. Use the tables below for any conversions you may need. Leaving numeric equations is fine too. Binary Hex Binary Hex Power of 2 Equals 0000 0 1000 8 2 3 8 0001 1 1001 9 2 4 16 0010 2 1010 A 2 5 32 0011 3 1011 B 2 6 64 0100 4 1100 C 2 7 128 0101 5 1101 D 2 8 256 0110 6 1110 E 2 9 512 0111 7 1111 F 2 10 1K Academic Misconduct: ETSU Policy No. 3.13, October 1, 1979: Fine print "All students in attendance at East Tennessee State University are expected to be honorable." "Academic misconduct will be subject to disciplinary action. Any act of dishonesty in academic work constitutes academic misconduct. This includes plagiarism, the changing or falsifying of any academic documents or materials, cheating, and the giving or receiving of unauthorized aid in tests, examinations, or other assigned school work. Penalties for academic misconduct will vary with the seriousness of the offense and may include, but are not limited to: a grade of "F" on the work in question, a grade of "F" for the course, reprimand, probation, suspension, and expulsion. For a second academic offense, the penalty is permanent expulsion."

INC - Increment Usage: INC dest Modifies flags: AF OF PF SF ZF Description: Adds one to destination unsigned binary operand. Jxx - Jump Instructions Table Mnemonic Meaning Jump Condition JA Jump if Above CF=0 and ZF=0 JAE Jump if Above or Equal CF=0 JE Jump if Equal ZF=1 JG Jump if Greater (signed) ZF=0 and SF=OF JGE Jump if Greater or Equal (signed) SF=OF JL Jump if Less (signed) SF!= OF JLE Jump if Less or Equal (signed) ZF=1 or SF!= OF JMP Unconditional Jump unconditional JNA Jump if Not Above CF=1 or ZF=1 JNB Jump if Not Below CF=0 JNE Jump if Not Equal ZF=0 JNG Jump if Not Greater (signed) ZF=1 or SF!= OF JNL Jump if Not Less (signed) SF=OF JZ Jump if Zero ZF=1 MOV - Move Byte or Word Usage: MOV dest,src Description: Copies byte or word from the source operand to the destination operand. If the destination is SS interrupts are disabled except on early buggy 808x CPUs. Some CPUs disable interrupts if the destination is any of the segment registers POP - Pop Word off Stack Usage: POP dest Description: Transfers word at the current stack top (SS:SP) to the destination then increments SP by two to point to the new stack top. CS is not a valid destination. PUSH - Push Word onto Stack Usage: PUSH src Description: Decrements SP by the size of the operand (two or four, byte values are sign extended) and transfers one word from source to the stack top (SS:SP). SAL/SHL - Shift Arithmetic Left / Shift Logical Left Usage: SAL dest,count SHL dest,count Modifies flags: CF OF PF SF ZF (AF undefined) Shifts the destination left by "count" bits with zeroes shifted in on right. The Carry Flag contains the last bit shifted out. SAR - Shift Arithmetic Right Usage: SAR dest,count Modifies flags: CF OF PF SF ZF (AF undefined) Shifts the destination right by "count" bits with the current sign bit replicated in the leftmost bit. The Carry Flag contains the last bit shifted out.

1.) If I wanted to clear bit positions 0, 1, 2, and 5 of an 8-bit value, what bitwise operation and corresponding bit mask would I use? Operation: (1 point) Mask: (2 points) 2.) Mathematically, a left-shift by three bit positions is equivalent to what? (2 points) 3.) Assuming BX contains the value 1001h and the table to the right represents the contents of a short portion of memory, indicate what value AL contains after each of the following MOV instructions. (2 points each) MOV AL, [BX] AL = MOV AL, [1002h] AL = MOV AL, [BX+2] AL = Address DS:1000 DS:1001 DS:1002 DS:1003 DS:1004 DS:1005 Value 23h 5Fh 10h ACh 5Bh BCh 4.) Of the following jump instructions, indicate which ones will jump to the address LOOP, which ones will simply execute the next address (i.e., not jump), and which ones you don't have enough information to tell. Instruction Current Flags Jump to LOOP Not jump to LOOP Cannot be determined JNE LOOP SF=0, ZF=1, CF=0 (2 points) JMP LOOP SF=1, ZF=0 (2 points) JG LOOP SF=0, ZF=0, CF=0 (2 points) JLE LOOP SF=0, ZF=1, OF=1 (2 points) 5.) Assume AX=1234h, BX=FEDCh, and CX=0000h. After the following code is executed, what would AX, BX, and CX contain? Place your answers in space below: PUSH AX PUSH BX AX = PUSH CX POP CX BX = POP AX POP BX CX = 6.) Assume that before each of the following instructions, AX=90FFh. What will ZF, SF, and CF equal after executing the instruction? IMPORTANT: Note that these instructions are not executed in a sequence as the problems we did in class were. Leave the flag blank if it is not affected by the instruction. Instruction Zero Flag Sign Flag Carry Flag INC AX INC AL SAL AX,3 SAR AX,1

7.) What is the purpose of the ALU in a microprocessor? 8.) What is the purpose of the segment/pointer pair CS:IP? 9.) What is the purpose of the segment/pointer pair SS:SP? 10.) Name the two benefits of the segment/pointer addressing system of the 8088. (4 points) 11.) If a processor takes 3 cycles to execute any instruction (fetch, decode, execute), how many cycles would a pipelined processor save over a non-pipelined processor to execute 15 instructions? (5 points) 12). Circle all of the following 8088 registers that are 8-bit registers. (4 points) a. AX b. SP c. BL d. DS e. CH f. IP g. DI h. DL 13.) What physical address does the segment/pointer combination 2000:01A3 represent? (4 points) 14.) On an 80x86 processor with 20 address lines, how big is the processor's memory space? 15.) On an 80x86 processor with 20 address lines, what is the maximum number of I/O ports? 16.) Which of the following 80x86 assembly commands is used to write data to an I/O port? (2 points) a.) MOV b.) OUT c.) PORT d.) SEND e.) None of these

17.) What assembly language command on an 80x86 processor is used to read data from memory? 18.) On an 80x86 processor, which of the following lines is pulsed low during a read from memory? a) ^MRDC b) ^IORC c) ^MWTC d) ^IOWC e) None of these 19.) How are comments identified in an assembly language program? 20.) List an advantage we discussed in class of interrupts. 21.) Define the term hot-swappable. Questions 22 and 23 are based on the following RS232 signal sent with 8 data bits and odd parity. Logic 1 Logic 0 One bit time 22.) What is the binary value being transmitted in this signal? (4 points) 23.) True or false: The parity bit is correct. 24.) Classify each of the following characteristics as RS232 serial (R), USB (U), Firewire(F), GPIB (G), or SCSI (S). (2 points each) Serial point-to-point communications Developed by Apple for the transmission of video and audio Primarily used for scientific instrumentation Can have at most 63 peripheral devices connected on a single network Uses two possible data connection speeds on a single network