home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume5 / smallc / part3 / vax / crt0.c < prev    next >
Encoding:
Text File  |  1986-11-30  |  362 b   |  33 lines

  1. #asm
  2. # C runtime startoff
  3.  
  4.     .set    exit,1
  5. .globl    start
  6. .globl    _main
  7. .globl    _exit
  8.  
  9. #
  10. #    C language startup routine
  11.  
  12. start:
  13.     .word    0x0000
  14.     subl2    $8,sp
  15.     movl    8(sp),4(sp)  #  argc
  16.     movab    12(sp),r0
  17.     movl    r0,(sp)  #  argv
  18.     jsb    _main
  19.     addl2    $8,sp
  20.     pushl    r0
  21.     chmk    $exit
  22. #endasm
  23. exit(x) int x; {
  24.     x;
  25. #asm
  26.     pushl    r0
  27.     calls    $1,exit2
  28. exit2:
  29.     .word    0x0000
  30.     chmk    $exit
  31. #endasm
  32. }
  33.