; reltype.asm .MODEL SMALL,C INCLUDE snoop.inc PUBLIC reltype .CODE reltype PROC ARG int_vect:WORD,handle:WORD LOCAL int_vect_addr:DWORD USES bx,cx,dx,ds,es,si,di mov ax,int_vect ; load interrupt vector number mov cl,2H ; interrupt vect number * 4 shl ax,cl mov bx,ax ; offset into vector table mov dx,0000H mov es,dx ; make ES point to segment of IVT mov cx,WORD PTR [es:bx] ; get offset mov WORD PTR [int_vect_addr],cx mov cx,WORD PTR [es:bx+2] ; get segment mov WORD PTR [int_vect_addr+2],cx mov ah,3H ; prepare to call release_type mov bx,handle pushf call DWORD PTR [int_vect_addr] mov ax, 0H ; set error status jnc exit neg dh mov al, dh cbw exit: ret ENDP END