flat assembler
Message board for the users of flat assembler.

Index > Main > macroinstruction proc

Author
Thread Post new topic Reply to topic
keenin



Joined: 25 Aug 2003
Posts: 33
keenin
Hi,

I am new to FASM and wondered, why the virtual memory of the macroinstruction proc is defined at ebp+8.
Where does it point to (yeah, to the args, I think)? And *especially* why?

Thanks.

keenin.
Post 25 Aug 2003, 10:32
View user's profile Send private message Reply with quote
keenin



Joined: 25 Aug 2003
Posts: 33
keenin
I think I found out myself.

call addr:
push ebp
push eip
; = 8 Byte
mov ebp,esp
goto addr

So the virtual data of any proc lies in ebp+8.

Right?
Post 25 Aug 2003, 10:43
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
keenin wrote:
I think I found out myself.

call addr:
push ebp
push eip
; = 8 Byte
mov ebp,esp
goto addr

So the virtual data of any proc lies in ebp+8.

Right?


Yes, but right order is:

call addr:
push eip
goto addr

push ebp ; This is not part of call, but part of 'ENTER' instruction.
; = 8 Byte
mov ebp,esp ; This is part of ENTER too.

For more detailed description of ENTER instruction look at Intel manual.

Regards
Post 25 Aug 2003, 13:30
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
keenin



Joined: 25 Aug 2003
Posts: 33
keenin
Thanks a lot.

Where can I find the Intel manual?
Post 25 Aug 2003, 13:57
View user's profile Send private message Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv
Post 25 Aug 2003, 14:30
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.