flat assembler
Message board for the users of flat assembler.

Index > Main > mov eax,ecx vs push ecx pop eax?

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
IronFelix: Read the Intel manual 2B. It gives the logical equivalent of PUSH. Basically this:
Code:
sub esp,4
mov [esp],value    
You don't have to guess at these things. The manuals explain it all in detail.
Post 13 Jan 2009, 18:10
View user's profile Send private message Visit poster's website Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 975
Location: Czechoslovakia
MazeGen
Maybe he's confused why PUSH [ESP] pushes the value at [original!ESP] instead of [original!ESP-4]

intel man wrote:
if a PUSH instruction uses a memory operand in which the ESP register is used for computing the operand address, the address of the operand is computed before the ESP register is decremented.
Post 13 Jan 2009, 18:37
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.