Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>bdosptr() ms-dos system call</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 bdosptr()               MS-DOS System Call

 #include   <dos.h>

 int        bdosptr(dosfun,arg,dosal);
 int        dosfun;                      function number
 void       *arg;                        DX or DS:DX values
 unsigned   dosal;                       AL register value

    bdosptr() invokes the MS-DOS system call specified by 'dosfun' and is
    used for calls that require a pointer as an argument.  'arg'
    specifies the value of register DX in small data models, and of
    register DS:DX in large data models.

       Returns:     The value of AX after the system call, if successful.
                    On error, -1 is returned and 'errno' and '_doserrno'
                    are set.

         Notes:     In the large data models (compact, large and huge),
                    bdosptr() must be used instead of bdos() for system
                    calls in which the argument is a pointer.

   Portability:     MS-DOS only.

   -------------------------------- Example ---------------------------------

    The following statements use the DOS string display function
    (function 0x9) to print "Hello world.".

           #include <dos.h>

           char *world = "world.\n$";

           main()
           {
               bdosptr(0x9,"Hello $",0);
               bdosptr(0x9,world,0);
           }


See Also: bdos() harderr()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson