Microsoft KB Archive/97467

{|
 * width="100%"|

DOC: _int86 and _int86x Examples Missing from Help File

 * }

Q97467

-

The information in this article applies to:


 * The C Run-Time (CRT), included with:
 * Microsoft Visual C++, versions 1.0, 1.5, 1.51

-

SUMMARY
The Microsoft Visual C++ version 1.0 help file, MSCXX.HLP, does not contain the sample programs to demonstrate the _int86 and _int86x functions.

MORE INFORMATION
When you view the _int86 or _int86x topics in Microsoft Windows Help and choose the &quot;Example&quot; jump, Help displays the sample code for the _getcwd function. The text below lists the missing sample programs.

Sample Code for _int86x
  // INT86X.C: In this program, _int86x executes an Interrupt 21h to   // invoke MS-DOS system call 43h (change file attributes). The program // uses _int86x because the file, which is referenced with a far // pointer, may be in a segment other than the default data segment. // For this reason the program must explicitly set the DS register // with the _SREGS structure. #include   #include    #include    #include    char __far *filename = &quot;_int86x.c&quot;; void main( void ) {     union  _REGS inregs, outregs; struct _SREGS segregs; int   result; inregs.h.ah = 0x43;     // MS-DOS function to change attributes inregs.h.al = 0;        // Subfunction 0 to get attributes inregs.x.dx = _FP_OFF( filename ); // DS:DX points to filename segregs.ds = _FP_SEG( filename ); result = _int86x( 0x21, &inregs, &outregs, &segregs ); if( outregs.x.cflag ) printf( &quot;Can't get file attributes; error no. %d\n&quot;, result); else printf( &quot;Attribs = 0x%.4x\n&quot;, outregs.x.cx ); }

Sample Code for _int86
  // INT86.C: This program uses _int86 to call the BIOS video service // (Interrupt 10h) to get information about the cursor. #include   #include    void main( void ) {     union _REGS inregs, outregs; // Set up to get cursor information. inregs.h.ah = 3;      // Get cursor position function inregs.h.bh = 0;      // Page 0 // Execute video interrupt. _int86( 0x10, &inregs, &outregs ); // Display results. printf( &quot;Cursor position\n\tRow: %d\n\tColumn: %d\n&quot;,             outregs.h.dh, outregs.h.dl ); printf( &quot;Cursor shape\n\tStart: %d\n\tEnd: %d\n&quot;,             outregs.h.ch, outregs.h.cl ); } Additional query words: 1.00 1.50

Keywords : kb16bitonly

Issue type :

Technology : kbVCsearch kbAudDeveloper kbCRT