I tried to compile the following code (test.asm):
section .text
global _WinMain@64
_WinMain@64:
jmp _Begin
_End:
mov esi, 0x77162c51 ;Address of 'WinExec' function
call esi ;Error(9)
ret
_Begin:
xor eax, eax
push eax ;Error(14)
call _End
db "C:\WINDOWS\system32\calc.exe", 0
Here's the command I used :
nasm -f win64 test.asm -o test.o
And here's the following errors I have in output :
test.asm:9: error: instruction not supported in 64-bit mode
test.asm:14: error: instruction not supported in 64-bit mode
I used to code ASM program using MASM32 on the same architecture without any problem. I don't understand this error.
Thanks a lot in advance for your help.