;======================================
;=	GET INTERRUPT VECTOR          =
;======================================

get_int	macro	n,vector,r
	ifnb	<r>
	pushr	<ax,bx,es>
	endif
	mov	al,n
	mov	ah,35H
	int	21H
	mov	word ptr vector,bx
	mov	word ptr vector&[2],es
	ifnb	<r>
	popr	<es,bx,ax>
	endif
	endm

;======================================
;=	SET INTERRUPT VECTOR          =
;======================================

set_int	macro	n,vec_dx,vec_ds
	ifnb	<vec_ds>
	mov	dx,vec_ds
	mov	ds,dx
	endif
	ifnb	<vec_dx>
	mov	dx,vec_dx
	endif
	mov	al,n
	mov	ah,25H
	int	21H
	endm
