#include <stdio.h> #include <dos.h> /* Get current drive as 'A', 'B', ... */ char current_drive ( void ) { char curdrive; /* Get current disk as 0, 1, ... */ curdrive = bdos ( 0x19, 0, 0 ); return ( 'A' + curdrive ); } int main ( void ) { printf ( "The current drive is %c:\n", current_drive() ); return 0; }