官术网_书友最值得收藏!

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
主站蜘蛛池模板: 都江堰市| 余干县| 鄂托克前旗| 两当县| 阳春市| 正镶白旗| 鹿邑县| 民乐县| 阿巴嘎旗| 商水县| 宁南县| 若羌县| 上杭县| 平邑县| 宜春市| 松溪县| 志丹县| 勐海县| 水城县| 重庆市| 宁河县| 浮梁县| 肇州县| 洞头县| 商都县| 金平| 荆州市| 深泽县| 隆林| 桂阳县| 晋州市| 马山县| 固镇县| 宜良县| 张北县| 万载县| 英吉沙县| 平潭县| 化隆| 鹰潭市| 乐业县|