It is currently Wed Jan 20, 2021 5:04 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: 64bit ASM question
PostPosted: Fri Jul 12, 2013 8:37 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Mar 17, 2004 12:31 am
Posts: 277
This is valid in 32Bit :

Code:
!use32
!push edi


But not in 64Bit. Why?

A workaround :

Code:
compilerif SizeOf(Integer)=8
!push rbp
!push rdi
CompilerElse
!push ebp
!push edi
CompilerEndIf
!mov eax,10
compilerif SizeOf(Integer)=8
!pop rdi
!pop rbp
CompilerElse
!pop edi
!pop ebp
CompilerEndIf
MessageRequester("Hallo","Why?")


But the question remains...


Top
 Profile  
Reply with quote  
 Post subject: Re: 64bit ASM question
PostPosted: Sat Jul 13, 2013 3:48 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Aug 15, 2009 6:59 pm
Posts: 1260
Because stack items allways have the native register size. So for 64bit you allways need to push a 64bit value, on 32bit you have to push a 32bit value.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye