UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
55
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 Register R12 (
CH
) is the desired destination operand,
use
ECH
as the destination operand in the opcode. To access Registers with addresses
E0H
to
EFH
, either set the Working Group Pointer, RP[7:4], to
EH
or use indirect addressing.
Examples
•
If Working Register R3 contains the value
16H
, the Carry flag is 1, and Working
Register R11 contains the value
20H
, the statement:
ADC R3, R11
Object Code: 12 3B
leaves the value
37H
in Working Register R3 and clears the C, Z, S, V, D, 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:
ADC R15, @R10
Object Code: 13 FA
leaves the value
27H
in Working Register R15 and clears the C, Z, S, V, D, and H
flags.
•
If Register 34H contains the value
2EH
, the Carry flag is set, and Register 12H
contains the value
1BH
, the statement:
ADC 34H, 12H
Object Code: 14 12 34
leaves the value
4AH
in Register 34H, sets the H flag and clears the C, Z, S, V, and D
flags.
Mnemonic
Destination, Source
Opcode (Hex)
Operand 1
Operand 2
Operand 3
ADC
r1, r2
12
{r1, r2}
—
—
ADC
r1, @r2
13
{r1, r2}
—
—
ADC
R1, R2
14
R2
R1
—
ADC
R1, @R2
15
R2
R1
—
ADC
R1, IM
16
R1
IM
—
ADC
@R1, IM
17
R1
IM
—