• Tidak ada hasil yang ditemukan

Mid Term Question - Daffodil International University

N/A
N/A
Protected

Academic year: 2023

Membagikan "Mid Term Question - Daffodil International University"

Copied!
2
0
0

Teks penuh

(1)

Daffodil International University

Department of Computer Science and Engineering Faculty of Science and Information Technology

Mid Term Examination, Semester: Summer-2020

Course Code: CSE 231 Course Title: Microprocessor,Embedded System & IoT

Section: Day (O-3) Course Teacher: A

Time: 4 Hours Answer all of the following questions Full Marks: 25 Directions:

Students need to go through the CASE STUDY shown in this exam paper.

Analyze and answer specific section based on your own thinking and work.

Do not share as this will be treated as plagiarism by Blended Learning Center.

Q1.

(a) The initial value of AX & BX registers are 0FFEH & 099CH respectively. Now show the values of AX & BX registers at each step after executing the following instructions: 2.5

(b) Suppose, AH = Last 2-digit of your id in hexadecimal and BH = First 2-digit of your id in hexadecimal.

If your DIU Student ID is 111-15-12345, then AH = 45h and BH = 11h.

Now determine the AH and BH values first using your Student ID, to use in the rest of the questions.

Output Tracing:

1. XCHG AH, BH 2. ADD AH, BH 3. SUB AH, 1Ah 4. INC BH 5. NEG BH

What are the final AH and BH values?

2.5

Write an assembly program to

(c) Display a ‘?’ character 1

(d) Read three decimal digits whose sum is less than 10 2 (e) Display the digits in reverse order with an appropriate message on the next line 3 (f ) Display the sum of the digits with an appropriate message on the next line 4

Sample execution:

?123

THE REVERSE NUMBER IS 321 THE SUM OF 1 AND 2 AND 3 IS 6

(2)

Q2. Using only MOV, ADD, SUB, INC, DEC, and NEG instructions, translate the following high-level language assignment statements into assembly language. A, B and C are word variables and AX, BX, CX are CPU registers.

a. A = -(A + 1) 1

b. B = -3 + B * 7 1

c. AX = CX + BX -AX 1

d. CX = A + B 1

e. BX = -(AX) 1

Consider AX = 1212H; BX = 1B1BH; CX = 2323H; DX = 2C2CH;

SI = 0050H; DI = 0110H; SP = 23H; BP = 0100H; DS =1010H Calculate the effective address of the following instructions:

f. MOV AX, [2300h] 1.5

g. MOV AX, 25H [BX][DI] 1.5

. A memory location has a physical address 23FF7H. Compute the following:

h. The offset address if the segment number is 21ABH 1

i. The segment number if the offset address is 102CH 1

Referensi

Dokumen terkait

Department of Computer Science and Engineering Faculty of Science & lnformation Technology Mid-Term Examination, Semester: Summer 20I7 Course Code: CSE333 Course Title: Software

Daffodil International University Department of Computer Science and Engineering Faculty of Science & Information Technology Midterm Examination, spring 2021 @ DIU Blended Learning