home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / LIBSRC.ZOO / libsrc / local / crt0.asm < prev    next >
Assembly Source File  |  1992-03-11  |  1KB  |  62 lines

  1.               .386P
  2.  
  3.  
  4. ;  Libraries
  5.  
  6.               INCLUDELIB   DOSCALLS
  7.  
  8.               ASSUME   cs:FLAT, ds:FLAT, es:FLAT, ss:FLAT
  9.  
  10. DGROUP        GROUP    _DATA, CONST, _BSS, STACK
  11.  
  12.  
  13. _DATA         SEGMENT  DWORD USE32 PUBLIC 'DATA'
  14.  
  15.               PUBLIC   __acrtused
  16. __acrtused    EQU      0                      ; link hook
  17.  
  18. _DATA         ENDS
  19.  
  20.  
  21. CONST         SEGMENT  DWORD USE32 PUBLIC 'CONST'
  22. CONST         ENDS
  23.  
  24.  
  25. _BSS          SEGMENT  DWORD USE32 PUBLIC 'BSS'
  26. _BSS          ENDS
  27.  
  28.  
  29. STACK         SEGMENT  DWORD USE32 STACK 'STACK'
  30.               db 8192 DUP(0)
  31. STACK         ENDS
  32.  
  33. _TEXT         SEGMENT  DWORD USE32 PUBLIC 'CODE'
  34.  
  35.               EXTRN    _crt1: PROC
  36.  
  37.  
  38. ;  Entry point for module
  39.  
  40.               PUBLIC   __entry
  41. __entry       PROC
  42.  
  43.  
  44.               mov      ebp, esp               ; copy caller's ebp
  45.  
  46. ;  Save command line address
  47.  
  48.               mov      esi, [ebp + 16]        ; get command line address
  49.  
  50. ;  Build command line argument array and count
  51.  
  52.               push     esi                    ; set command line address
  53.               call     _crt1                  ; parse command arguments
  54.  
  55. __entry       ENDP
  56. _TEXT         ENDS
  57.  
  58.  
  59.               END      __entry
  60.  
  61.  
  62.