
                                        FLASHstub.s          Page 1       0:55:58 am 2-Sep-2008     Madmac 3.03  (MSDOS)


    1                                   ; This is the flash stub used by JCP to boot the Skunkboard into flash mode
    2                                   ; All it does is load the vector from the vector table and jump to it
    3                                   
    4                                   	; store the filesize in RAM for block erase
    5                                   	; if you change this code you need to change JCP since it
    6                                   	; manually patches this value
    7  00000000  223C0ABCDEF0           	move.l	#$0ABCDEF0,d1
    8                                   	; write it twice, once xor'd, so the flash code knows it's valid
    9  00000006  21C13FF0               	move.l	d1,$3ff0
   10  0000000A  0A810000FFFF           	eor.l	#$ffff,d1
   11  00000010  21C13FF4               	move.l	d1,$3ff4
   12                                   
   13                                   	; address of the flasher vector is $800804
   14  00000014  227900800804           	move.l	$800804,a1
   15  0000001A  4ED1                   	jmp (a1)
   16                                   	
   17                                   ; yeah, that's it.
   18                                   
   19                                   ; building this one manually since it's so simple
   20                                   ; mac -fb flashstub.s
   21                                   ; aln -w -e -v -rd -a 4100 x 4000 -o flashstub.cof flashstub.o
   22                                   

