File:  [Research Unix] / researchv9 / libc / csu / crt0.s
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:35:13 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv9-SUN3, HEAD
researchv9-SUN3

# C runtime startoff

	exit = 1
.globl	_exit
.globl	start
.globl	_main
.globl	_environ

#
#	C language startup routine

start:
	subql	#8,sp
	movl	sp@(8),sp@	| argc
	lea	sp@(12),a0
	movl	a0,sp@(4)	| argv
	movl	a0@,d1
L1:
	tstl	a0@+		| null args term ?
	bne	L1
	movl	a0,sp@(8)  	| env
	movl	a0,_environ	| indir is 0 if no env ; not 0 if env
	jsr	_main
	addql	#8,sp
	movl	d0,sp@-
	jsr	_exit
	addql	#4,sp
	pea	exit
	trap	#0
#
	.data
_environ:	.long	0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.