汇编初学者请教

来源:百度知道 编辑:UC知道 时间:2024/05/25 04:23:49
.386
.model flat,stdcall
.option casemap:none
;include 文件
include windows.inc
include user32.inc
includelib user32.lib
include kernel32.inc
includelib kernel32.lib
;数据
.data
SzCaption db 'a message box!',0
SzText db 'hello,word!',0
;代码
.code
start:
invoke MessageBox,NULL,offset SzText,offset SzCaption,MB_OK
invoke ExitProcess,NULL

end start

以上为源代码下面是编译结果。是不是缺少资源文件啊?那怎么建啊?

Microsoft (R) Windows (R) Resource Compiler, Version 5.00.1823.1 - Build 1823
Copyright (C) Microsoft Corp. 1985-1998. All rights reserved.

Using codepage 936 as default
Creating rsrc.RES
RC: RCPP -CP 936 -f D:\RCa02504 -g D:\RDa02504 -DRC_INVOKED -D_WIN32 -pc\:/ -E -
I. -I .

RC : fatal error RC1110 : could not open rsrc.rc

Microsoft (R) Windows Resource To Object Converter Version 5.00.1736.1
Copyright (C) Micros

你没用什么资源文件吧,估计是你的make.bat用错了,我帮你写一个make.bat吧:

假如你的这个文件名为test.txt

ml /c /coff test.txt

link /subsystem:windows test.obj

dir test.*
pause

把以上内容保存为.bat文件,和ml、link以及你的test.txt放在一起,然后进行build,试试吧。

我怎么看上面的代码象WINDOWS 编程啊!!!!