|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Apr 2002
Città: Vigevano(PV)
Messaggi: 2124
|
[Asm x86]Stack
If the stack expands in this mode(after a push ebp and mov esp, ebp):
Codice:
esp(0x00) ----- | | | | \./ | |_____| | | | arg1| esp+0x04 |_____| | | | arg2| esp+0x08 |_____| | | ----- If I sub anything(pop), the stack'll return to up(this is, in other words, the mothod to clean the stack... in tihs case we can use both sub esp, 0x08 and ret08). Am I wrong? P.S: to clean stack....is enougth do this? mov esp, ebp pop ebp
__________________
Gnu/Linux User ![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Apr 2002
Città: Vigevano(PV)
Messaggi: 2124
|
scusate l'inglese ma ieri sera ero npo stanco
![]()
__________________
Gnu/Linux User ![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
Scusa, ma gli argomenti li prepari prima di entrare nella tua proc (con la push e la pop)...
Vuoi pulire la memoria di parametri ?!?!?!? Allora credo che il mdoo migliore sia la RET... Ultima modifica di cionci : 04-09-2004 alle 12:03. |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 05:29.