
eZ8
™
CPU Core
User Manual
UM012820-0810 SBC Instruction
218
Attributes
Escaped Mode Addressing
Using Escaped Mode Addressing, address modes R or IR can specify a
working register. If the high nibble of the source or destination address is
Eh (1110b), a working register is inferred. For example, if Working Reg-
ister R12 (Ch) is the preferred destination operand, use ECh as the destina-
tion operand in the Op Code. To access registers with addresses E0h to
EFh, either set the Working Group Pointer, RP[7:4], to Eh or use indirect
addressing.
Sample Usage
If Working Register R3 contains the value 16h, the Carry flag is 1, and
Working Register R11 contains the value
20h, the following statement
leaves the value
F5h in Working Register R3, sets the C, S, and D flags
and clears the Z, V, and H flags:
SBC R3, R11
Object Code: 32 3B
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 following statement leaves the value 05h in Working
Register R15, sets the D flag, and clears the C, Z, S, V, and H flags:
Mnemonic
Destination,
Source
Op
Code
(Hex) Operand 1 Operand 2 Operand 3
SBC r1, r2 32 {r1, r2} — —
SBC r1, @r2 33 {r1, r2} — —
SBC R1, R2 34 R2 R1 —
SBCR1, @R235R2R1—
SBC R1, IM 36 R1 IM —
SBC @R1, IM 37 R1 IM —
Kommentare zu diesen Handbüchern