SAM47 INSTRUCTION SET
KS57C2308/P2308/C2316/P2316
5-24
ADC
—
Add With Carry
ADC
dst,src
Operation:
Operand
Operation Summary
Bytes
Cycles
A,@HL
Add indirect data memory to A with carry
1
1
EA,RR
Add register pair (RR) to EA with carry
2
2
RRb,EA
Add EA to register pair (RRb) with carry
2
2
Description:
The source operand, along with the setting of the carry flag, is added to the destination operand
and the sum is stored in the destination. The contents of the source are unaffected. If there is an
overflow from the most significant bit of the result, the carry flag is set; otherwise, the carry flag
is cleared.
If “ADC A,@HL” is followed by an “ADS A,#im” instruction in a program, ADC skips the ADS
instruction if an overflow occurs. If there is no overflow, the ADS instruction is executed normally.
(This condition is valid only for “ADC A,@HL” instructions. If an overflow occurs following an
“ADS A,#im” instruction, the next instruction will not be skipped.)
Operand
Binary Code
Operation Notation
A,@HL
0
0
1
1
1
1
1
0
C, A
←
A + (HL) + C
EA,RR
1
1
0
1
1
1
0
0
C, EA
←
EA + RR + C
1
0
1
0
1
r2
r1
0
RRb,EA
1
1
0
1
1
1
0
0
C, RRb
←
RRb + EA + C
1
0
1
0
0
r2
r1
0
Examples:
1. The extended accumulator contains the value 0C3H, register pair HL the value 0AAH, and
the carry flag is set to "1":
SCF
; C
←
"1"
ADC
EA,HL
; EA
←
0C3H + 0AAH + 1H = 6EH, C
←
"1"
JPS
XXX
; Jump to XXX; no skip after ADC
2. If the extended accumulator contains the value 0C3H, register pair HL the value 0AAH, and
the carry flag is cleared to "0":
RCF
; C
←
"0"
ADC
EA,HL
; EA
←
0C3H + 0AAH + 0H = 6DH, C
←
"1"
JPS
XXX
; Jump to XXX; no skip after ADC
Содержание C2316
Страница 30: ...ADDRESS SPACES KS57C2308 P2308 C2316 P2316 2 22 NOTES ...
Страница 168: ...SAM47 INSTRUCTION SET KS57C2308 P2308 C2316 P2316 5 94 NOTES ...
Страница 170: ......
Страница 206: ...POWER DOWN KS57C2308 P2308 C2316 P2316 8 8 NOTES ...
Страница 210: ...RESET KS57C2308 P2308 C2316 P2316 9 4 NOTES ...
Страница 222: ...I O PORTS KS57C2308 P2308 C2316 P2316 10 12 NOTES ...
Страница 272: ...LCD CONTROLLER DRIVER KS57C2308 P2308 C2316 P2316 12 24 NOTES ...
Страница 280: ...SERIAL I O INTERFACE KS57C2308 P2308 C2316 P2316 13 8 NOTES ...
Страница 294: ...MECHANICAL DATA KS57C2308 P2308 C2316 P2316 15 2 NOTES ...
Страница 310: ...KS57P2308 P2316 OTP KS57C2308 P2308 C2316 P2316 16 16 NOTES ...
Страница 318: ......
Страница 320: ......
Страница 322: ......
Страница 325: ......
Страница 327: ......