UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
60
Examples
•
If Working Register R3 contains the value
16H
and Working Register R11 contains the
value
20H
, the statement:
ADD R3, R11
Object Code: 02 3B
leaves the value
36H
in Working Register R3 and clears the C, Z, S, V, D, and H flags.
•
If Working Register R15 contains the value
16H
, Working Register R10 contains
20H
,
and Register 20H contains the value
11H
, the statement:
ADD R15, @R10
Object Code: 03 FA
leaves the value
27H
in Working Register R15 and clears the C, Z, S, V, D, and H
flags.
•
If Register 34H contains the value
2EH
and Register 12H contains the value
1BH
, the
statement:
ADD 34H, 12H
Object Code: 04 12 34
leaves the value
49H
in Register 34H, sets the H flag and clears the C, Z, S, V, and D
flags.
•
Using Escaped Mode Addressing, if Register 4BH contains the value
82H
, Working
Register R3 contains the value
10H
, and Register 10H contains the value
01H
, the
statement:
ADD 4BH, @R3
Object Code: 05 E3 4B
leaves the value 83H in Register 4BH, sets the S flag and clears the C, Z, V, D, and H
flags.
•
If Register 6CH contains the value
2AH
, the statement:
ADD 6CH, #03H
Object Code: 06 6C 03
leaves the value
2DH
in Register 6H. The C, Z, S, V, D, and H flags clear.
•
If Register D4H contains the value
5FH
and Register 5FH contains the value
4CH
, the
statement:
ADD @D4H, #02H
Object Code: 07 D4 02
leaves the value
4EH
in Register 5FH and clears
the
C, Z, S, V, D, and H flags.