File:  [CSRG BSD Unix] / 43BSD / ucb / lisp / franz / vax / crt0.s
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

# C runtime startoff
# $Header: /var/lib/cvsd/repos/CSRG/43BSD/ucb/lisp/franz/vax/crt0.s,v 1.1.1.1 2018/04/24 16:12:55 root Exp $

	.set	exit,1
.globl	_exit
.globl	start
.globl	_main
.globl	_environ

start:
	.word	0x0000
	subl2	$8,sp
	movl	8(sp),(sp)  #  argc
	movab	12(sp),r0
	movl	r0,4(sp)  #  argv
L1:
	tstl	(r0)+  #  null args term ?
	bneq	L1
	cmpl	r0,*4(sp)  #  end of 'env' or 'argv' ?
	blss	L2
	tstl	-(r0)  # envp's are in list
L2:
	movl	r0,8(sp)  #  env
#	movl	r0,_environ  #  indir is 0 if no env ; not 0 if env
	calls	$3,_main
	pushl	r0
	calls	$1,_exit
	chmk	$exit
	.data
_environ:	.space	4

unix.superglobalmegacorp.com

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