Newbie here so bare with me.
I am using MASM32 and looking at the example files to get going.
I compiled the exe and ran it. Work like it is supposed to.
Now, I am looking at the assembly code to see the guts of the program.
I can see the functions, the calls to the functions, some kernel calls etc.
So here is my question and yes I have done some googling with no results.
Where is the application point stored?
I notice that the first thing in the application is the "press any key..." function in the hello example.
How does the application know where to start executing?
In the code its where it says start but the hex data is not organized as such.
Any references are also welcome.
:t
at the end of the source, you will see an END directive
for executable application source files, the END directive should also have the entry point label
the label can be any public code symbol - i usually use a PROC around my Main code
Main PROC
INVOKE ExitProcess,0
Main ENDP
END Main
Start:
INVOKE ExitProcess,0
END Start
you can also do it in the linker command line, i think - but, why ? - lol
dadndave, I am looking at the hex data in the executable for this information.
I guess I was not clear, when windows goes to execute the program, where does it find the entry point?
ohhh - in the PE header
Tedd posted a nice recent version of the pe/coff v 8.3 spec
http://masm32.com/board/index.php?topic=240.msg26288#msg26288 (http://masm32.com/board/index.php?topic=240.msg26288#msg26288)
PEView is a nice tool to examine exe-file, look here (http://wjradburn.com/software/)
IMAGE_NT_HEADERS -> IMAGE_OPTIONAL_HEADER -> Address of Entry Point
Tutorial 4: Optional Header :
http://win32assembly.programminghorizon.com/pe-tut4.html
This is great information, thanks guys!
:t
Hi Erol,
Quote from: Vortex on December 28, 2013, 06:17:03 AM
Tutorial 4: Optional Header :
http://win32assembly.programminghorizon.com/pe-tut4.html
thank you for the link. You're a devil of a fellow. :t
Gunther