Suppose AX contains 7FFFh and BX contains 0001h after the operation of ADD AX, BX find the content of the CF, SF, ZF, PF and OF.
MOV AX, 7FFFh ;AX = 7FFFh
MOV BX, 0001h ;BX = 0001b
ADD AX, BX ;add BX to AX, now AX =
8000h
7FFF
|
0111
|
1111
|
1111
|
1111
|
|
+ 0001
|
0000
|
0000
|
0000
|
0001
|
|
8000
|
1000
|
0000
|
0000
|
0000
|
Flag
register status
CF = 0 since there is no carry beyond
d15
AF = 1 since there is a carry from d3
to d4
PF = 1 since there is an even number
of 1’s in the result
ZF = 0 since the result is not zero
SF = 1 since d15 of the result is 1.
No comments
Dear Members, Thanks for Your Comments. We must be reply your comment answer as soon as possible. Please Stay with us.....