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

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
主站蜘蛛池模板: 井研县| 开封县| 肥城市| 五寨县| 胶南市| 安庆市| 阿合奇县| 棋牌| 通山县| 盱眙县| 婺源县| 乐陵市| 象州县| 时尚| 竹山县| 韩城市| 南投县| 漳平市| 东明县| 双城市| 长海县| 武邑县| 衢州市| 铅山县| 鄂尔多斯市| 红安县| 玉山县| 花莲市| 图们市| 临高县| 东明县| 五华县| 乌兰察布市| 沽源县| 屏边| 麻栗坡县| 古蔺县| 柘荣县| 丽江市| 延吉市| 吉安市|