Z8
®
CPU
User Manual
UM001604-0108
Instruction Description
192
Address modes R or IR can be used to specify a 4-bit Working Register. In this format, the
source or destination Working Register operand is specified by adding
1110b
(
Eh
) to the
high nibble of the operand. For example, if Working Register R12 (CH) is the destination
operand, then
ECh
is used as the destination operand in the Op Code.
Example 1
The statement:
LD R15, #34h
Op Code: FC 34
loads the value
34h
into Working Register R15.
Example 2
If Register
34h
contains the value
FCh
, the statement:
LD R14, 34h
Op Code: F8 34
loads the value
FCh
into Working Register R15. The contents of Register
34h
are not
affected.
Example 3
If Working Register R14 contains the value
45h
, the statement:
LD 34h, R14
Op Code: E9 34
loads the value
45h
into Register
34h
. The contents of Working Register R14 are not
affected.
Example 4
If Working Register R12 contains the value
34h
, and Register
34h
contains the value
FFh
,
the statement:
LD R13, @R12
Op Code: E3 DC
loads the value
FFh
into Working Register R13. The contents of Working Register R12
and Register R34 are not affected.
Example 5
If Working Register R13 contains the value
45h
, and Working Register R12 contains the
value
00h
the statement:
LD @R13, R12
Op Code: F3 DC
E
src
or
E
dst
Note: