/* LASTDRV3.C -- uses only documented DOS */

#include <stdlib.h>
#include <stdio.h>
#include <dos.h>

main()
{
    unsigned lastdrv;
    _AH = 0x19;
    geninterrupt(0x21);
    _DL = _AL;
    _AH = 0x0E;
    geninterrupt(0x21);
    lastdrv = _AL;
    fputs("LASTDRIVE=", stdout);
    putchar('A' - 1 + lastdrv);
    putchar('\n');
    return lastdrv;
}
