beautypg.com

Maxim Integrated DS4830 Optical Microcontroller User Manual

Page 218

background image

DS4830 User’s Guide

218

XCH

Exchange Accumulator Bytes


Description:

Exchanges the upper and lower bytes of the active accumulator.


Status Flags:

S


Operation:

Acc.[15:8]  Acc.[7:0]
Acc.[7:0]  Acc.[15:8]


Encoding:

15

0

1000

1010

1000

1010


Example(s):

; Acc = 2345h

XCH

; Acc = 4523h



XCHN

Exchange Accumulator Nibbles


Description:

Exchanges the upper and lower nibbles in the active accumulator byte(s).

Status Flags:

S


Operation:

Acc.[7:4]  Acc.[3:0]
Acc.[3:0]  Acc.[7:4]
Acc.[15:12]  Acc.[11:8]
Acc.[11:8]  Acc.[15:12]


Encoding:

15

0

1000

1010

0111

1010


Example(s):

; Acc = 2345h

XCHN

; Acc = 3254h