beautypg.com

Maxim Integrated MAXQ622 User Manual

Page 251

background image

A1-6

Maxim Integrated

MAXQ612/MAXQ622 User’s Guide

move DPC, ACC ; write the new mode value
push DP[1] ; save byte mode bits
move DP[1], DP[1] ; select DP[1] as the active source pointer by
; writing to the pointer register
move ACC, @DP[1] ; DP[1] is now properly configured properly to read
;
;... perform other operations here
;
pop DP[1] ; pop byte mode bits
move ACC, DPC ; get the current DPC value
or #DP1_WORD_MODE_OR_MASK
; change DP[1] to word mode by setting DPC.3 to 1
move DPC, ACC ; write the new mode value
pop DP[1] ; pop word mode bits
pop DPC ; restore the existing DPC value.
ret ;
****************************************************************************
Example 6, Basic Multiple Pointer Configuration with address assignment
just prior to pointer read.
Assumptions: We know the contents of DPC. DPC contains #1ch
(Word mode: DP[0], DP[1], BP[Offs], DP[0] is selected)
****************************************************************************
move DPC, #BP_WORD_MODE_OR_MASK|BP_WORD_MODE_OR_MASK
; change DP[1] to byte mode by setting DPC.3 to 0
move DP[1], #1234h ; writing an address to a pointer register selects that
; pointer as the active source.
move ACC, @DP[1] ; DP[1] is now properly configured properly to read
move DP[0], #5678h ; writing an address to a pointer register selects that
; pointer as the active source.
move ACC, @DP[0] ; DP[0] is now properly configured properly to read
****************************************************************************
Example 6a, Basic Multiple Pointer Configuration with address assignment
just prior to pointer read.
Assumptions: We know the contents of DPC. DPC contains #1ch
(Word mode: DP[0], DP[1], BP[Offs], DP[0] is selected)
****************************************************************************
move DPC, #BP_WORD_MODE_OR_MASK|BP_WORD_MODE_OR_MASK
; change DP[1] to byte mode by setting DPC.3 to 0
move DP[1], #1234h ; writing an address to a pointer register selects that
; pointer as the active source.
move DP[0], #5678h ; writing an address to a pointer register selects that

This manual is related to the following products: