当前位置: 代码迷 >> 汇编语言 >> 用masm32写的软件开发的一个小程序没法编译通过,各位同仁帮忙看看
  详细解决方案

用masm32写的软件开发的一个小程序没法编译通过,各位同仁帮忙看看

热度:4594   发布时间:2013-02-26 00:00:00.0
用masm32写的软件开发的一个小程序无法编译通过,各位同仁帮忙看看
.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
------解决方案--------------------------------------------------------
探讨
.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 \m……

------解决方案--------------------------------------------------------
szCaption db 'Win32汇编例子',0
szText db 'Win32汇编,Simple and powerful!',0
引号要用半角英文字符
  相关解决方案