C语言函数—bdosptr

函数名

bdos

功 能

DOS系统调用

用 法

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; 
} 
  
  
  

如果引用本站的原创文章,请注明原文链接:,本站保留追究责任的权利!