beautypg.com

Maxq610 user’s guide – Maxim Integrated MAXQ610 User Manual

Page 179

background image

14-12

MAXQ610 User’s Guide

Data Transfer Rules
dst (16-bit)

src (16-bit):

dst[15:0]

← src[15:0]

dst (8-bit)

src (8-bit):

dst[7:0]

← src[7:0]

dst (16-bit)

src (8-bit):

dst[15:8]

← 00h *

dst[ 7:0]

← src[7:0]

dst (8-bit)

src (16-bit):

dst[7:0]

← src[7:0]

* Note: The PFX[0] register may be used to supply a separate high order data byte for this type of
transfer .

Example(s):

MOVE A[0], A[3]

; A[0]

← A[3]

MOVE DP[0], #110h

; DP[0]

← #0110h (PFX[0] register used)

; MOVE PFX[0], #01h (smart-prefixing)
; MOVE DP[0], #10h

MOVE DP[0], #80h

; DP[0]

← #0080h (PFX[0] register not needed)

Special
Notes:

Proper loading of the PFX[n] registers, when for the purpose of supplying 16-bit immediate data
or accessing 2-cycle destinations, is handled automatically by the assembler and is therefore an
optional step for the user when writing assembly source code . Examples of the automatic PFX[n]
code insertion by the assembler are demonstrated below .
Initial Assembly Code

Assembler Output

MOVE DP[0], #0100h

MOVE PFX[0], #01h
MOVE DP[0], #00h

MOVE A[15], A[7]

MOVE PFX[2], anysrc
MOVE A[7], A[7]

MOVE A[8], #3040h

MOVE PFX[2], #30h
MOVE A[0], #40h

MOVE Acc., C

Move Carry Flag to Accumulator Bit

Description:

Replaces the specified bit of the active accumulator with the Carry bit .

Status Flags: S, Z
Operation:

Acc.

← C

Encoding:

15

0

1111

1010

bbbb

1010

Example(s):

; Acc = 8000h, S=1, Z=0, C=0

MOVE Acc .15, C

; Acc = 0000h, S=0, Z=1

MOVE C, Acc.

Move Accumulator Bit to Carry Flag

Description:

Replaces the Carry (C) status flag with the specified active accumulator bit .

Status Flag:

C

Operation:

C

← Acc .

Encoding:

15

0

1110

1010

bbbb

1010

Example(s):

; Acc = 01C0h, C=0

MOVE C, Acc .8

; C =1