AR101
INSTRUCTIONS:
Determine the contents of all affected general-purpose registers and flags after executing the following
program Code:
Note: Each instruction code is dependent in one another, so, whenever possible refer to the following register
contents listed and assume all flags are set initially to Zero (0).
AX 0015h BP 0002h CS 3000h
BX 0019h SP 0035h DS 2000h
CX 0012h DI 0017h SS 2000h
DX 001Bh SI 001Eh ES 4000h
SF=0 ZF=0 PF=0 CF=0 AF=0 OF=0
Assembly Code:
● ADD instructions
ADD AX, BX
ADD [SI], DX
ADD AX, BX
AX = 0015H = 0000 0000 0001 0101
BX = 0019H = 0000 0000 0001 1001
_______________________________
AX = 0000 0000 0010 1110
AX = 002E
ADD [SI], DX
[SI] = DSX10+SI
DX = 001BH
DSx10+SI
SI = 001EH
000 0010 0000 0000 0000 0000
0000 0000 0001 1110
____________________________
000 0010 0000 0000 0001 1110
SI = 02001EH
, SI = 000 0010 0000 0000 0001 1110
DX = 0000 0000 0001 1011
__________________________________
000 0010 0000 0000 0011 1001
SI = 020039
INSTRUCTIONS:
Determine the contents of all affected general-purpose registers and flags after executing the following
program Code:
Note: Each instruction code is dependent in one another, so, whenever possible refer to the following register
contents listed and assume all flags are set initially to Zero (0).
AX 0015h BP 0002h CS 3000h
BX 0019h SP 0035h DS 2000h
CX 0012h DI 0017h SS 2000h
DX 001Bh SI 001Eh ES 4000h
SF=0 ZF=0 PF=0 CF=0 AF=0 OF=0
Assembly Code:
● ADD instructions
ADD AX, BX
ADD [SI], DX
ADD AX, BX
AX = 0015H = 0000 0000 0001 0101
BX = 0019H = 0000 0000 0001 1001
_______________________________
AX = 0000 0000 0010 1110
AX = 002E
ADD [SI], DX
[SI] = DSX10+SI
DX = 001BH
DSx10+SI
SI = 001EH
000 0010 0000 0000 0000 0000
0000 0000 0001 1110
____________________________
000 0010 0000 0000 0001 1110
SI = 02001EH
, SI = 000 0010 0000 0000 0001 1110
DX = 0000 0000 0001 1011
__________________________________
000 0010 0000 0000 0011 1001
SI = 020039