.386
.model flat, stdcall
option casemap :none ; case sensitive
include \masm32\include\windows.inc
include \masm32\include\masm32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\macros\macros.asm
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.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
其中出现的各种的头文件,及lib文件都在。
而结果是:
db 存在语法错误
szCaption,szText 都是无效的
不知道是怎么回事啊
------解决方案--------------------------------------------------------
.386
.model flat,stdcall
option casemap:none
include windows.inc
include user32.inc
includelib user32.lib
include kernel32.inc
includelib kernel32.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
------解决方案--------------------------------------------------------
------解决方案--------------------------------------------------------
szCaption db 'Win32汇编例子',0
szText db 'Win32汇编,Simple and powerful!',0
引号要用半角英文字符