; ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
; ³ (c) Lord Julus - 2000		 Vxtasy #1 - Magazine source code ³
; ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

;==========( Home procedure )================================================

homeproc proc near			   ;
	xor ax, ax			   ;
	xor dx, dx			   ;
	lea di, firstlinepos		   ; make firstlinepos = 0
	call fill_axdx			   ;
	xor cx, cx			   ;
	xor dx, dx			   ;
	call move_from_0		   ; move to beginning of file
	call read_all_lines		   ; and read lines
	mov ax, linesread		   ;
	mov crtdispline, ax		   ;
	mov overend, 0			   ;
	ret				   ;
homeproc endp				   ;

;==========( End procedure )=================================================

endproc proc near			   ;
	xor cx, cx			   ;
	xor dx, dx			   ;
	sub dx, 3			   ;
	sbb cx, 0			   ;
	call move_from_2		   ; move to end of file - 3 (cr/lf)
	call check_fseek		   ;
	lea di, firstlinepos		   ; save first line position
	call fill_axdx			   ;
	mov cx, 24d-skip_above-skip_below-1; move back one page
	call go_back_cx_lines		   ;
	call check_fseek		   ;
	lea di, firstlinepos		   ; save first line position
	call fill_dxcx			   ;
	call move_from_0		   ;
	call read_all_lines		   ; and readlines
					   ;
	mov ax, linesinfile		   ;
	mov crtdispline, ax		   ;
	mov overend, 1			   ;
	ret				   ;
endproc endp				   ;
;============================================================================
