;
; Simple start-up code routine used to test fileserver.
;
; Gary Ellison
; Cross Products Ltd.
;
;

	.EXPORT     __START
	.IMPORT	    _START_UP
	.IMPORT	    _main

	.SECTION    crt0,CODE,ALIGN=4

__START:
	mova    _stack_ref, r0
	mov.l	@r0, r15

	mova	_main_ref, r0
	mov.l	@r0, r0
	jsr	@r0
	nop

	.ALIGN		4

_main_ref:	.DATA.L     _main               ;_START_UP
_stack_ref:	.DATA.L	    H'0c100000
_CacheOn_ref:	.DATA.L	    __CacheOn



		.SECTION P,CODE,ALIGN=4

		.EXPORT	__SetSR
__SetSR:
		LDC		R4,SR
		RTS
		NOP

		.EXPORT	__SetSP
__SetSP:
		RTS
		MOV.L	R4,SP

		.EXPORT	__GetSP
__GetSP:
		RTS
		MOV.L	SP,R0

		.EXPORT	__CacheOn
__CacheOn:
;;;                                *   *  ** * ****
        MOV.L   #B'00000000000000000000000100000101,R0
        MOV.L   #H'FF00001C,R1
        RTS
        MOV.L   R0,@R1


		.SECTION D,DATA,ALIGN=4
		.SECTION R,DATA,ALIGN=4
		.SECTION B,DATA,ALIGN=4
		.SECTION B32,DATA,ALIGN=32
		.SECTION C,DATA,ALIGN=4

__D_ROM	.DATA.L	(STARTOF D)
__D_BGN	.DATA.L	(STARTOF R)
__D_END	.DATA.L (STARTOF R) + (SIZEOF R)
__B_BGN	.DATA.L	(STARTOF B)
__B_END	.DATA.L	(STARTOF B) + (SIZEOF B)
__B32_BGN	.DATA.L	(STARTOF B32)
__B32_END	.DATA.L	(STARTOF B32) + (SIZEOF B32)

		.EXPORT __D_ROM
		.EXPORT __D_BGN
		.EXPORT __D_END
		.EXPORT __B_BGN
		.EXPORT __B_END
		.EXPORT __B32_BGN
		.EXPORT __B32_END


	.SECTION	B32,DATA,ALIGN=32

	.EXPORT		_vbuf
	.ALIGN		32
_vbuf:
	.RES.L		(4096*96)

	.EXPORT		_matrix
	.ALIGN		32
_matrix:
	.RES.L		(4*32*128)

	.SECTION	P,CODE,ALIGN=4

	.END

