Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Quick question

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
vng21092
Grandmaster Cheater
Reputation: 15

Joined: 05 Apr 2013
Posts: 644

PostPosted: Mon Jul 13, 2015 7:02 pm    Post subject: Quick question Reply with quote

if I push EAX, and THEN I push EBX, when I pop them. Should I pop EBX first, and THEN pop EAX? Or is it the other way around? This is how I see it that's why, just want to confirm

Code:
push eax
mov eax,[rdi]
push ebx
mov ebx,[rdi+4]
.
.
blah blah
.
.
pop ebx
pop eax

Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Jul 13, 2015 9:00 pm    Post subject: This post has 1 review(s) Reply with quote

Last In First Out (LIFO)
Last one you push to the stack (EBX) is the first one popped out.

push eax
push ebx
pop ebx
pop eax
Back to top
View user's profile Send private message
aikoncwd
Grandmaster Cheater
Reputation: 23

Joined: 21 Dec 2012
Posts: 591
Location: Spain (Barcelona)

PostPosted: Tue Jul 14, 2015 1:22 am    Post subject: Reply with quote

Imagine the stack as stack of papers. You put a papers on top, when you want to work you will take the firt paper of the stack. Thats how a LIFO works


_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Tue Jul 14, 2015 3:04 am    Post subject: Reply with quote

You are correct.

If lifo confuses you, just remember the last push is the first pop Very Happy. Works for me

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites