Section 001. Read this before starting!

Similar documents
Read this before starting!

Section 002. Read this before starting!

Section 001. 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!

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.

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

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 4717 Computer Architecture TEST 2 for Fall Semester, 2007

Intel 8086 MICROPROCESSOR ARCHITECTURE

CHAPTER SEVENTEEN Assemblers versus Compilers. Intel 80x86 Assembly Language

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

Read this before starting!

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!

Intel 8086 MICROPROCESSOR. By Y V S Murthy

9/25/ Software & Hardware Architecture

Read this before starting!

Read this before starting!

Read this before starting!

Read this before starting!

8086 INTERNAL ARCHITECTURE

Code segment Stack segment

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

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.

CC411: Introduction To Microprocessors

Arithmetic and Logic Instructions And Programs

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

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

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

Intel 8086: Instruction Set

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

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

icroprocessor istory of Microprocessor ntel 8086:

LABORATORY WORK NO. 7 FLOW CONTROL INSTRUCTIONS

8086 INSTRUCTION SET

PESIT Bangalore South Campus

Summer 2003 Lecture 4 06/14/03

Introduction to Microprocessor

THE UNIVERSITY OF TRINIDAD & TOBAGO

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

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

MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

Week /8086 Microprocessor Programming

UNIT 2 PROCESSORS ORGANIZATION CONT.

Read this before starting!

CS401 Assembly Language Solved MCQS From Midterm Papers

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

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

IFE: Course in Low Level Programing. Lecture 6

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

Read this before starting!

Selection and Iteration. Chapter 7 S. Dandamudi

INDEX. asynchronous memory, 270 auxiliary carry flag, 366 AX. See accumulator register

EC 333 Microprocessor and Interfacing Techniques (3+1)

ADVANCE MICROPROCESSOR & INTERFACING

Basic Assembly SYSC-3006

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

Chapter 12. Selected Pentium Instructions

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

Chapter Four Instructions Set

CS-202 Microprocessor and Assembly Language

Lecture (08) x86 programming 7

CS401 Assembly Language Solved Subjective MAY 03,2012 From Midterm Papers. MC

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

complement) Multiply Unsigned: MUL (all operands are nonnegative) AX = BH * AL IMUL BH IMUL CX (DX,AX) = CX * AX Arithmetic MUL DWORD PTR [0x10]

UNIT II OVERVIEW MICROPROCESSORS AND MICROCONTROLLERS MATERIAL. Introduction to 8086 microprocessors. Architecture of 8086 processors

Internal architecture of 8086

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

Intel Instruction Set (gas)

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

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

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

if 2 16bit operands multiplied the result will be

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 15 Intel Manual, Vol. 1, Chapter 3. Fri, Mar 6, Hampden-Sydney College. The x86 Architecture. Robb T. Koether. Overview of the x86

Assembly Language LAB

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

SOEN228, Winter Revision 1.2 Date: October 25,

Arithmetic Instructions

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

Basic Assembly Instructions

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

Introduction to IA-32. Jo, Heeseung

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

Chapter 5. Real-Mode 80386DX Microprocessor Programming 1 Part 2. The 80386, 80486, and Prentium Processors,Triebel Prof. Yan Luo, UMass Lowell 1

INTRODUCTION TO IA-32. Jo, Heeseung

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

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

8088/8086 Programming Integer Instructions and Computations

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI

CSE351 Spring 2018, Midterm Exam April 27, 2018

Logical and bit operations

CMSC 313 Lecture 05 [draft]

Transcription:

Points missed: Student's Name: Total score: /100 points East Tennessee State University Department of Computer and Information Sciences CSCI 2150 (Tarnoff) Computer Organization TEST 3 for Fall Semester, 2003 Section 001 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 space provided. Failure to do so may result in loss of points. 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 2 20 1M 2 30 1G Fine print Academic Misconduct: Section 5.7 "Academic Misconduct" of the East Tennessee State University Faculty Handbook, June 1, 2001: "Academic misconduct will be subject to disciplinary action. Any act of dishonesty in academic work constitutes academic misconduct. This includes plagiarism, the changing of 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' of the course, reprimand, probation, suspension, and expulsion. For a second academic offense the penalty is permanent expulsion."

DEC - Decrement Usage: DEC dest Modifies flags: AF OF PF SF ZF Description: Unsigned binary subtraction of one from the destination. INC - Increment Usage: INC dest Modifies flags: CF AF OF PF SF ZF Description: Adds one to destination unsigned binary operand. Jxx - Jump Instructions Table Mnemonic Meaning Jump Condition 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 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 "src" operand to the "dest" operand. NOT - One's Compliment Negation (Logical NOT) Usage: NOT dest Description: Inverts the bits of the dest operand forming the 1s complement. 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.

