; acctype.asm .MODEL SMALL,C INCLUDE snoop.inc PUBLIC acctype .CODE acctype PROC ARG int_vect:WORD,access_type_ptr:FAR 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 les bx,DWORD PTR [access_type_ptr] mov ax,WORD PTR [es:bx.if_type] push ax mov ah,2H ; prepare to call access_type mov al,BYTE PTR [es:bx.if_class] ; mov cx,WORD PTR [es:bx.typelen] mov cx,0H mov dl,BYTE PTR [es:bx.if_number] lds si,DWORD PTR [es:bx.type_acc] les di,DWORD PTR [es:bx.receiver_ptr] pop bx pushf call DWORD PTR [int_vect_addr] jnc exit neg dh mov al, dh cbw exit: ret ENDP END