; This is program pgm15_3a.asm (p.323 of text)
;
title prm15_3a: set up tsr program
;
EXTRN		main:near, setup_int:near
EXTRN		new_vec:word, old_vec:dword
PUBLIC		initialize
c_seg segment	public
	assume cs:c_seg
initialize PROC
; setup int vectors
	mov new_vec, offset main		; store address
	mov new_vec+2, cs		; segment
	lea di, old_vec			; di points to vector buffer
	lea si, new_vec			; si points to new vector
	mov al, 09h			; keyboard interrupt
	call setup_int			; set interrupt vector
; exit to dos
	lea dx,initialize
	int 27h				; terminate but stay resident
initialize endp
c_seg ends
	end
