* Copyright (c) 1982, 1986 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
* @(#)srt0.c 7.4 (Berkeley) %G%
* Startup code for standalone system
* Non-relocating version -- for programs which are loaded by boot
* Relocating version for boot*
.set HIGH
,31 # mask for total disable
mtpr $HIGH
,$IPL
# just in case
# we need to do special stuff on microvax II
* Were we booted by VMB? If so, r11 is not boothowto,
* but rather the address of the `Extended RPB' (see KA630
* User's Manual, pp 3-21). These tests were devised by
* richl@tektronix, 11/10/87.
cmpl (r11
),r11
# if boothowto, r11 will be small
bneq
1f
# and these will not fault
* Booted by VMB: get flags from extended rpb.
* We can only guess at the boot device (here ra(0,0)).
movl $
9,r10
# device = ra(0,0)
* `entry' below generates a pc-relative reference to the
* code, so this works no matter where we are now.
* Clear bss segment *after* moving text and data.
/* this loop shouldn't be necessary, but is when booting from an ra81 */
aedata
: .long _edata
-RELOC
1: bbc $
1,r4
,1f
; tstw (r3
)
1: bbc $
2,r4
,1f
; tstl (r3
)
1: clrl r0
# made it w/o machine checks
addl2 (sp
)+,sp
# discard mchchk trash
* Short assembly versions of strcmp, strcpy, and strlen
* that do not use special instructions.