;程序功能:显示一个信息框。 ;ex1.asm(e:\masm\base) ;程序名 ;编译链接方法: ;ml /c /coff ex1.asm ;link /subsystem:console ex1.obj .386 ;指明指令集 .model flat,stdcall ;程序工作模式,flat为Windows程序使用的模式(代码和数据 ;使用同一个4GB段),stdcall为API调用时右边的参数先入栈 option casemap:none ;指明大小写敏感 include windows.inc include user32.inc includelib user32.lib include kernel32.inc includelib kernel32.lib .data ;数据段 szCaption db '抬头串',0 szText db 'Hello!',0 .code ;代码段 start: ;调用win32API--------------------------- invoke MessageBox, ;显示信息框 NULL, ;父窗口句柄 offset szText, ;正文串的地址 offset szCaption, ;抬头串的地址 MB_OK ;按钮 ;---------------------------------------- invoke ExitProcess, ;终止一个进程 NULL ;退出代码 end start ;指明程序入口点