.model	small,c
.stack	256

adat	segment	use16

puffer		equ	256

file		dw	0
finev		db	"a.a",0
hitx		db	"Hiba!",13,10,36

p1		db	puffer dup(0)

adat	ends

program	segment	use16
assume	cs:program,ds:adat

include	parancs.asm
include	pack.asm

start:		mov	cx,puffer
		mov	bx,adat
		xor	al,al
		lea	di,p1
		mov	es,bx
		push	cx
stalp:		stosb
		inc	al
		loop	stalp

		mov	ax,3c00h
		mov	bx,adat
		xor	cx,cx
		lea	dx,finev
		mov	ds,bx
		int	21h
		pop	cx
		sjc	hiba
		push	ax
		lea	dx,p1
		xchg	ax,bx
		mov	ah,40h
		int	21h
		pop	bx
		sjc	hiba
		mov	ah,3eh
		int	21h

		mov	ax,4c00h
		int	21h

hiba:		mov	bx,adat
		lea	dx,hitx
		mov	ah,9
		mov	ds,bx
		int	21h
		mov	ax,4c00h
		int	21h

program	ends

end	start
