Under Watcom, hooking an interrupt in protected mode requires writing an interrupt wrapper yourself in assembly. In the Watcom installation directory\samples\goodies there are bimo.asm and bimodal.c, which are examples of setting protected-mode and real-mode interrupt service functions for the same interrupt vector. You can refer to them. The main thing is to consider protection of the data area and code segment under protected mode. If you want to simplify it, I tried using only int 31 to set the protected-mode interrupt, and on some machines it didn't work properly, though on some it did. You can give it a try.
void __interrupt __far (*oldISR)(void);
void __interrupt __far newISR(void)
{
....
outp(0x20, 0x20);
}
union REGS r;
void __far *fh;
/* get old isr pointer */
r.x.eax = 0x0204;
r.x.ebx = (unsigned long)vector;
int386(0x31, &r, &r);
oldISR = (void __interrupt *)MK_FP(r.x.ecx, r.x.edx);
/* set new isr */
fh = (void __far *)newISR;
r.x.eax = 0x0205;
r.x.ebx = (unsigned long)vector;
r.x.ecx = (unsigned long)FP_SEG(fh);
r.x.edx = (unsigned long)FP_OFF(fh);
int386(0x31, &r, &r);