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

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
主站蜘蛛池模板: 米林县| 福安市| 和林格尔县| 泸定县| 南召县| 平谷区| 连云港市| 龙里县| 当雄县| 白水县| 天镇县| 白玉县| 马公市| 博乐市| 洪泽县| 高密市| 济宁市| 图木舒克市| 南城县| 鸡东县| 辉南县| 常熟市| 沈阳市| 抚顺县| 金塔县| 天祝| 博客| 乌鲁木齐县| 永平县| 彭泽县| 牙克石市| 旬阳县| 汉中市| 汾西县| 垫江县| 五寨县| 长泰县| 新龙县| 秦安县| 阿城市| 鲁山县|