I am writing a program in NASM and I do not want to associate it with CRT, so I will indicate the entry point (which will be the Win32 entry point). This is the source code of the program:
global _myEntryPoint
section .text
_myEntryPoint:
mov eax, 12345
Now this is what I know about the Win32 entry point (please correct me if I am wrong):
- The Win32 entry point does not return a value like a normal function (to exit the Win32 entry point I need to call
ExitProcess()
). - Win32 entry point does not accept any arguments.
Now what I don't know is the following:
- Should the Win32 entry point store any register values (registers written using registration)? I think the answer is “No”, because after the Win32 entry point exits, it terminates the process and does not return the function that expects to save some register values.
source
share