;
; cstart.s
;
; Starts up a Sapphire application written in C
;
;  1995 Straylight
;

;----- Standard header ------------------------------------------------------

		GET	libs:header
;		GET	libs:swis

		GET	libs:stream

;----- External dependencies ------------------------------------------------

		GET	sapphire:sapphire

		IMPORT	sapph_main
		IMPORT	appname

;----- Main code ------------------------------------------------------------

		AREA	|!!Start$$Code|,CODE,READONLY
		ENTRY

		LDR	R0,=appname
		MOV	R1,#512
		MOV	R2,#0
		BL	sapphire_init
		BL	sapph_main
		SWI	&11			;OS_Exit

		LTORG

;----- That's all, folks ----------------------------------------------------

		END
