
上QQ阅读APP看书,第一时间看更新
Windows
If you are on Windows, launch fasmw.exe and enter the following code:
include 'win32a.inc'
format PE GUI
entry _start
section '.text' code readable executable
_start:
push 0
push 0
push title
push message
push 0
call [MessageBox]
call [ExitProcess]
section '.data' data readable writeable
message db 'Hello from FASM!', 0x00
title db 'Hello!', 0x00
section '.idata' import data readable writeable
library kernel, 'kernel32.dll',
user, 'user32.dll'
import kernel,\
ExitProcess, 'ExitProcess'
import user,\
MessageBox, 'MessageBoxA'
Again, do not worry if you hardly understand anything in this code; it will begin to become clearer starting with the next chapter.
In order to run the preceding code, go to the Run menu and select Run.

Compiling sources in FASMW
Admire the result for a few seconds.

Example output