Annotation of researchv9/libc/csu/crt0.s, revision 1.1

1.1     ! root        1: # C runtime startoff
        !             2: 
        !             3:        exit = 1
        !             4: .globl _exit
        !             5: .globl start
        !             6: .globl _main
        !             7: .globl _environ
        !             8: 
        !             9: #
        !            10: #      C language startup routine
        !            11: 
        !            12: start:
        !            13:        subql   #8,sp
        !            14:        movl    sp@(8),sp@      | argc
        !            15:        lea     sp@(12),a0
        !            16:        movl    a0,sp@(4)       | argv
        !            17:        movl    a0@,d1
        !            18: L1:
        !            19:        tstl    a0@+            | null args term ?
        !            20:        bne     L1
        !            21:        cmpl    a0,d1           | end of 'env' or 'argv' ?
        !            22:        blt     L2
        !            23:        tstl    a0@-            | envp's are in list
        !            24: L2:
        !            25:        movl    a0,sp@(8)       | env
        !            26:        movl    a0,_environ     | indir is 0 if no env ; not 0 if env
        !            27:        jsr     _main
        !            28:        addql   #8,sp
        !            29:        movl    d0,sp@-
        !            30:        jsr     _exit
        !            31:        addql   #4,sp
        !            32:        pea     exit
        !            33:        trap    #0
        !            34: #
        !            35:        .data
        !            36: _environ:      .long   0

unix.superglobalmegacorp.com

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