UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
166
Examples
•
If Working Register R3 contains the value
16H
, the Carry flag is 1, and Working
Register R11 contains the value
20H
, the statement:
SBC R3, R11
Object Code: 32 3B
leaves the value
F5H
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
, the Carry flag is not set, Working
Register R10 contains the value
20H
, and Register 20H contains the value
11H
, the
statement:
SBC R15, @R10
Object Code: 33 FA
leaves the value
05H
in Working Register R15, sets the D flag and clears the C, Z, S, V
and H flags.
•
If Register 34H contains the value
2EH
, the Carry flag is set, and Register 12H
contains the value
1BH
, the statement:
SBC 34H, 12H
Object Code: 34 12 34
leaves the value
12H
in Register 34H, sets the D flag and clears the C, Z, S, V and H
flags.
•
If Register 4BH contains the value
82H
, the Carry flag is set, Working Register R3
contains the value
10H
, and Register 10H contains the value
01H
, the statement:
SBC 4BH, @R3
Object Code: 35 E3 4B
leaves the value
80H
in Register 4BH, sets the D and S flags and clears the C, Z, V and
H flags.
•
If Register 6CH contains the value
2AH
, and the Carry flag is not set, the statement:
SBC 6CH, #03H
Object Code: 36 6C 03
leaves the value
27H
in Register 6CH, sets the D flag and clears the C, Z, S, V and H
flags.
•
If Register D4H contains the value
5FH
, Register 5FH contains the value
4CH
, and the
Carry flag is set, the statement:
SBC @D4H, #02H
Object Code: 37 D4 02
leaves the value
49H
in Register 5FH, sets the D flag and clears the C, Z, S, V and H
flags.