Date: 22 Feb 1993 17:13:10 -0500 (EST) From: JMILLER AT CHESS DOT EISC DOT UTOLEDO DOT EDU Subject: How to obtain equivalent code for _get_dosvect? To: djgpp AT sun DOT soe DOT clarkson DOT edu Organization: Edison Industrial Systems Center I am trying to port some code from Microsoft C and I need the function _dos_getvect. The following is my best guess for the code to perform this function but it does not work. I suspect the trouble may be that I don't know how to declare the function as an _interrupt which is how it is declared in Microsoft C. This function fails with exception 33 (0x21) when it is called. Thanks in advance for any help. void * _dos_getvect(int i) { struct SREGS segregs; union REGS inregs, outregs; inregs.h.al = (char) i; inregs.h.ah = 0x35; printf("%d\n", i); intdosx(&inregs, &outregs, &segregs); return (void *) (0xf0000000 + outregs.x.bx + 16 * segregs.es); } John Miller