Stereo System User Manual

MOTOROLA DSP96002 USER’S MANUAL 9 - 5
; The second routine
loads the internal PRAM using the Host
;
Interface logic.
; If HF1=0, it will load 4,096 bytes from the external host processor.
; These will be condensed into 1,024 32-bit words and stored in
; contiguous internal PRAM memory locations starting at P:$0. Note that
; the routine loads data starting with the least significant byte of
; P:$0 first.
; If HF1=1, it will load 1,024 32-bit words from the external host
; processor.
; If the host processor only wants to load a portion of the P memory,
; and start execution of the loaded program, the Host Interface
; bootstrap load program routine may be killed by setting HF0 = 0.
;
INLOOP DO #1024,_LOOP1 ; Load 1,024 instruction words
; This is the context switch
JSET #1,OMR,_HOSTLD ; Perform load from Host
; Interface if MB=1.
; This is the first routine. It
loads from external P: memory.
DO #4,_LOOP2 ; Get 4 bytes into D0.L
LSR #8,D0 ; Shift previous byte down
MOVEM P:(R1)+,D1.L ; Get byte from ext. P mem.
LSL #24,D1 ; Shift into upper byte
OR D1,D0 ; concatenate
_LOOP2 JMP <_STORE ; Then put the word in P memory
;
; This is the second routine. It
loads thru the Host Interface.
_HOSTLD JSET #0,OMR,_HOSTB ; Port A or Port B?
; Boot thru Host Interface in Port A
_HOSTA BCLR #5,X:M_HCRA ; Enable Port A Host Interface
MOVE #M_HSRA,R2 ; R2 points to HSRA
MOVE #M_HRXA,R3 ; R3 points to HRXA
JMP <_HOSTR ; go to host routine
; Boot thru Host Interface in Port B
_HOSTB BCLR #5,X:M_HCRB ; Enable Port B Host Interface
MOVE #M_HSRB,R2 ; R2 points to HSRB
MOVE #M_HRXB,R3 ; R3 points to HRXB
Figure 9-3. Assembler Source for DSP96002 Bootstrap Program (2 of 3)