Answer questions 1 through 9 based on the following settings of the 8086 registers. AX = 2345h SP = 0123h CS = 1000h BX = 8080h IP = 1234h DS = 2000h CX = 0055h DI = 2345h SS = 3000h DX = 9876h SI = 3456h ES = 4000h 1. What is the value in the register DH? (2 points) 2. What is the physical address pointed to by DS:DI? (3 points) 3. True or false: The physical address of the next instruction to be executed by the processor can be calculated from the above data? (2 points) 4. True or false: The physical address of the top of the stack can be calculated from the above data? (2 points) 5. What is the value of SP after the execution of the instruction POP AX? (2 points) 6. What is the value of SS after the execution of the instruction POP AX? (2 points) 7. Assume that the instruction DEC CH is executed. How would the following flags be set? Write "N/A" if the flag was not affected. (3 points) ZF = CF = SF = 8. Assume that the instruction SAL AH,2 is executed. How would the following flags be set? Write "N/A" if the flag was not affected. (3 points) ZF = CF = SF = 9. Assume that the instruction SAR BL,3 is executed. What would the new value of BL be? (2 points) 10. List the two benefits of segmented addressing. (3 points) 11. List one benefit of using assembly language. (2 points)

12. List one drawback of using assembly language. (2 points) 13. For each of the following registers, identify how many bits they contain. (4 points) BP = bits IP = bits DI = bits DL = bits 14. What character/symbol is used to indicate the start of a comment in assembly language for the assembler we used in class? (2 points) 15. For each of the assembly language commands below, what is the boolean value for the active low signals ^MRDC, ^MWTC, ^IORC, and ^IOWC. (4 points) mov in mov out ah,[5674h] bh,1234h [ax],bx 4af5h,bh ^MRDC ^MWTC ^IORC ^IOWC 16. Assume the register BX contains the value 2000h 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, DS:[BX] AL = MOV AL, DS:[BX+1] AL = MOV AX, BX AL = MOV AX, 2003 AL = Address DS:2000 DS:2001 DS:2002 DS:2003 DS:2004 DS:2005 Value 17h 28h 39h 4Ah 5Bh 6Ch 17. If a processor takes 3 cycles to execute any instruction (fetch, decode, execute), how many cycles would a non-pipelined processor take to execute 5 instructions? (3 points) 18. If a processor takes 3 cycles to execute any instruction (fetch, decode, execute), how many cycles would a pipelined processor take to execute 5 instructions? (3 points) 19. On an 80x86 processor with 32 address lines, what is the maximum number of I/O ports? (2 points)

20. True or false: Interrupt-driven I/O is faster than non-interrupt-driven I/O because the processor does not need to constantly be checking with the device to see if it needs serviced. (2 points) 21. True or false: DMA is faster than non-dma because the data does not have to be read from the I/O device into the processor then copied to memory. It is simply copied directly from the device to memory. (2 points) 22. 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 JE LOOP SF=0, ZF=1, OF=0 (2 points) JNB LOOP SF=1, ZF=0, CF=0 (2 points) JMP LOOP SF=0, ZF=0, OF=0 (2 points) JGE LOOP ZF=0, SF=0, OF=1 (2 points) 23. Using an original value of 11000011 2 and a mask of 00001111 2, calculate the results of a bitwise AND, a bitwise OR, and a bitwise XOR for these values. (2 points each) Original value Bitwise operation Mask Result 11000011 2 AND 00001111 2 11000011 2 OR 00001111 2 11000011 2 XOR 00001111 2 24. Assume AX=1000h, BX=2000h, and CX=3000h. After the following code is executed, what would AX, BX, and CX contain? (3 points) Place your answers in space below: PUSH CX PUSH BX AX = PUSH AX POP AX BX = POP CX POP BX CX = For the next 5 problems, indicate whether the statement describes DRAM or SRAM 25. is the fastest. (2 points) 26. is the cheapest. (2 points) 27. is the uses flip-flops or D-latches to store data. (2 points) 28. is used for main memory. (2 points) 29. is used for cache memory. (2 points)

30. Draw a line between the memory type on the left and its most appropriate characteristic on the right. (1 point each) EEPROM Flash RAM EPROM OTPROM Custom masked ROM This has a very high initial one-time cost regardless of how many you buy. Very cheap to buy individual chips afterward. Old PC's used to use these for their BIOS. They usually had a sticker to cover up a small window in the top of the chip. This one is like RAM, but can only be written to or erased in large blocks. User programmable, but if there is an error in the code, you cannot erase it, you need to program a new memory. This one can be written to by the processor, but has a very slow write time as compared to RAM. Questions 26 through 27 are based on the following RS232 serial signal sent with 8 data bits. Logic 1 Logic 0 One bit time 31. What is the binary value being transmitted in this signal? (4 points) 32. Assuming the parity had been set to even, indicate whether an error has occurred. (2 points) a.) No error b.) Error c.) Cannot be determined 33. True or false: a parity bit can only detect if an odd number of bit errors has occurred. (2 points) 34. What is the maximum number of devices that can be connected to a single RS232 serial connection? (2 points)