I want to compile x64 app with simple MsgBox
using Fasm. I've wrote the code, it compiles successfully, but when I run it nothing is shown and the program just ends. What's wrong?
format PE64 GUI 4.0
entry main
include 'win64a.inc'
main:
invoke MessageBox,NULL,'Hello, World!','Fasm message box:',MB_OK
invoke ExitProcess,0
library kernel32,'kernel32.dll',\
user32,'user32.dll'
include 'api/kernel32.inc'
include 'api/user32.inc'
If try to debug in VS2017 I get an exception:
Вызвано исключение по адресу 0x0000000000001108 в program.exe: 0xC0000005: нарушение прав доступа при исполнении по адресу 0x0000000000001108.
If translate:
Exception at address 0x0000000000001108 in program.exe: 0xC0000005: access violation when executing address 0x0000000000001108.