
Instruction Set
4-11
ADC
ADC
Flag Settings After Instruction
Examples
This example adds two 32-bit unsigned numbers.
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Processor Status
Flags Register
reserved
OF DF
IF TF SF ZF
AF
PF
CF
? = undefined; – = unchanged
OF=1 if result larger than destination operand
OF=0 otherwise
AF=1 if carry or borrow to low nibble
AF=0 otherwise
PF=1 if low byte of result has even number of set bits
PF=0 otherwise
CF=1 for carry or borrow to high-order bit
CF=0 otherwise
–
–
–
res
res
res
SF=1 if result is 0 or positive
SF=0 if result is negative
ZF=1 if result equal to 0
ZF=0 if result not equal to 0
UADDEND1
DD
592535620
; 23516044h
UADDEND2
DD
3352720
; 00332890h
; 32-bit unsigned addition: UADDEND1 = UA UADDEND2
; add left words (bytes and words reversed in memory)
MOV
AX,WORD PTR UADDEND2
ADD
WORD PTR UADDEND1,AX
; add right words
MOV
AX,WORD PTR U2
ADC
WORD PTR U2,AX
; UADDEND1 = 238488D4h
; = 595888340
Summary of Contents for Am186 Series
Page 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Page 10: ...Table of Contents x...
Page 18: ...Programming 1 8...
Page 40: ...Instruction Set Listing 3 14...