UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
177
Examples
•
If Working Register R3 contains the value
16H
, and Working Register R11 contains
the value
20H
, the statement:
SUB R3, R11
Object Code: 22 3B
leaves the value
F6H
in Working Register R3, sets the C, S and D flags and clears the
Z, V, and H flags.
•
If Working Register R15 contains the value
16H
, Working Register R10 contains the
value
20H
, and Register 20H contains the value
11H
, the statement:
SUB R15, @R10
Object Code: 23 FA
leaves the value 05H in Working Register R15. The D flag is set, and the C, Z, S, V,
and H flags are cleared.
•
If Register 34H contains the value 2EH, and Register 12H contains the value 1BH, the
statement:
SUB 34H, 12H
Object Code: 24 12 34
leaves the value
13H
in Register 34H, sets the D flag and clears the C, Z, S, V and H
flags are cleared.
•
If Register 4BH contains the value
82H
, Working Register R3 contains the value
10H
,
and Register 10H contains the value
01H
, the statement:
SUB 4BH, @R3
Object Code: 25 E3 4B
leaves the value
81H
in Register 4BH, sets the D and S flags and clears the C, Z, V and
H flags are cleared.
•
If Register 6CH contains the value
2AH
, the statement:
SUB 6CH, #03H
Object Code: 26 6C 03
leaves the value
27H
in Register 6CH, sets the D flag and clears the C, Z, S, V and H
flags are cleared.
•
If Register D4H contains the value
5FH
, Register 5FH contains the value
4CH
, the
statement:
SUB @D4H, #02H
Object Code: 27 D4 02
leaves the value
4AH
in Register 5FH, sets the D flag and clears the C, Z, S, V and H
flags.