home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / djgpp / lib / crt0.s < prev    next >
Encoding:
Text File  |  1991-03-06  |  358 b   |  36 lines

  1.  
  2. /*
  3. **    Called as start(argc, argv, envp)
  4. */
  5.  
  6.     .text
  7.  
  8.     .long    0        /* in case of null references */
  9.     .long    0
  10.  
  11.     .globl    start
  12. start:
  13.     movl    %esp,%ebx
  14.     movl    8(%ebx),%eax
  15.     pushl    %eax
  16.     movl    %eax,_environ
  17.     pushl    4(%ebx)
  18.     pushl    (%ebx)
  19.     call    _main
  20.     addl    $12,%esp
  21.     pushl    %eax
  22.     call    _exit
  23.  
  24.     movl    $0x4c00,%eax
  25.     int    $0x21
  26.  
  27.     ret
  28.  
  29.     .data
  30.  
  31.     .globl    _environ
  32. _environ:
  33.     .long    0
  34.  
  35.  
  36.