English
Language : 

SH-2A Datasheet, PDF (239/501 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH™ RISC engine Family
6.4.33
MOV
Structure Data
Transfer
MOVe structure data
Section 6 Instruction Descriptions
Data Transfer Instruction
Format
MOV.B R0,@(disp,Rn)
MOV.W R0,@(disp,Rn)
MOV.L Rm,@(disp,Rn)
MOV.B @(disp,Rm),R0
MOV.W @(disp,Rm),R0
MOV.L @(disp,Rm),Rn
Abstract
Code
R0 → (disp + Rn)
10000000nnnndddd
R0 → (disp × 2 + Rn)
10000001nnnndddd
Rm → (disp × 4 + Rn)
0001nnnnmmmmdddd
(disp + Rm) → sign extension → R0
10000100mmmmdddd
(disp × 2 + Rm) → sign extension → R0 10000101mmmmdddd
disp × 4 + Rm) → Rn
0101nnnnmmmmdddd
Cycle T Bit
1
—
1
—
1
—
1
—
1
—
1
—
Description
Transfers the source operand to the destination. This instruction is optimum for accessing data in a
structure or a stack. The data can be a byte, word, or longword, but when a byte or word is
selected, only the R0 register can be used. When the data is a byte, the only change made is to
zero-extend the 4-bit displacement. Consequently, an address within +15 bytes can be specified.
When the data is a word, the 4-bit displacement is zero-extended and doubled. Consequently, an
address within +30 bytes can be specified. When the data is a longword, the 4-bit displacement is
zero-extended and quadrupled. Consequently, an address within +60 bytes can be specified. If the
displacement is too short to reach the memory operand, the aforementioned @(R0,Rn) mode must
be used. When the source operand is in memory, the loaded data is stored in the register after it is
sign-extended to a longword.
Note
When byte or word data is loaded, the destination register is always R0. R0 cannot be accessed by
the next instruction until the load instruction is finished. The instruction order in figure 6.2 will
give better results.
MOV.B @(2, R1), R0
AND #80, R0
ADD #20, R1
MOV.B @(2, R1), R0
ADD #20, R1
AND #80, R0
Figure 6.2 Using R0 after MOV
For the Renesas Technology SuperH RISC engine assembler, declarations should use scaled
values (×1, ×2, ×4) as displacement values.
Rev. 3.00 Jul 08, 2005 page 225 of 484
REJ09B0051-0300