第一个Win32汇编
使用的编译器是:
Masm32v8,Win32汇编的编译器
步骤:
1.打开masm文件夹下的QEDITOR.EXE;
2. 建好如下文件;
3. Project--->Build All --->Run Program
即可运行
.386
.model flat, stdcall
option casemap :none ; case sensitive
include /masm32/include/windows.inc
include /masm32/include/user32.inc
include /masm32/include/kernel32.inc
include /masm32/include/gdi32.inc
includelib /masm32/lib/user32.lib
includelib /masm32/lib/kernel32.lib
includelib /masm32/lib/gdi32.lib
.data
szCaption db 'Win32汇编例子',0
szText db 'Win32汇编,Simple and powerful!',0
.code
start:
invoke MessageBox,NULL,addr szText,addr szCaption,MB_OK
invoke ExitProcess,NULL
end start