You are on page 1of 1

Summer 2023, CSE332/EEE332/ETE332/EEE 453; Section 08

Midterm Exam; Full marks: 15; Time: 50 minutes (SET 01/2)

 Answer any three questions.

Q. 1 Draw schematic diagram to show what happens after the execution of the 5
following instruction.
a) LDS BX, [SP] (If before execution: DS= ABE0H, SS= D750H, SP =FFFEH)
b) REP STOSB ( If before execution: CX=2, D=1, ES=10D5H, DI=0A0BH)

Q. 2 Write down the basic differences between a MACRO and PROCEDURE operation. 5

Q. 3 Suppose that AX= 10A5H, BX= 5A98H, CX=0052H and SP=010FH. Give the contents 5
of AX, BX, CX and SP after executing all the following instructions:

PUSH AX
PUSH BX
XCHG AX, CX
MOV BX, 0AB5h
POP CX

Q. 4 Write a core Assembly Language code to add 102 with 65 and then multiply the 5
result with negative six (-6) and finally divide the result with positive eight (8)
number. All the operation should be done in 16 bits system. Mention the value of
DX-AX registers both in hexadecimal and decimal values at the end.

Summer 2023, CSE332/EEE332/ETE332/EEE 453; Section 08


Midterm Exam; Full marks: 15; Time: 50 minutes (SET 01)

 Answer any three questions.

Q. 1 Draw schematic diagram to show what happens after the execution of the 5
following instruction.
a) LDS BX, [SP] (If before execution: DS= DFE0H, SS= A750H, SP =FFFDH)
b) REP STOSB ( If before execution: CX=2, D=0, ES=10B5H, DI=0A0BH)

Q. 2 Write down the basic differences between a MACRO and PROCEDURE operation. 5

Q. 3 Suppose that AX= 105AH, BX= A985H, CX=0A52H and SP=010FH. Give the contents 5
of AX, BX, CX and SP after executing all the following instructions:

PUSH AX
XCHG AX, CX
MOV BL, 0Ah
ADD CL, BH
POP CX

Q. 4 Write a core Assembly Language code to add 122 with 25 and then multiply the 5
result with negative six (-6) and finally divide the result with positive eight (8)
number. All the operation should be done in 16 bits system. Mention the value of
DX-AX registers both in hexadecimal and decimal values at the end.

You might also like