安装masm32,如D:\masm32,,然后在masm32\examples例子中找一个例子参照一下就可以了,,例子中有批处理,,执行批处理就可以了,,呵呵,,,记得各个文件头的路径如 include \MASM32\INCLUDE\windows.inc,,用到文件resource.h需复制到工程文件目录下,rsrc.rc中 include<resource.h>需改成include“resource.h”,批处理文件名等都要修改
MAKEFILE
-------------
NAME = Hello ////每次只要改檔名就行了
OBJS = $(NAME).obj
LINK_FLAG = /subsystem:windows
ML_FLAG = /c /coff
$(NAME).exe: $(OBJS)
Link $(LINK_FLAG) $(OBJS)
del *.obj
.asm.obj:
ml $(ML_FLAG) $<
clean:
del *.obj
===========================================
VAR.BAT
-------------
@echo off
set Masm32Dir=C:\Masm32
set include=%Masm32Dir%\Include;%include%
set lib=%Masm32Dir%\lib;%lib%
set path=%Masm32Dir%\Bin;%Masm32Dir%;%PATH%
set Masm32Dir=
nmake /a---------------nmake.exe必須自己存到c:\masm\bin
pause------------------暫停好查看是否正確
echo on