Intel MCS48 User Manual page 117

Family of single chip microcomputers
Hide thumbs Also See for MCS48:
Table of Contents

Advertisement

INSTRUCTION SET
XCH
A,R
r
Exchange
Accumulator-Register Contents
00 10
1
r
r
r
The
contents
of
the
accumulator and
the contents
of
working
register
'r'
are
exchanged.
(A)
tRr)
r=0-7
Example:
Move
PSW
contents
to
Reg
7
without
losing
accumulator
contents.
XCHAR7:
XCH
A,R7
MOV
A,
PSW
XCH
A,R7
EXCHANGE CONTENTS
OF REG
7
AND ACC
MOVE PSW CONTENTS TO ACC
EXCHANGE CONTENTS
OF REG
7
AND ACC
AGAIN
XCH
A,@R
r
Exchange Accumulator and
Data
Memory
Contents
00 10
000
r
The
contents
of
the
accumulator and
the contents
of
the resident data
memory
location
addressed by
bits
0-5*of
register
'r'
are
exchanged.
Register
'r'
contents
are unaffected.
(A)
((Rr))
r=0-1
Example:
Decrement
contents
of location
52.
;MOVE
'52'
DEC TO ADDRESS
;REG
EXCHANGE
CONTENTS
OF
ACC
;AND
LOCATION
52
.DECREMENT
ACC CONTENTS
;EXCHANGE
CONTENTS
OF
ACC
;AND
LOCATION
52
AGAIN
DEC52:
MOV
R0,#52
XCH
A,@R0
DEC
A
XCH
A,@R0
XCHD
A,@R
r
Exchange Accumulator and
Data
Memory
4-Bit
Data
00
11
000r
This
instruction
exchanges
bits
0-3
of
the
accumulator
with
bits
0-3
of
the data
memory
location
addressed by
bits
0-5*of register
'r\
Bits
4-7
of
the accumulator,
bits
4-7 of the
data
memory
location,
and
the
contents
of register
Y
are unaffected.
^0-3)^(^0-3))
r=0-1
Mnemonics
copyright
Intel
Corporation
1976.
*0-6
for
8039/8049
4-35

Advertisement

Table of Contents
loading

Table of Contents