函数名: bdos
功 能: DOS系统调用
用 法: #include <dos.h>
int bdos(int dosfun, unsigned dosdx, unsigned dosal);
程序例:
#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;
}