beautypg.com

Motorola DSP96002 User Manual

Page 162

background image

9 - 6

DSP96002 USER’S MANUAL

MOTOROLA

; Host load routine

_HOSTR

_LBL11 JCLR #3,X:(R2),_LBL22

; if HF0=1, stop loading data.

ENDDO

; Must terminate the do loops

JMP <_BOOTEND

_LBL22

JCLR #0,X:(R2),_LBL11

; Wait for HRDF to go high

; (meaning data is present).

JCLR #4,X:(R2),_LBL33

; 8-bit source?

MOVE X:(R3),D0.L

; Get 32-bit word from host

JMP <_STORE

_LBL33

DO #4,_LOOP4

; Get 4 bytes into D0.L

LSR #8,D0

; Shift previous byte down

_LBL1

JCLR #3,X:(R2),_LBL2

; if HF0=1, stop loading data.

ENDDO

; Must terminate the do loops

ENDDO

JMP <_BOOTEND

_LBL2

JCLR #0,X:(R2),_LBL1

; Wait for HRDF to go high

; (meaning data is present).

MOVE X:(R3),D1.L

; Get byte from host

LSL #24,D1

; Shift into upper byte

OR D1,D0

; concatenate

_LOOP4

_STORE

MOVEM D0.L,P:(R0)+

; Store 32-bit result in P mem.

_LOOP1

; and go get another 32-bit word

; This is the exit handler that returns execution to internal PRAM

_BOOTEND

ANDI #$F9,OMR

; Set the operating mode to 00x

; (and trigger an exit from

; bootstrap mode).

ANDI #$0,CCR

; Clear CCR as if HW RESET.

; Also delay needed for

; Op. Mode change.

JMP <$0

; Start fetching from PRAM.

; DSP96002 bootstrap program size = 50 words

Figure 9-3. Assembler Source for DSP96002 Bootstrap Program (3 of 3)

9.2

DATA MEMORY MAPS

The data memory maps are shown in Figure 9-4 and Figure 9-5.