The MASM Forum

General => The Campus => Topic started by: hutch-- on March 22, 2021, 04:00:06 PM

Title: the program start address
Post by: hutch-- on March 22, 2021, 04:00:06 PM
If its 32 bit MASM, try a "start:" label and "end start" at the end of the code.

You may have to tell some more about what you are writing.
Title: Re: the program start address
Post by: morgot on March 22, 2021, 10:50:21 PM
Use GetmoduleHandle,0
in eax will be base address of your module. Than,find EntryPoint in PE file in memory.
Title: Re: the program start address
Post by: Vortex on March 23, 2021, 04:02:47 AM
Hi Dave,

Welcome to the Masm Forum.

Hutch is right. You can try this one :

include     \masm32\include\masm32rt.inc

.code

start:

    invoke  crt_printf,CTXT("Application start address = %X"),\
            ADDR start

    invoke  ExitProcess,0

END start


You should build a console application to view the output.
Title: Re: the program start address
Post by: nidud on March 23, 2021, 06:43:02 AM
deleted