Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - intdosx http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   intdosx

   Usage
   #include <dos.h> /* register structures */
   int  intdosx(union  REGS  *regsin,union REGS  *regsout,  struct  SREGS
   *segregs);

   Description
   This function performs a DOS system call (int 0x21). Consult your  DOS
   manual for specific function and calling conventions.
   regsin  is  a  pointer to a structure containing  the  values  of  the
   registers AX, BX, CX, DX, SI and DI to be passed to the interrupt.
   regsout  is a pointer to a structure into which the return  values  of
   the registers will be written.

   The state of the carry flag can be determined from x.cflag in regsout.
   The  segregs structure contains the segment register values passed  to
   the  interrupt for the intdosx.It is also used to return their  values
   after  the  interrupt has been processed. The union  REGS  and  struct
   SREGS are defined in dos.h.

   Example
   #include <dos.h>
   union REGS inregs, outregs;
   struct SREGS segregs;
   main()
   {
   char far *string = "Print this string$";
        inregs.h.ah = 9;
        inregs.x.dx = FP_OFF(string);
        segregs.ds = FP_SEG(string);
        intdosx(&inregs,&outregs,&segregs);
   }

   Return Value
   The value that was in AX at the end of the interrupt.


See Also: int86 int86x bdos

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