Annotation of 43BSDReno/lib/csu.tahoe/crt0.s, revision 1.1.1.1

1.1       root        1: # @(#)crt0.s   4.1 (Berkeley) 12/21/80
                      2: # C runtime startoff
                      3: #              TAHOE 3/83
                      4: 
                      5:        .set    exit,1
                      6: .globl _exit
                      7: .globl start
                      8: .globl _main
                      9: .globl _environ
                     10: 
                     11: #
                     12: #      C language startup routine
                     13: 
                     14: start:
                     15:        .word   0x0000
                     16:        movab   -8(sp),sp
                     17:        movl    8(sp),(sp)  #  argc
                     18:        movab   12(sp),r0
                     19:        movl    r0,4(sp)  #  argv
                     20:        jmp     L3
                     21: L1:
                     22:        addl2   $4,r0
                     23: L3:
                     24:        tstl    (r0)  #  null args term ?
                     25:        jneq    L1
                     26:        addl2   $4,r0
                     27:        cmpl    r0,*4(sp)  #  end of 'env' or 'argv' ?
                     28:        jlss    L2
                     29:        subl2   $4,r0   # envp's are in list
                     30: L2:
                     31:        movl    r0,8(sp)  #  env
                     32:        movl    r0,_environ  #  indir is 0 if no env ; not 0 if env
                     33:        callf   $4*3+4,_main
                     34:        pushl   r0
                     35:        callf   $4*1+4,_exit
                     36:        kcall   $exit
                     37: #
                     38:        .data
                     39: _environ:      .space  4

unix.superglobalmegacorp.com

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