cseg segment
assume cs:cseg,ds:cseg,es:cseg,ss:cseg
org 100h
start:
mov dx,offset file_name
mov ax,3D00h
int 21h
jc error_file
mov bx,ax
mov ah,3Fh
mov cx,offset finish-100h
mov dx,offset start
int 21h
mov dx,offset readf
mov ah,9
int 21h
mov ah,3Eh
int 21h
mov dx,offset closef
mov ah,9
int 21h
mov dx,offset message_ok
mov ah,9
int 21h
jmp end_
error_file:
mov dx,offset error
mov ah,9
int 21h
end_:
ret
;ДАННЫЕ
file_name db 'l.com',0
error db 'Error open file',0Ah,0Dh,'$'
readf db 'File read',0Ah,0Dh,'$'
closef db 'File closed',0Ah,0Dh,'$'
message_ok db 'Все нормально!',0Ah,0Dh,'$'
finish equ $
cseg ends
end start
new_int29: cmp ah,al
jnz @@01
inc al
iret
@@01: jmp oldInt29
mov ax,2020h
int 29h
saveFile:
mov ax,3ch
xor cx,cx
int 21h
push ax
mov bx,ax
mov cx,offset finish-100h
mov dx,100h
mov ah,40h
int 21h
pop bx
mov ah,3eh
int 21h
ret
lea dx,dbFile1
call saveFile
;
;
mov bx,handle;тут указываем handle
mov ah,3Fh
mov cx,offset Finish-100h
mov dx,offset Begin
int 21h
;
;
lea dx,dbFile2
call saveFile
show: push ax
push bx
push cx
push dx
mov ax,hanlde
mov bx,10
xor cx,cx
s1: xor dx,dx
div bx
push dx
inc cx
or ax,ax
jnz s1
s2: inc cx
cmp cx,8
jnz s2
s3: pop ax
or al,30h
int 29h
loop s3
pop dx
pop cx
pop bx
pop ax
ret
Если Вы уже зарегистрированы на Портале - войдите в систему, если Вы еще не регистрировались - пройдите простую процедуру регистрации.