📄 keti3_1.sub
字号:
in_record proc near;输入一条记录
input_again:
mov al,09h
call scrn_bx
mov row,16
mov col,00
call curs
;
mov fileend,0
;
mov ah,09h
lea dx,newinf5
int 21h;'Newrecord.n'
mov dx,filerecord
add dl,30h
mov ah,02h
int 21h
;显示是第几记录
call input_nam
cmp fileend,1
je input_meg
call input_tel
call input_mobile
call input_Email
call input_adress
call input_mail
;逐个完成姓名等信息的输入
mov al,01
call scrn
mov row,24
mov col,00
call curs
;光标上卷一行
input_meg:
;询问:以上输入是否正确
lea dx,newinf7
mov ah,09h
int 21h
call getch
cmp al,'n'
je input_again;不正确
cmp al,'N'
je input_again;不正确
ret ;正确 返回
in_record endp
;--------------------------------------------------------
input_nam proc near;输入姓名
lea dx,nam_inpl;=========
mov ah,09h
int 21h
mov dl,':'
mov ah,02h
int 21h
lea dx,M_nampl;=========
mov ah,0ah
int 21h
mov di,dx
mov bx,dx
add di,2
inc bx
mov cl,[bx]
mov ch,0
push cx
mov ch,cl
mov cl,10
cmp ch,0
jne input_next
mov fileend,1
input_next:
call nam_clear_dl
pop cx;ch=实际字符数
ret
input_nam endp
;---------------------------------------------------------------
input_tel proc near;输入电话
lea dx,tel_inpl;=========
mov ah,09h
int 21h
mov dl,':'
mov ah,02h
int 21h
lea dx,M_telpl;=========
mov ah,0ah
int 21h
mov di,dx
mov bx,dx
add di,2
inc bx
mov cl,[bx]
mov ch,0
push cx
mov ch,cl
mov cl,10
call nam_clear_dl
pop cx;ch=实际字符数
ret
input_tel endp
;-----------------------------------------------------------
input_mobile proc near;输入移动电话
lea dx,mobile_inpl;=========
mov ah,09h
int 21h
mov dl,':'
mov ah,02h
int 21h
lea dx,M_mobilepl;=========
mov ah,0ah
int 21h
mov di,dx
mov bx,dx
add di,2
inc bx
mov cl,[bx]
mov ch,0
push cx
mov ch,cl
mov cl,10
call nam_clear_dl
pop cx;ch=实际字符数
ret
input_mobile endp
;--------------------------------------------------------------------
input_Email proc near;输入Email
lea dx,Email_inpl;=========
mov ah,09h
int 21h
mov dl,':'
mov ah,02h
int 21h
lea dx,M_Emailpl;=========
mov ah,0ah
int 21h
mov di,dx
mov bx,dx
add di,2
inc bx
mov cl,[bx]
mov ch,0
push cx
mov ch,cl
mov cl,10
call nam_clear_dl
pop cx;ch=实际字符数
ret
input_Email endp
;---------------------------------------------------------------
input_adress proc near;输入地址
lea dx,adress_inpl;=========
mov ah,09h
int 21h
mov dl,':'
mov ah,02h
int 21h
lea dx,M_adresspl;=========
mov ah,0ah
int 21h
mov di,dx
mov bx,dx
add di,2
inc bx
mov cl,[bx]
mov ch,0
push cx
mov ch,cl
mov cl,10
call nam_clear_dl
pop cx;ch=实际字符数
ret
input_adress endp
;------------------------------------------------------------
input_mail proc near;输入邮编
lea dx,mail_inpl;=========
mov ah,09h
int 21h
mov dl,':'
mov ah,02h
int 21h
lea dx,M_mailpl;=========
mov ah,0ah
int 21h
mov di,dx
mov bx,dx
add di,2
inc bx
mov cl,[bx]
mov ch,0
push cx
mov ch,cl
mov cl,10
call nam_clear_dl
pop cx;cx=实际字符数
ret
input_mail endp
;------------------------------------------------------------------
saveinf proc near;保存一项记录
;写姓名
lea dx,M_nam
mov cx,10
call inf_in_file
;写电话
lea dx,M_tel
mov cx,12
call inf_in_file
;写移动电话
lea dx,M_mobile
mov cx,12
call inf_in_file
;写Email
lea dx,M_Email
mov cx,20
call inf_in_file
;写地址
lea dx,M_adress
mov cx,20
call inf_in_file
;写邮编
lea dx,M_mail
mov cx,6
call inf_in_file
saveinf endp
;---------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -