beautypg.com

1 8-bit destination, Low byte (16-bit source) -31, 2 8-bit destination – Maxim Integrated MAXQ7666 User Manual

Page 33: High byte (16-bit source) -31, 3 16-bit destination, Concatenation (8-bit source, 8-bit source) -31, 4 low (16-bit destination), Bit source -31, 5 high (16-bit destination)

background image

1.3.3.4.1 8-Bit Destination

Low Byte (16-Bit Source)

The simplest transfer possibility would be loading an 8-bit register with the low byte of a 16-bit register. This transfer does not require
use of GR and requires a prefix only if the destination or source register are outside of the single cycle write or read regions, 0–7h and
0–Fh, respectively.

move OFFS, LC[0]

; copy the low byte of LC[0] to the OFFS register

move IMR, @DP[1]

; copy the low byte @DP[1] to the IMR register

move WDCN, LC[0]

; assembles to: move PFX[2], #00h

; move (WDCN-80h), LC[0]

1.3.3.4.2 8-Bit Destination

High Byte (16-Bit Source)

If, however, we needed to load an 8-bit register with the high byte of a 16-bit source, it would be best to use the GR register. Transferring
the 16-bit source to the GR register adds a single cycle.

move GR, LC[0]

; move LC[0] to the GR register

move IC, GRH

; copy the high byte into the IC register

1.3.3.4.3 16-Bit Destination

Concatenation (8-Bit Source, 8-Bit Source)

Two 8-bit source registers can be concatenated and stored into a 16-bit destination by using the prefix register to hold the high-order
byte for the concatenated transfer. An additional cycle may be required if either source byte register index is greater than 0Fh or the
16-bit destination is greater than 07h.

move PFX[0], IC

; load high order source byte IC into PFX

move @DP[0], AP

; store @DP[0] the concatenation of IC:AP

; 16-bit destination sub-index: dst=08h

; 8-bit source sub-indexes:

; high=10h, low=11h

move PFX[1], #00h

;

move PFX[3], high

; PFX=00:high

move dst, low

; dst=high:low

1.3.3.4.4 Low (16-Bit Destination)

8-Bit Source

To modify only the low byte of a given 16-bit destination, the 16-bit register should be moved into the GR register such that the high
byte can be singulated and the low byte written exclusively. An additional cycle is required if the destination index is greater than 0Fh.

move GR, DP[0]

; move DP[0] to the GR register

move PFX[0], GRH

; get the high byte of DP[0] via GRH

move DP[0], #20h

; store the new DP[0] value

; 16-bit destination sub-index: dst=10h

; 8-bit source sub-index: src=11h

move PFX[1], #00h

;

move GR, dst

; read dst word to the GR register

move PFX[5], GRH

; get the high byte of dst via GRH

move dst, src

; store the new dst value

1.3.3.4.5 High (16-Bit Destination)

8-Bit Source

To modify only the high byte of a given 16-bit destination, the 16-bit register should be moved into the GR register such that the low
byte can be singulated and the high byte can be written exclusively. Additional cycles are required if the destination index is greater
than 0Fh or if the source index is greater than 0Fh.

move GR, DP[0]

; move DP[0] to the GR register

move PFX[0], #20h

; get the high byte of DP[0] via GRH

move DP[0], GRL

; store the new DP[0] value

; 16-bit destination sub-index: dst=10h

; 8-bit source sub-index: src=11h

move PFX[1], #00h

;

move GR, dst

; read dst word to the GR register

move PFX[1], #00h

move PFX[4], src

; get the new src byte

move dst, GRL

; store the new dst value

MAXQ7665/MAXQ7666 User’s Guide

1-31

Maxim Integrated

This manual is related to the following products: