x64 or x86 ASM on x64 machine
Posted 06 January 2012 - 07:02 AM
I used to code many years ago and just recently got back into it all. Main difference now days being everyone including myself is running a x64 machine instead of a x86 (which wern't popular 10+ years ago when I was last coding). I know I can't use inline asm with msvsc++ and that I need to revert back to dreaded MASM on a 64 bit
This is probably a really noobie question but I just want to know for sure before I start refreshing my memory and reading up on the latest information. I am assuming most games today are still 32 bit processes and are running as *32 on 64 bit machines. I know I have to compile 32 bit DLL files to inject into a 32 bit process even when running on a x64 machine. Does that mean I need to write my code in 64 bit asm when working with a 32 bit process which is running on a x64 machine.
I am sure someone is rolling their eyes right now but thanks for taking the time to answer my out of practice question.
Posted 06 January 2012 - 03:28 PM
Posted 06 January 2012 - 09:34 PM
I'm certain you can use inline assembly within Visual Studio.
Thanks for clearing that up KEMiCZA. Great to hear I can stick to x86 ASM - makes life so much easier.
I have written a few DLL files just messing around on the MS games (which are 64 bit) and inline asm definitely isn't supported by vsc++. What I done instead was make a .asm file and assembly it with MASM, then call the function in the .cpp file.
I don't have the same problem compiling projects that are 32 bit though, which leads to me believe 64 bit inline asm isn't supported by vsc++ yet.
Posted 11 April 2012 - 09:35 PM
<3 Micral for ths one ;)
Posted 22 April 2012 - 10:24 PM
I know I have to compile 32 bit DLL files to inject into a 32 bit process even when running on a x64 machine. Does that mean I need to write my code in 64 bit asm when working with a 32 bit process which is running on a x64 machine.
The simple answer is No. You have to honor the architecture the target process is running i.e 64bit asm code for 64bit process and 32bit asm for 32bit process. There is a workaround i believe for injecting 32bit dll to a 64bit or vice versa however the work involved to inject and perform required functions is just a waste of time and resources. Much better to use same architecture.
PS: That is sad to hear about MSVC not supporting inline asm in 64bit. I've been using inline asm in my projects for like forever.
DEViATED Game Trainers- Owning your asses since Sept 2010!
not really =(
Posted 24 April 2012 - 07:07 AM
<3 Micral for ths one ;)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users