/* boot.c 4.4 81/03/22 */
* Boot program... arguments passed in r10 and r11 determine
* whether boot stops to ask for system name and which device
/* Types in r10 specifying major device */
char line[100] = "xx(0,0)vmunix";
register howto, devtype; /* howto=r11, devtype=r10 */
howto = RB_ASKNAME|RB_SINGLE;
if ((howto&RB_ASKNAME)==0) {
if (devtype>=0 && devtype<sizeof(devname)/2
&& devname[devtype][0]) {
line[0] = devname[devtype][0];
line[1] = devname[devtype][1];
howto = RB_SINGLE|RB_ASKNAME;
if (howto & RB_ASKNAME) {
howto = RB_SINGLE|RB_ASKNAME;
i = read(io, (char *)&x, sizeof x);
if (i != sizeof x || x.a_magic != 0410)
if (read(io, (char *)0, x.a_text) != x.a_text)
while ((int)addr & CLOFSET)
if (read(io, addr, x.a_data) != x.a_data)
x.a_bss += 128*512; /* slop */
for (i = 0; i < x.a_bss; i++)
printf(" start 0x%x\n", x.a_entry);
(*((int (*)()) x.a_entry))();