News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Entry point

Started by trodon, July 29, 2006, 11:46:51 AM

Previous topic - Next topic

trodon

hi!
i have one question about entry point of fresh compiled programs in masm32
as all people know 99% compiled programs have entry point on offset 00401000....
is there any posibility to when i write my code and compile to be for example 00402000 or something like this?
thanks!


Max_Power

To my knowledge there really isn't a way to tell the linker, "I want the entry point to be right... there!" You might play with the entry switch though and if you just don't want the entry point to be at 401000 you could always change the image base.

bonobo

You can add some code (procedures) before the start: label.

I can't see any point in changing the entry point though.

trodon

Quoteif you just don't want the entry point to be at 401000 you could always change the image base.

yeah but when i change image base my aplication then crash :(


zooba

Why would you want to do this? Changing the entry point won't affect anything in code you've compiled yourself.

Bonobo is right though, putting code before your entry label will move it away from the default 401000.

Cheers,

Zooba :U

trodon

QuoteWhy would you want to do this? Changing the entry point won't affect anything in code you've compiled yourself.

yes i know that will not affect but i am just interesting is there posibility to do this :)

QuoteBonobo is right though, putting code before your entry label will move it away from the default 401000.

Yes its work i am also try this, but i am thinking myself is there any other way to do this job

zooba

AFAIK, re-basing is the best way to move it far away. Moving it a few bytes is probably best done with 'NOP's or 'DB 0'

drizz


org 0C0DEh-1000h
start:

.../BASE:0xBAD0000...


everything works ok. :)
The truth cannot be learned ... it can only be recognized.

trodon

thank you drizz you are the man  :U