; setrecv.asm .MODEL SMALL,C INCLUDE snoop.inc PUBLIC set_recv .CODE set_recv PROC ARG int_vect:WORD,handle:WORD,mode: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,14H ; prepare to call setrecv mov bx,handle mov cx,mode pushf call DWORD PTR [int_vect_addr] exit: ret ENDP END