xref: /csrg-svn/sys/vax/stand/srt0.c (revision 2438)
1 /*	srt0.c	4.4	02/15/81	*/
2 
3 /*
4  * Startup code for standalone system
5  * Non-relocating version -- for programs which are loaded by boot
6  */
7 
8 	.globl	_edata
9 	.globl	_main
10 	.globl	__rtt
11 
12 #if VAX==780
13 	.set	PHYSUBA,0x20006000	# uba 0
14 #endif
15 
16 	.set	HIGH,31		# mask for total disable
17 
18 entry:	.globl	entry
19 	.word	0x0
20 	mtpr	$HIGH,$IPL		# just in case
21 	mtpr	$_Scbbase,$SCBB
22 	movl	$RELOC-0x2400,sp
23 	mtpr	$RELOC-0x2000,$ISP	/* space for interrupts
24 					/* (in case we are not using that
25 					/* stack already)
26 					*/
27 #if VAX==780
28 	movl	$1,PHYSUBA+4		# init
29 ubic:
30 	movl	*$PHYSUBA,r0		# while ((up->uba_cnfgr & UBIC) == 0)
31 	bitl	$0x10000,r0		# 	continue;
32 	jeql	ubic
33 #endif
34 start:
35 	movab	_edata,r0
36 clr:
37 	clrl	(r0)+
38 	cmpl	r0,sp
39 	jlss	clr
40 	calls	$0,_main
41 	jmp	start
42 
43 __rtt:
44 	.word	0x0
45 	jmp	start
46