Assume that registers contain the following values:
Reg.
Value (hex)
AX
0111
BX
0022
CX
0003
DX
0400
Reg.
Value (hex)
SI
0001
DI
0002
BP
0003
ES
0004
Part 1: Analyze the following code and determine the final
values for AX, BX, CX, and DX.
Show your work to the right of the code.
Enter your results in the boxes below.
XOR AH,AL
NOT BH
SUB BL,BH
ADC CH,2
ROR DH,CL
Part 2: Analyze the following code and determine the final
values for SI, DI, BP, and ES.
Show your work to the right of the code.
Enter your results in the boxes below.
PUSH ES
PUSH DI
POP ES
PUSH BP
POP DI
PUSH ES
POP SI
POP SI
Enter the final values of the registers after executing the code
in parts 1 and part 2.
Reg
Value (hex)
AX
BX
CX
DX
Reg
Value (hex)
SI
DI
BP
ES
(3 pts/each = 24 pts)
Using the initial values of the registers (given at the top of the page),
Write an opcode that would simultaneously
set the carry flag and clear the overflow flag
(3pts)
Using the initial values of the registers (given at the top of the page),
Write an opcode that would simultaneously
set the carry flag and set the zero flag
(3pts)