di,0 lop1: mov ah,40h mov bx,handle mov cx,20 lea dx,namelist add dx,di int21h jc err2 mov ah,40h mov bx,handle mov cx,20 lea dx,dormlist add dx,di int21h jc err2 mov ah,40h 8 mov bx,handle mov cx,1 lea dx,distele int21h jc err2 mov ah,40h mov bx,handle mov cx,20 lea dx,telelist add dx,di int21h jc err2 add di,20 inc al mov cl,[si] sub cl,al jmp lop1 exit2: mov ah,3eh mov bx,handle int21h exit1: mov ah,4ch int21h err1: mov ah,9 lea dx,error1 int21h jmp exit1 err2: mov ah,9 lea dx,error2 int21h jmp exit2 ret write endp 3.8.3 关闭文件 exit2: mov ah,3eh mov bx,handle int21h exit1: mov ah,4ch int21h err1: 9 mov ah,9 lea dx,error1 int21h jmp exit1 err2: mov ah,9 lea dx,error2 int21h jmp exit2 4 源程序与执行结果 4.1 执行结果 4.1.1 disdata 函数的执行结果 4.1.2 adder 函数的执行结果 10 4.1.3 modify 函数的执行结果 4.1.4 delete 函数的执行结果