Professional Documents
Culture Documents
Mid Question - Sec 08 Set 01 and 02
Mid Question - Sec 08 Set 01 and 02
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.
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.