|C startup

	.text
	.globl	_start START_ main DDT puts
				
_start:	jsr	DDT		|call DDT
	bras	_start		|shouldn't return
	rts			|return

| Start up code.  Sets up stack pointer and calls main.
START_:
	movl	#0x3fff0,sp	|this should not really be a constant
	pea	0		|dummy envp
	pea	0		|dummy argp
	pea	0		|dummy argc
	jsr	main
	lea	sp@(12),sp	|pop dummies
	pea	_ret_msg
	jsr	puts
	lea	sp@(4),sp
	bras	_start		|if returns then just fall back to ddt

	.data
_ret_msg:	.asciz	"\n\rReturned from main\n\r"
