首页
社区
课程
招聘
请大家看看这个代码有什么错误啊~~[求助]
发表于: 2005-6-17 18:53 5750

请大家看看这个代码有什么错误啊~~[求助]

2005-6-17 18:53
5750
.model small
.stack 40h
.data
name_telpar label byte
maxntlen db 30
name_tellen db ?
name_telfld db  30 dup(?)
crlf db 0dh,0ah,'$'
messg1 db 'string?','$'
messg2 db 'name    tel','$'
messg4 db 'input name:','$'
messg5 db 'input a tel number:','$'
name_telctr db 0
name_teltab db 5 dup(?)

.code
begin proc far
mov ax,@data
mov ds,ax

cld
lea di, name_teltab

start:
mov ah,09
lea dx,messg4
int 21h
call input_name
mov ah,09
lea dx,messg5
int 21h
call inphone

call printline
begin endp

input_name proc near
call getchar
inc name_telctr
cld
lea si,name_telfld
mov cx,10
rep movsw
ret
input_name endp

outname proc near
mov ah,9
lea dx,name_teltab
int 21h
outname endp

inphone proc near
call getchar
inc name_telctr
cld
lea si,name_telfld+10
mov cx,4
rep movsw
ret
inphone endp

outphone proc near
mov ah,09
lea dx,name_teltab+10
int 21h
outphone endp

getchar proc near
mov ah,09
lea dx,messg1
int 21h
mov ah,0ah
lea dx,name_telpar
int 21h
mov ah,09
lea dx,crlf
int 21h
ret
getchar endp

printline proc near
mov ah,09
lea dx,messg2
int 21h
mov ah,09
lea dx,crlf
int 21h
mov ah,09
lea dx,name_teltab
int 21h
mov ah,09
lea dx,crlf
int 21h
ret
printline endp
end begin

[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 234
活跃值: (61)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
2
你把编译时错误提示也贴上啊,没人会一行一行帮你看的
2005-6-18 16:02
0
雪    币: 603
活跃值: (617)
能力值: ( LV12,RANK:660 )
在线值:
发帖
回帖
粉丝
3
好久不见小子啦~  
2005-6-18 19:55
0
游客
登录 | 注册 方可回帖
返回
//