第一个Win32汇编程序
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
.386
.Model Flat,StdCall
Option CaseMap:None
include c:\masm32\include\windows.inc
include c:\masm32\include\user32.inc
includelib C:\masm32\LIB\user32.lib
include c:\masm32\include\kernel32.inc
includelib C:\masm32\LIB\kernel32.lib
.data
szCaption db '我的第一个汇编程序', 0
szText db 'Hello Word!', 0
.code
start:
invoke MessageBox,NULL,offset szText,offset szCaption,MB_OK
invoke ExitProcess,0
end start
编译、链接程序
Ml /c /coff 1.asm
Link /subsystem:windows 1.obj
.Model Flat,StdCall
Option CaseMap:None
include c:\masm32\include\windows.inc
include c:\masm32\include\user32.inc
includelib C:\masm32\LIB\user32.lib
include c:\masm32\include\kernel32.inc
includelib C:\masm32\LIB\kernel32.lib
.data
szCaption db '我的第一个汇编程序', 0
szText db 'Hello Word!', 0
.code
start:
invoke MessageBox,NULL,offset szText,offset szCaption,MB_OK
invoke ExitProcess,0
end start
编译、链接程序
Ml /c /coff 1.asm
Link /subsystem:windows 1.obj