Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.1 KiB

4 years ago
  1. ;
  2. ; nocrt.asm
  3. ;
  4. ; linking with this object file will resolved all the WINSTART externals
  5. ; without bringing in any of the C runtime code, chopping down the size
  6. ; of _TEXT and DGROUP.
  7. ;
  8. ; Needless to say, you cannot use any C runtime functions if you do so.
  9. ;
  10. ; Created 2-1-89, craigc
  11. ;
  12. ?PLM = 1
  13. ?WIN = 1
  14. memS = 1
  15. .xlist
  16. include cmacros.inc
  17. .list
  18. sBegin data
  19. __psp dw ? ; winstart assigns this variable to the PSP segment
  20. sEnd
  21. sBegin code
  22. assumes CS,CODE
  23. public __setargv,__setenvp,__nmalloc
  24. public __psp,__cinit ; ,_exit
  25. public __acrtused
  26. dummy proc near
  27. __nmalloc: ; called by myalloc (support for setargv and setenvp)
  28. __setargv: ; called to set __argv and __argc
  29. __setenvp: ; sets up environment (in DGROUP!)
  30. __cinit: ; C runtime initialization
  31. __acrtused:
  32. xor ax,ax
  33. ret
  34. dummy endp
  35. ; _exit -
  36. ;
  37. ; called by WINSTART after WinMain returns to exit the task
  38. ; will assemble with a "possible invalid use of nogen" since there's
  39. ; no point in the last half of the stack frame code...
  40. cProc _exit, <NEAR,PUBLIC>
  41. parmW status
  42. cBegin
  43. mov ax,status
  44. mov ah,4Ch
  45. int 21h
  46. cEnd <nogen>
  47. sEnd
  48. end