Z8 Microcontrollers
Instruction Descriptions and Formats ZiLOG
12-12 UM001601-0803
ADC
ADD WITH CARRY
Example:
If Working Register R16 contains 16H, the C Flag is not set, Working Register R10 contains 20H, and Register 20H
contains 11H, the statement:
ADC R16, @R10
Op Code: 13 FA
leaves the value 27H in Working Register R16. The C, Z, S, V, D, and H Flags are all cleared.
Example
If Register 34H contains 2EH, the C Flag is set, and Register 12H contains 1BH, the statement:
ADC 34H, 12H
Op Code: 14 12 34
leaves the value 4AH in Register 34H. The H Flag is set, and the C, Z, S, V, and D Flags are cleared.
Example:
If Register 4BH contains 82H, the C Flag is set, Working Register R3 contains 10H, and Register 10H contains
01H, the statement:
ADC 4BH, @R3
Op Code: 15 E3 4B
leaves the value 84H in Register 4BH. The S Flag is set, and the C, Z, V, D, and H Flags are cleared.
Example:
If Register 6CH contains 2AH, and the C Flag is not set, the statement:
ADC 6CH, #03H
Op Code: 16 6C 03
leaves the value 2DH in Register 6CH. The C, Z, S, V, D, and H Flags are all cleared.
Example:
If Register D4H contains 5FH, Register 5FH contains 4CH, and the C Flag is set, the statement:
ADC @D4H, #02H
Op Code: 17 D4 02
leaves the value 4FH in Register 5FH. The C, Z, S, V, D, and H Flags are all cleared.