win32汇编的一点疑问
.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 'a Messagebax',0
sztext db 'hello,world',0
.code
start:
invoke MessageBox,NULL,offset szcaption,offset sztext,MB_OK
invoke ExitProcess,NULL
end start
为什么这个程序后面必须得加invoke ExitProcess,NULL这语句不加就运行不了
这个程序
.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 'a Messagebax',0
sztext db '你好',0
sz3 db 'wenhao',0
sz1 db 'what is it',0
sz2 db 'hello wiliam',0
.code
start:
invoke MessageBox,NULL,offset sztext,offset szcaption,MB_OKCANCEL or MB_ICONQUESTION
.if eax== IDOK
invoke MessageBox,NULL,offset sz2,offset sz3 ,MB_OK
.else
invoke MessageBox,NULL,offset sz1,offset sz3, MB_OK
.endif
end start
为啥就不用加 invoke ExitProcess,NULL加了反而编译错误呢? 求大神指导啊!!!!
页:
[1]