2. [15M] For the following code, assume the initial values: CS = 0000H, IP = 0000H, DS = 0000H.
Answer the following questions in the provided box ONLY. Note: The machine opcode for
unconditional branch instruction "JMP" is E9H. Note that, when used as an instruction, JMP x, the x
refers to displacement.
.MODEL SMALL
.DATA
ORG 000EH
N DB E9H
N1 DW 3
.CODE
MOV AX, CS; 2 byte
a. [5M] The instruction MOV AX, BX is executed
number of times.
MOV DS, AX; 2 byte
MOV AX, 0001H; 4 bytes
MOV BX, OFFSET N1; 4 bytes
MOV CX, AX; 2 byte
ORG 17
MOV CL, 5; 3 bytes
UP:
MOV AX, BX; 2 bytes
ADD AX, BX; 2 bytes
DEC CL; 1 byte
JNZ UP; 2 bytes
.EXIT
END
b. [5M] The final value in the register AX (as a Hexadecimal
value) is
c. [5M] Before the termination of the code, the instruction queue
is flushed
number of times.