UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
94
Examples
•
If Working Register R3 contains the value
16H
, Working Register R11 contains the
value
20H
and the Carry flag is 1, the statement:
CPC R3, R11
Object Code: 1F A2 3B
sets the C and S flags, and clears the Z and V flags.
•
If Working Register R15 contains the value
16H
, Working Register R10 contains the
value
20H
, Register 20H contains the value
11H
and the Carry flag is 0, the statement:
CPC R15, @R10
Object Code: 1F A3 FA
clears the C, Z, S, and V flags.
•
If Register 34H contains the value
2EH
and Register 12H contains the value
1BH
, and
the Carry Flag is 1, the statement:
CPC 34H,12H
Object Code: 1F A4 12 34
clears the C, Z, S, and V flags.
•
If Register 4BH contains the value
82H
, Working Register R3 contains the value
10H
,
Register 10H contains the value
81H
, the Carry flag is 1, and the Zero flag is 0, the
statement:
CPC 4BH, @R3
Object Code: 1F A5 E3 4B
sets the Z flag, and clears the C, S, and V flags.
•
If Register 6CH contains the value
2AH
, the Carry flag is 0, and the Zero flag is 1, the
statement:
CPC 6CH, #2AH
Object Code: 1F A6 6C 2A
clears the C, Z, S, and V flags.
•
If Register D4H contains the value
FCH
, Register FCH contains the value
8FH
, and the
Carry Flag is 0, the statement:
CPC @D4H, #FFH
Object Code: 1F A7 D4 FF
sets the V flag, and clears the C, Z, and S flags.