beautypg.com

8 low (16-bit destination) ← 8-bit source, 9 high (16-bit destination) ← 8-bit source, 4 reading and writing register bits – Maxim Integrated MAXQ622 User Manual

Page 42: 3 .3 .8 low (16-bit destination), Bit source -6, 3 .3 .9 high (16-bit destination), 3 .4 reading and writing register bits -6

background image

MAXQ612/MAXQ622 User’s Guide

3-6

Maxim Integrated

3.3.8 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 destina-
tion 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

3.3.9 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

If the high byte needs to be cleared to 00h, the operation can be shortened by transferring only the GRL byte to the
16-bit destination (example follows):

move GR, DP[0

; move DP[0] to the GR register

move DP[0], GRL

; store the new DP[0] value, 00h used for high

;

byte

3.4 Reading and Writing Register Bits

The MOVE instruction can also be used to directly set or clear any one of the lowest 8 bits of a peripheral register in
modules 0h to 5h or a system register in module 8h . The set or clear operation does not affect the upper byte of a 16-bit
register that is the target of the set or clear operation . If a set or clear instruction is used on a destination register that
does not support this type of operation, the register high byte is written with the prefix data and the low byte is written
with the bit mask (i .e ., all zeros with a single one for the set bit operation or all ones with a single zero for the clear bit
operation) .

This manual is related to the following products: