DESCRIPTION OF INSTRUCTIONS

105. XCHD A, @Rr (Exchange low nibbles of indirect address with accumulator)

 

 

7

 

 

 

 

 

 

0

 

Instruction code

:

1

1

0

1

0

1

1

r

Byte 1

Operation

 

 

 

r=0 or 1

 

 

 

 

: (A0~3)((Rr0~3))

 

 

 

 

Number of bytes

: 1

 

 

 

 

 

 

 

 

Number of cycles

: 1

 

 

 

 

 

 

 

 

Flags

:

C

AC

F0

RS1

RS0

OV

F1

P

(PSW)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Description

 

 

 

 

 

 

 

 

 

 

: The lower order bits (0 thru 3) of the accumulator contents are

 

 

exchanged with contents of the lower order bits (0 thru 3) of the

 

 

data memory location addressed by the register r contents. The

 

 

flag is updated.

 

 

 

 

 

 

Example XCHD A, @R0

 

 

 

 

 

 

 

 

 

 

 

 

7

 

 

0

 

 

 

 

 

Instruction code

:

1 1

0 1

0 1

1 0

Byte 1

 

 

 

Before execution Accumulator

1 1 1 1 0 1 1 0

70 Register 0

0 1 1 0 0 0 0 0

70

60H

0 0 0 0 1 1 0 1

70

After execution Accumulator

1 1 1 1 1 1 0 1

70 Register 0

0 1 1 0 0 0 0 0

70

60H

0 0 0 0 0 1 1 0

70

365

Page 372
Image 372
Sonic Alert msm83c154s, msm80154s, msm85c154hvs user manual 365