Maxq family user’s guide: maxq8913 supplement – Maxim Integrated MAXQ Family Users Guide: MAXQ8913 Supplement User Manual
Page 107

MAXQ Family User’s Guide:
MAXQ8913 Supplement
25-8
25.4.2 Utility ROM Example 2: Reading Constant Byte Data from Flash (Indirect
Function Call)
move DPC, #1Ch
; Set all pointers to word mode
move DP[0], #800Dh
; Fetch location of function table from Utility ROM
move BP, @DP[0]
; Set base pointer to function table location
move Offs, #INDX_moveDP0inc
; Set offset to moveDP0inc entry in table
move A[7], @BP[Offs]
; Get address of moveDP0inc function
move DPC, #00h
; Set all pointers to byte mode
move DP[0], #((table * 2) + 8000h); Point to address of data as viewed
; in the Utility ROM memory map
; and convert to byte mode pointer
lcall A[7]
; moveDP0inc
move A[0], GR
; A[0] = 34h
lcall A[7]
; moveDP0inc
move A[1], GR
; A[1] = 12h
lcall A[7]
; moveDP0inc
move A[2], GR
; A[2] = 78h
lcall A[7]
; moveDP0inc
move A[3], GR
; A[3] = 56h
sjump $
org 0100h
table:
dw 1234h, 5678h
Maxim Integrated