Renesas R8C/Tiny Series Software Manual page 150

16-bit single-chip microcomputer
Hide thumbs Also See for R8C/Tiny Series:
Table of Contents

Advertisement

Chapter 3
Functions
XCHG
[ Syntax ]
XCHG.size
src,dest
[ Operation ]
dest
src
[ Function ]
• This instruction exchanges the contents of
dest
• If
is A0 or A1 and the selected size specifier (.size) is (.B), the content of
16 bits and placed in A0 or A1, and the 8 low-order bits of A0 or A1 are placed in
[ Selectable src/dest ]
R0L/R0
R0H/R1
A0/A0
A1/A1
dsp:8[A0]
dsp:8[A1]
dsp:16[A0] dsp:16[A1]
dsp:20[A0] dsp:20[A1]
R2R0
R3R1
[ Flag Change ]
Flag
U
I
O
Change
[ Description Example ]
XCHG.B
R0L,A0
XCHG.W
R0,A1
XCHG.B
R0L,[A0]
[ Related Instructions ]
Rev.2.00 Oct 17, 2005
REJ09B0001-0200
src
R1L/R2
R1H/R3
[A0]
[A1]
dsp:8[SB]
dsp:8[FB]
dsp:16[SB]
abs16
abs20
#IMM
A1A0
[A1A0]
B
S
Z
D
C
; 8 low-order bits of A0 and the zero-expanded value of R0L are exchanged.
MOV, LDE, STE
page 132 of 263
Exchange
eXCHanGe
[ Instruction Code/Number of Cycles ]
B , W
src
dest
and
.
R0L/R0
R0H/R1
A0/A0
A1/A1
dsp:8[A0]
dsp:8[A1]
dsp:16[A0] dsp:16[A1] dsp:16[SB] abs16
dsp:20[A0] dsp:20[A1] abs20
R2R0
R3R1
3.2
Functions
XCHG
Page: 242
src
is zero-expanded to
src
.
dest
R1L/R2
R1H/R3
[A0]
[A1]
dsp:8[SB]
dsp:8[FB]
A1A0

Advertisement

Table of Contents
loading

Table of Contents