PAGE	66,132
;
;
;
;
;
;
;
;
;  rdvct.asm
;
;  usage:
;	    extern unsigned long rdvct()
;	    ????.unival = rdvct( vectnum );
;
;  Function to allow a C program to determine the contents of an
;  interrupt vector
;
;  (c) 1984 University of Waterloo,
;           Faculty of Engineering,
;           Engineering Microcomputer Network Development Office
;
;  version
;
;
	include	masmdefs.hsm
	include model.hsm

codedef RDVCT
datadef

cstart  RDVCT
cpublic rdvct

	push	si
	push	es

	mov	SI,+@AB+0[BP]		;get vector number
	shl	SI,1
	shl	SI,1			;* 4
	xor	AX,AX
	mov	ES,AX
	mov	DX,ES:+2[SI]		;segment
	mov	AX,ES:[SI]		;offset

	pop	es
	pop	si

creturn rdvct
cend    RDVCT

	end
