UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
128
LDC
Load Constant to/from Program Memory
LDC dst, src
Operation
dst
←
src
Description
This instruction loads a byte constant from Program Memory into a Working Register or
vice versa. The address of the Program Memory location is specified by a Working Regis-
ter Pair. The contents of the source operand are unaffected.
Flags
Attributes
Examples
•
If Working Register Pair R6 and R7 contain the value
30A2H
and Program Memory
location 30A2H contains the value
22H
, the statement:
LDC R2, @RR6
Object Code: C2 26
loads the value
22H
into Working Register R2. The value of Program Memory
location 30A2H is unchanged by the load.
•
If Working Register R2 contains the value
22H
, and Working Register Pair R6 and R7
contains the value
10A2H
, the statement:
LDC @RR6, R2
Object Code: D2 26
C
Unaffected.
Z
Unaffected.
S
Unaffected.
V
Unaffected.
D
Unaffected.
H
Unaffected.
Mnemonic
Destination, Source
Opcode (Hex)
Operand 1
Operand 2
Operand 3
LDC
r1, @rr2
C2
{r1, rr2}
—
—
LDC
@r1, @rr2
C5
{r1, rr2}
—
—
LDC
@rr1, r2
D2
{r2, rr1}
—
—