|
|
1.1 ! root 1: /* srt0.c 4.8 81/04/03 */ ! 2: /* Tahoe version. 82/11/09 */ ! 3: ! 4: #include "../machine/mtpr.h" ! 5: #define LOCORE ! 6: ! 7: /* ! 8: * Startup code for standalone system ! 9: */ ! 10: ! 11: .globl _end ! 12: .globl _edata ! 13: .globl _main ! 14: .globl __rtt ! 15: .globl _openfirst ! 16: .globl _start ! 17: ! 18: .set HIGH,31 # mask for total disable ! 19: ! 20: #ifndef REL ! 21: .word 0x00 # 'call' by relsrt0. ! 22: #endif ! 23: _start: ! 24: mtpr $HIGH,$IPL # just in case ! 25: movl $(RELOC),sp ! 26: movl $RELOC,r0 ! 27: subl2 aedata,r0 ! 28: shar $2,r0,r0 ! 29: clrl r1 /* used to clear the memory */ ! 30: clr: ! 31: pushl r1 ! 32: decl r0 /* decrement counter */ ! 33: jgeq clr /* more to clear */ ! 34: ! 35: movl $RELOC,sp ! 36: movl $0x800,r0 /* source address to copy from */ ! 37: movl $RELOC,r1 /* destination address */ ! 38: movl aend,r2 /* length */ ! 39: subl2 $0x800,r2 ! 40: # movblk ! 41: # simple loop replaces movblk - until hardware people are ready ! 42: mvloop: ! 43: movb (r0),(r1) ! 44: incl r0 ! 45: incl r1 ! 46: decl r2 ! 47: bneq mvloop ! 48: .globl goup ! 49: mtpr $0,$PACC ! 50: jumphigh: ! 51: .set goup,jumphigh+0x800-RELOC ! 52: jmp *abegin ! 53: begin: ! 54: movl $1,_openfirst ! 55: callf $4,_main ! 56: jmp begin ! 57: ! 58: __rtt: ! 59: .word 0x0 ! 60: jmp begin ! 61: ! 62: .data ! 63: abegin: .long begin ! 64: aend: .long _end-RELOC+0x800 ! 65: aedata: .long _edata-RELOC+0x800 ! 66: .globl _entry ! 67: .set _entry,0x800
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.