Annotation of 43BSDTahoe/sys/tahoestand/srt0.c, revision 1.1.1.1

1.1       root        1: /*     srt0.c  1.6     87/04/02        */
                      2: 
                      3: #include "../machine/mtpr.h"
                      4: #define        LOCORE
                      5: 
                      6: /*
                      7:  * Startup code for standalone system
                      8:  */
                      9: 
                     10:        .globl  _end
                     11:        .globl  _main
                     12:        .globl  __rtt
                     13:        .globl  _openfirst
                     14:        .globl  _start
                     15:        .globl  _boothowto
                     16:        .globl  _bootdev
                     17: 
                     18:        .set    HIGH,31         # mask for total disable
                     19: 
                     20: #ifndef        REL
                     21:        .globl  _device_space
                     22: _device_space:                 # Tapemaster config block, etc.
                     23:        .space  0x1000-RELOC
                     24: 
                     25:        .globl  _entry
                     26: _entry:
                     27:        .word   0x00                    # 'call' by relsrt0.
                     28: #endif
                     29: _start:
                     30:        mtpr    $HIGH,$IPL              # just in case
                     31: #ifdef REL
                     32:        movl    $BOOTRELOC,sp
                     33: 
                     34:        movl    $RELOC,r0       /* source address to copy from */
                     35:        movl    $BOOTRELOC,r1   /* destination address */
                     36:        movl    tdlen,r2        /* length to copy */
                     37:        addl2   r2,r0
                     38:        addl2   r2,r1
                     39: mvloop:
                     40:        decl    r0
                     41:        decl    r1
                     42:        movb    (r0),(r1)
                     43:        decl    r2
                     44:        bgeq    mvloop
                     45: 
                     46: /*
                     47:  * zero bss
                     48:  */
                     49:        movl    aedata,r1               /* destination address */
                     50:        subl3   $_edata,$_end,r2        /* length to zero */
                     51: zloop:
                     52:        movb    $0,(r1)
                     53:        incl    r1
                     54:        decl    r2
                     55:        bgeq    zloop
                     56: 
                     57:        mtpr    $1,$PACC
                     58:        mtpr    $1,$PADC
                     59:        jmp     *abegin
                     60: #endif
                     61: 
                     62: begin:
                     63:        movl    fp,ofp
                     64:        movl    r11,_boothowto
                     65:        movl    r10,_bootdev
                     66:        movl    $1,_openfirst
                     67:        callf   $4,_main
                     68: #ifdef REL
                     69:        halt
                     70: #endif
                     71:        ret
                     72: 
                     73: __rtt:
                     74:        .word   0x0
                     75: #ifdef REL
                     76:        halt
                     77: #endif
                     78:        movl    ofp,fp
                     79:        ret
                     80: 
                     81:        .data
                     82: abegin:        .long   begin
                     83: #ifdef REL
                     84: aedata:        .long   _edata
                     85: tdlen: .long   _edata-BOOTRELOC
                     86: #endif
                     87: ofp:   .long   0
                     88: _boothowto:    .long   0
                     89: _bootdev:      .long   0

unix.superglobalmegacorp.com

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