首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 嵌入开发 > 汇编语言 >

容易的MessageBox提示对话框不知为什么出现循环了

2013-09-06 
简单的MessageBox提示对话框不知为什么出现循环了小生菜鸟,不知道为啥就出现死循环了.386.model flat,stdc

简单的MessageBox提示对话框不知为什么出现循环了
小生菜鸟,不知道为啥就出现死循环了


.386
.model flat,stdcall
option casemap:none
include <windows.inc>
include <user32.inc>
include <kernel32.inc>
includelib user32.lib
includelib kernel32.lib
custom proto
.data
szTitle  db "说什么呢",0
szBuffer db "不说了吧",0
.code
start:
custom proc
invoke MessageBox,NULL,offset szTitle,offset szBuffer,0
custom endp
invoke custom
invoke ExitProcess,0 
end start

[解决办法]

start:
custom proc
invoke MessageBox,NULL,offset szTitle,offset szBuffer,0
custom endp
invoke custom
invoke ExitProcess,0 
end start

当然会死循环了,因为custom定义后面就是invoke,invoke使用程序又执行到customp定义,这样就无限死循环了
[解决办法]
但你那个执行流程的错误的,虽然从表现上来看似乎是对的。

热点排行