intdosx man page on Xenix

Man page or keyword search:  
man Server   1130 pages
apropos Keyword Search (all sections)
Output format
Xenix logo
[printable version]



     INTDOSX(DOS)	      XENIX System V		  INTDOSX(DOS)

     Name
	  intdosx - Invokes a DOS system call.

     Syntax
	  #include <dos.h>

	  int intdosx (inregs, outregs, segregs);
	  union REGS *inregs;
	  union REGS *outregs;
	  struct SREGS *segregs;

     Description
	  The intdosx function invokes the DOS system call specified
	  by register values defined in inregs and returns the effect
	  of the system call in outregs.  Unlike the intdos function,
	  intdosx accepts segment register values in segregs, letting
	  programs that use long model data segments or far pointers
	  specify which segment or pointer should be used during the
	  system call.	The inregs and outregs arguments are unions of
	  type REGS.  The segregs argument is a structure of type
	  SREGS.  These types are defined in the include file dos.h.

	  To invoke a system call, intdosx executes an INT 21H
	  instruction.	Before executing the instruction, the function
	  copies the contents of inregs and segregs to the
	  corresponding registers.  Only the DS and ES register values
	  in segregs are used.	After the INT instruction returns,
	  intdosx copies the current register values to outregs and
	  restores DS.	It also copies the status of the system carry
	  flag to the cflag field in outregs.  If this field is
	  nonzero, the flag was set by the system call and indicates
	  an error condition.

	  intdosx is intended to be used to invoke DOS system calls
	  that take an argument in the ES register, or that take a DS
	  register value that is different from the default data
	  segment.

     Return Value
	  intdosx returns the value of the AX register after the
	  system call has completed.  If the flag field in outregs is
	  nonzero, an error has occurred and doserrno is also set to
	  the corresponding error code.

     See Also
	  bdos(DOS), intdos(DOS), segread(DOS), FP_SEG(DOS)

     Page 1					      (printed 8/7/87)

     INTDOSX(DOS)	      XENIX System V		  INTDOSX(DOS)

     Example
	  #include <dos.h>

	  union REGS inregs, outregs; struct SREGS segregs; char far
	  *dir = "/test/bin";

	  /* The following statements change the current working **
	  directory with dos function call 3b hex.  */

	  inregs.h.ah = 0x3b;		      /* change directory */
	  inregs.x.dx = FPOFF(dir);	     /* file name offset */
	  segregs.ds = FPSEG(dir);	     /* file name segment */
	  intdosx (&inregs,&outregs,&segregs); The above example must
	  be compiled using the -Me flag.

     Notes
	  Segment values for the segregs argument can be obtained by
	  using either the segread function or the FP_SEG macro.

	  This call must be compiled with the -dos flag.

     Page 2					      (printed 8/7/87)

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net