Mail Archives: djgpp/1993/02/22/17:29:33
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
- Raw text -