| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 618 人关注过本帖
标题:我怎么运行不了这个程序呀
只看楼主 加入收藏
qiaobobo
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-12-21
收藏
 问题点数:0 回复次数:1 
我怎么运行不了这个程序呀



TITLE 电话本程序

include Irvine32.inc
CR=09H
LF=00H

.data

strTitle byte "电话查询系统(注意一定要先添加号码否则将溢出)",CR,LF,0
strTitle1 byte "版权所有欢迎使用.blog.asp?name=mjc000",CR,LF,0
strAddNew byte "1.条件号码",CR,LF,0
strQur byte "2.查询",CR,LF,0
strDel byte "3.删除",CR,LF,0
strExit byte "4.退出",CR,LF,0
strInfo byte "请选择您要的功能选项: ",0

strInput_name byte "请输入姓名: ",0
strInput_Num byte "请输入电话号码: ",0
strInputInfoQre byte "请输入和姓名相关的信息(按ENTER看全部记录): ",0

strNull byte " ",0
LengthIn_str dword 0
BuffName byte 200 dup (16 dup (0))
BuffNum byte 200 dup (16 dup (0))
RecordCount dword 0
RecordIndex dword 0
InputName byte 16 dup(0)

.code
main proc

call ShowMenu

call readchar
cmp al,'1'
jz _AddNew
cmp al,'2'
jz _Qur
cmp al,'3'
jz _Del
cmp al,'4'
jz _exit
jmp main
_AddNew:
call AddNew
jmp main
_Qur:
call Qur
call WaitMsg
jmp main
_del:
call del
jmp main
_exit:
exit
main endp
;-------------------------------------
;下面的函数ShowMenu完成显示界面
;
ShowMenu proc
mov eax,blue+(green*16)
call settextcolor
call clrscr

mov dh,4
mov dl,11
call gotoxy
mov edx,offset strTitle
call Writestring

mov dh,0
mov dl,0
call gotoxy
mov edx,offset strTitle1
call Writestring

mov dh,6
mov dl,32
call gotoxy
mov edx,offset strAddNew
call Writestring

mov dh,8
mov dl,32
call gotoxy
mov edx,offset strQur
call Writestring

mov dh,10
mov dl,32
call gotoxy
mov edx,offset strDel
call Writestring

mov dh,12
mov dl,32
call gotoxy
mov edx,offset strExit
call Writestring

mov dh,14
mov dl,32
call gotoxy
mov edx,offset strInfo
call Writestring
ret
ShowMenu endp
;-----------------------------------------
;-------------------------------------
;下面的函数AddNew完成添加新记录
;
AddNew proc
call crlf
mov edx,offset strInput_name
call Writestring

mov eax,16
mul RecordCount
mov edx,offset BuffName
add edx,eax
mov ecx,16
call readstring
mov edx,offset strInput_Num
call Writestring

mov eax,16
mul RecordCount
mov edx,offset BuffNum
add edx,eax
mov ecx,16
call readstring
inc RecordCount
ret
AddNew endp
;-----------------------------------------
;-------------------------------------
;下面的函数Qur完成查询功能
;
Qur proc
call crlf
mov edx,offset strInputInfoQre
call writestring
mov edx,offset inputname

call readstring
mov al,[edx]
cmp al,0
jnz QurInfo

mov ecx,16
mov ecx,RecordCount
mov ebx,-16
mov RecordIndex,0

shownextRecord:
add ebx,16

mov edx,offset buffName
add edx,ebx
call writestring
mov edx,offset strNull
call writestring
mov edx,offset buffNum
add edx,ebx
call writestring
call crlf
loop shownextRecord
jmp QurEnd

QurInfo:
mov ecx,RecordCount
add ecx,1
mov ebx,-16

mov edx,offset buffName
nextRecord:

add ebx,16
add edx,ebx
mov edi,edx
recmp:
cld
mov esi,offset inputname
mov al,[esi]

repnz scasb
jnz check_r_isend
push edi

push edx
mov edx,offset inputname
call LengthofStr
pop edx

nextch:
mov al,[esi+1]
cmp al,[edi]
jnz rescan
dec lengthIn_str
jz showthis
inc esi
inc edi
jmp nextch
rescan:
pop edi
jmp recmp
check_r_isend:
dec ecx
jz QurEnd
jmp nextRecord
showthis:

QurEnd:
ret
Qur endp
;-----------------------------------------
;-------------------------------------
;下面的函数Del完成删除指定记录
;
Del proc
ret
Del endp
;-----------------------------------------
;-------------------------------------
;下面的函数LengthofStr完成求得字符串的字符个数
;返回值:字符串长度 存放在LengthIn_str中
;参数:edx ,事先把要处理的字符串的首地址存放到edx中
LengthofStr proc
push eax
mov lengthIn_str,0
Length_L1:
mov al,[edx]

cmp al,0
jz Lend
inc lengthIn_str
inc edx
jmp Length_L1
Lend:
pop eax
ret
LengthofStr endp
;-----------------------------------------
end main


搜索更多相关主题的帖子: 运行 
2005-12-24 19:14
zinking
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:35
帖 子:916
专家分:0
注 册:2004-12-5
收藏
得分:0 

这好像是保护模式下的!用cmd执行不了


http://kongfuziandlife. http://codeanddesign.
2005-12-25 09:45
快速回复:我怎么运行不了这个程序呀
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.030316 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved