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

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
主站蜘蛛池模板: 康保县| 光山县| 右玉县| 三都| 镇平县| 禹城市| 普宁市| 青河县| 乌鲁木齐县| 文登市| 如皋市| 沐川县| 富锦市| 海晏县| 沙湾县| 大田县| 新巴尔虎右旗| 石棉县| 二连浩特市| 额尔古纳市| 甘泉县| 东至县| 乌兰县| 海南省| 安达市| 同仁县| 东台市| 东辽县| 普洱| 菏泽市| 贵州省| 东丰县| 永济市| 揭阳市| 华宁县| 昌图县| 淮安市| 翁源县| 化隆| 宜春市| 泸定县|