Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Department of

Electrical & Electronic Engineering


Independent University, Bangladesh BAETE Accredited

Marks
Q. No. COs Marks Course Code EEE323, ECR209, ETE317
Obtained
1 CO3 5 Course Title Microprocessor and Interfacing

2 CO3 5 Term Autumn 2021

3 CO3 5 Test ●
CT2 Mid Final
Date 08 / 11 / 2021
N/A N/A N/A N/A
Instructor Mustafa Mohammad Shaky

Total Marks 15 Time 40 mins


1. This is not an open book exam. TURN your camera ON during the exam.
2. Write your name and student ID.
3. Answer the questions. Take photo and paste in this word file.
4. Save the file name as “ID_EEE 323_MID” as WORD file.
Instructions 5. E-mail me (mustafa.mohammad.shakysets@iub.edu.bd) this WORD file
with a subject line “ID_EEE 323_CT2”.
6. You will get 10 mins for submitting the script. After 6:20 pm no script will
be taken.

Student Name Student ID

Question 01 [3 + 2 = 5 points] [CO3]: (a) Write an assembly language program for the Intel
8086 microprocessor that multiplies two 16-bit words in the memory locations called MULTIPLICAND
and MULTIPLIER, respectively, and stores the result in a memory location PRODUCT?
In the assembly language program, make sure to properly define the different segments
using the appropriate assembler directives.
(b) Draw a diagram showing the data arrangement in memory for the multiply program you wrote
in section (a)?

Answer:

Question 02 [1 × 5 = 5 points] [CO3]: In the Intel 8086 microprocessor, suppose the register
AX contains the data 13CD H. What will be the contents of AX after executing the following
programs? Assume that the initial content on the Carry Flag (CF) is zero for all the calculations. You
MUST clearly show ALL your steps in obtaining your final result for getting full and/or partial credit.
Please present your final result in Hexadecimal format.

(a) MOV CL,03H


SHL AX, CL
RET

(b) MOV CL,02H


SAR AX, CL
RET
(c) MOV CL,02H
ROR AX, CL
RET

(d) MOV CL,02H


RCL AX, CL
RET

(e) MOV CL,03H


RCR AX, CL
RET

Answer:

Question 03 [1 × 5 = 5 points] [CO3]: Given below are the contents of several Intel 8086
registers and PHYSICAL memory addresses (ALL in hexadecimal):
Registers: Memory Locations [Physical Address] = Contents
SI = 0003 [03000] = 1111 [93000] = 5000 [9FFA5] = AB37
DS = 9000 [04000] = 2222 [94000] = 6000 [9FFA6] = AB44
DI = 3000 [05000] = 3300 [95000] = 367A [9FFA7] = DD00
BX = 3000 [06000] = 4444 [96000] = 6666 [9FFA8] = EC01
BP = C345 [07000] = 5555 [97000] = 10C5 [9FFA9] = CCCC
SP = 5600 [98000] = 1157 [99000] = 1218

For the following instructions, determine the contents of AX after the each of the instruction has been
executed:

(a) MOV AX, SP AX = _____________________________


(b) MOV AX, [DS] AX = _____________________________
(c) MOV AX, [7000H] AX = _____________________________
(d) MOV AX, 3476H AX = _____________________________
(e) MOV AX, [BX+DI+1000H] AX = _____________________________

Answer: You may fill the blank space above to show your answers.

You might also like