	.extern	_mFargc
	.extern	_mFargv
	.extern &mFNAME
	.extern _mFgmain
	.text	
	.globl	main
	.ent	main
main:
	ldgp	$gp, 0($27)		# gp = $29 - assume std  call with
	lda	$sp, -16($sp)		# sp must be maintained mod16 aln
	stq	$26, 8($sp)		# return address
	stl	$16, _mFargc		# save argc (param 1)
	stq	$17, _mFargv		# save argv (param 2)
	lda	$16, &mFNAME		# pass address of the main entry point
	jsr	$26, _mFgmain		# call the runtime
	ldgp	$gp, 0($26)
	ldq	$26, 8($sp)		# return address
	lda	$sp, 16($sp)		# reinstate stack
	ret	$31, ($26), 1		# exit
	.end
