Annotation of 43BSD/ucb/lisp/lisplib/autorun/mc500, revision 1.1.1.1

1.1       root        1: " 
                      2: |
                      3: | Lisp startup program.
                      4: | insert two new parameters on the argv[] list and re-exec lisp
                      5: |
                      6:        .globl  exece
                      7: start:
                      8:        movl    sp@, d1         | get argc (# of parameters on stack)
                      9:        lea     sp@(4),a3       | save the address of argv[]
                     10:        asll    #2,d1           | multiply argc by 4 to get # of bytes of argv ptrs on stack
                     11:        lea     a3@(4,d1:l),a4  | save the address of arge[] (it's after all of the argv's)
                     12:        movl    #flag,a3@-      | insert (push) the address of the flag string on to top of argv stack
                     13:        movl    #lisp,a3@-      | insert (push) the address of the lisp string on to top of argv stack
                     14:        movl    a3,sp           | set the stack to point to the new stack head.
                     15: |
                     16: |      Set up a call to exece
                     17:        pea     a4@             | push the address of arge on the stack
                     18:        pea     a3@             | push the address of argv on the stack
                     19:        movl    #lisp,sp@-      | push the name of the program on the stack
                     20:        jsr     exece           | now call exece, you've got the right parameters
                     21: exece:
                     22:        moveq    #0x3b,d0
                     23:        movl    a7@(4),d1
                     24:        movl    a7@(8),a0
                     25:        movl    a7@(12),a1
                     26:        trap    #0
                     27:        movl    #0,d0
                     28:        movl    d0,d1
                     29:        trap    #0              | exit if exec fails
                     30: |
                     31: | call exit on a exec failure without losing the return code.
                     32: | we should NEVER return from _exit
                     33: |
                     34: flag:  .asciz  \"-f\"
                     35: lisp:  .asciz  \"/usr/ucb/lisp\"
                     36: .even
                     37: "

unix.superglobalmegacorp.com

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