Код:
include 'win32ax.inc' ;Мы хотим запуститься как 64 битный процесс
.data
szMessageCaption DB "TEST", 0
szMessageText32 DB "Working on x32.", 0
.code
proc Our64Proc ;x64 bit process code
use64
CALL @F
DB "Generated using x64 ASM code.", 0
@@:
POP RAX
MOV RCX, RAX
use32
RETF
endp
start:
;invoke DebugBreak ;Used for debugging
MOV AX, CS
CMP AL, 1Bh ;1Bh for 32 bits native, 33h if 64 bits native, 23h for wow64
JE Its32BitsNative
CMP AL, 33h
JE ExitCode
XOR ECX, ECX
CALL 33h:Our64Proc
invoke MessageBox, 0, ECX, szMessageCaption, MB_OK
JMP ExitCode
Its32BitsNative:
invoke MessageBox, 0, szMessageText32, szMessageCaption, MB_OK
ExitCode:
invoke ExitProcess, 0
.end start
http://wasntnate.com/2012/04/heavens...n-32-bit-file/
Вот уж пример райского прыжка на практике от моего буржуйского знакомого.
FASM.