Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mov %eax,(%esp)

What is the difference between the following statements?

mov %eax,%esp
mov %eax,(%esp)

I'm working on diffusing a binary bomb and am having trouble with a few of the mov and leal commands early on in the assembly.

like image 664
arc Avatar asked Oct 19 '12 15:10

arc


1 Answers

This copies the value in %eax into %esp.

mov %eax,%esp

This copies the value from %eax to the location in memory that %esp points to.

mov %eax,(%esp)
like image 191
Dirk Holsopple Avatar answered Sep 28 '22 18:09

Dirk Holsopple