Z8 Microcontrollers
Instruction Descriptions and Formats ZiLOG
12-14 UM001601-0803
ADD
ADD
Example:
If Working Register R16 contains 16H, Working Register R10 contains 20H, and Register 20H contains 11H, the
statement:
ADD R16, @R10
Op Code: 03 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 and Register 12H contains 1BH, the statement:
ADD 34H, 12H
Op Code: 04 12 34
leaves the value 49H 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, Working Register R3 contains 10H, and Register 10H contains 01H, the statement:
ADD 3EH, @R3
Op Code: 05 E3 4B
leaves the value 83H 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, the statement:
ADD 6CH, #03H
Op Code: 06 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 and Register 5FH contains 4CH, the statement:
ADD @D4H, #02H
Op Code: 07 D4 02
leaves the value 4EH in Register 5FH. The C, Z, S, V, D, and H Flags are all cleared.