ZAS	SEGMENT STACK
	DW 20 DUP
ZAS	ENDS
;-----------------------------------------------------------
DATA 	SEGMENT
povod	db 10,10,13,'Povodny  retazec :'	
zorad	db 10,10,13,'Zoradeny retazec :'
subor 	db 'd:\soj-zad2.dat'
vstup 	db 100
DATA ENDS
;----------------------------------------------------------------------------
CODE 	SEGMENT
	ASSUME DS:DATA,CS:CODE,SS:ZAS

START:	mov dx,offst povod
	mov ah,09h
	int 21h
	mov ah,3dh
	mov al,0
	mov dx,offset subor
	int 21h
	push ax
vypis:	mov bx,ax		;handler suboru
	mov ah,3fh		;kod dos f.cie
	mov dx,offset vstup	;adresa ukladania prec.dat
	mov cx,1		;pocet byte na citanie
	push cx
	int 21h
	mov cx,ax
	jcxz dalej
	pop cx
	jmp vypis
dalej:	mov dx,offset vstup
	mov ah,09h
	int 21h
CODE 	ENDS
	END






