UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
92
Examples
•
If Working Register R3 contains the value
16H
and Working Register R11 contains the
value
20H
, the statement:
CP R3, R11
Object Code: 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
, and Register 20H contains
11H
, the statement:
CP R15, @R10
Object Code: A3 FA
clears the C, Z, S, and V flags.
•
If Register 34H contains the value
2EH
and Register 12H contains the value
1BH
, the
statement:
CP 34H,12H
Object Code: 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
,
and Register 10H contains the value
01H
, the statement:
CP 4BH, @R3
Object Code: A5 E3 4B
sets the S flag, and clears the C, Z, and V flags.
•
If Register 6CH contains the value
2AH
, the statement:
CP 6CH, #2AH
Object Code: A6 6C 2A
sets the Z flag, and clears the C, S, and V flags.
•
If Register D4H contains the value
FCH
, and Register FCH contains the value
8FH
, the
statement:
CP @D4H, #FFH
Object Code: A7 D4 FF
sets the V flag, and clears the C, Z, and S flags.