> bdos<DOS.H> ~ Online tutorial

bdos


 Accesses DOS system calls

 Declaration:

 int bdos(int dosfun, unsigned dosdx, unsigned dosal);

 Remarks:


bdos provides direct access to many of the DOS system calls.

See your DOS reference manuals for details on each system call.

 Use bdos for system calls that require an integer argument.
 Use bdosptr if system calls require a pointer argument; this is
   important in the large data models (compact, large, and huge).


Example:

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

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: