English
Language : 

EB632 Datasheet, PDF (93/112 Pages) Freescale Semiconductor, Inc – Functional Differences Between MSC8101 (Mask 2K42A) and MSC8103 (Mask 2K87M)
;check the check sticky bit is set ( HF3 in HSR (HSR[3) )
move.w HSR,d6
and #$00001000,d6,d6
;check if the sticky bit is set ( HF7 in HCR(HCR[3]) )
move.w HCR,d4
and #$00001000,d4,d4
;if both of the flags are set start the loading again
and d4,d6
tsteq d6
jf from_host
nop
; jump to the destination address
jmp r3
load_from_fifo
tsteq d15 ; check flag if watchdog disabled
jt load_no_wd
load_wd deceqa r15
nop
ift jsr watchdog_handle
HSR_read move.w HSR,d4
bmtsts.w #$0001,d4.l
jf load_wd
nop
jmp read_fifo
nop
load_no_wd
;if the host is empty wait for it to fill
move.w HSR,d4
bmtsts.w #$0001,d4.l
jf load_no_wd
; the host is not empty so load 8 bytes from it
read_fifo move.l #HORX,r0
nop
move.2l (r0),d4:d5
rts
Bootloader Program
; Set the sticky bit (HF7) if there is an error in loading the program
set_sticky_bit
;set the HF7 bit in HCR
move.w HCR,d6
or #$00001000,d6.l
move.w d6,HCR
rts
watchdog_handle
move.l #$0100,r15
move.w #$556c,d12
move.w d12,(r6+$e) ;write $556c to swsr
move.w #$aa39,d12
move.w d12,(r6+$e) ;write $aa39 to swsr
rts
Functional Differences Between MSC8101 (Mask 2K42A) and MSC8103 (Mask 2K87M), Rev. 2
Freescale Semiconductor
93