[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ExoRMInterrupt()
 Sets the registers, then signals a real mode interrupt
------------------------------------------------------------------------------
 C Prototype

     int ExoRMInterrupt(int intno, EXOREGS *inregs,
                             EXOREGS   *outregs)

 Returns

     This function returns the flag's register.

 Description

     Use ExoRMInterrupt() to signal a real mode interrupt that requires you
     to set registers. This function allows you to set real mode segment
     register values from protected mode. When you use regular passdown
     interrupts, you cannot set real mode register values.

     A call to ExoRMInterrupt() sets the registers to the values you provide
     in the structure to which inregs points; then it invokes interrupt
     intno.  After the interrupt is processed, ExoRMInterrupt() stores the
     register values in the structure pointed to by outregs.  The structures
     pointed to by inregs and outregs are both type EXOREGS.  Note that you
     cannot set the SS and SP registers from an EXOREGS structure.

     Before CA-Clipper/Exospace signals the specified interrupt, it sets the
     CPU flags to the value they had when you called ExoRMInterrupt() in
     protected mode.  Notice that the value of the flags register after the
     real mode interrupt call is made is returned by this function.

     When you use ExoRMInterrupt(), there must be a return from the real mode
     interrupt to match every call (unless your program is terminating).
     Also, if re-entrance on ExoRMInterrupt() is possible, the interrupt
     should use less than 256 bytes of stack.  You can get around this limit
     by switching to a different stack in the real mode handler/function.

 Examples

     This example signals DOS function 2Ch to get the time of day.  As
     required for that call, the high order byte of the AX register is set to
     2Ch.  Note that the structure EXOREGS does not contain a field AH, so
     you must set the high order byte using the shift operator (<<).  After
     the call to ExoRMInterrupt(), this example displays the contents of the
     outreg registers.  The display shows the time in hours, minutes and
     seconds. Since the hours and seconds are stored in the high order byte,
     the shift operator is used again.

     int main()
     {
        EXOREGS inreg;
        EXOREGS outreg;

         inreg.ax = 0x2C << 8;

         /* DOS function "get time" - signal int 21h */
         ExoRMInterrupt(0x21, &inreg, &outreg);

         printf("The time is %d:%02d:%02d\n",
           outreg.cx >> 8, outreg.cx&0xFF, outreg.dx >> 8);
     }

 Files   Library is EXOSPACE.LIB, header file is Exospace.api.


This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson