;
;		ish file converter for MS-DOS  Ver 2.00 (90/3/27)
;
;
;		Copyright (c) 1986, 1987, 1989, 1990  by  M. ishizuka
;		All rights reserved.
;



;-----------------------------------------------;
;						;
;	calc_crc_of_file			;
;						;
;	INPUT :	ax (lenght of file (low))	;
;		dx (length of file (high))	;
;		bx (file handler)		;
;	OUTPUT:	CY (error)			;
;		ax (crc32 (low))		;
;		dx (crc32 (high))		;
;		bp (crc16)			;
;	ERROR :	NON				;
;	BREAK :	flags, cx, si, bp		;
;						;
;-----------------------------------------------;

calc_crc_of_file:
		mov	word ptr length_of_file_high, dx
		mov	word ptr length_of_file_low, ax
		@@display	msg_crc_checking
		mov	ax, 0ffffh
		mov	dx, ax
		mov	bp, ax
		@@calc_crc_of_file_sub	@@crc16_32_sub
		pushf
		push	ax
		push	dx
		@@display	msg_crc_checking_clr
		pop	dx
		pop	ax
		popf
		not	ax
		not	dx
		not	bp
		ret
