bas7advr.hlp (Topic list)
Interrupt, InterruptX Routines Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
The Interrupt and InterruptX routines allow BASIC programs to perform DOS
system calls. This routine is included in the QBX.QLB and QBX.LIB
libraries.
 
CALL Interrupt (interruptnum%, inregs, outregs)
CALL InterruptX (interruptnum%, inregs, outregs)
 
Usage Notes
    ■ The Interrupt and InterruptX routines replace the INT86 and INT86X
      routines used in earlier versions of BASIC. They provide a more
      convenient way for BASIC programs to use DOS interrupts and services.
    ■ To use Interrupt or InterruptX in the QBX environment, use the
      QBX.QLB Quick library. To use Interrupt or InterruptX outside the
      QBX environment, link your program with the QBX.LIB file.
    ■ The QBX.BI header file contains the necessary declarations for
      Interrupt and InterruptX.
    ■ The register values before and after the interrupt are passed in
      variables declared as type RegType or RegTypeX. Each element of the
      type corresponds to a CPU element. The following statement defines
      RegTypeX:
 
        TYPE RegTypeX
           AX AS INTEGER
           BX AS INTEGER
           CX AS INTEGER
           DX AS INTEGER
           BP AS INTEGER
           SI AS INTEGER
           DI AS INTEGER
           FLAGS AS INTEGER
           DS AS INTEGER
           ES AS INTEGER
        END TYPE
 
    ■ The following statement defines RegType (the DS and ES registers are
      not included):
 
        TYPE RegType
           AX AS INTEGER
           BX AS INTEGER
           CX AS INTEGER
           DX AS INTEGER
           BP AS INTEGER
           SI AS INTEGER
           DI AS INTEGER
           FLAGS AS INTEGER
        END TYPE
 
    ■ InterruptX uses the values in the DS and ES registers. To use the
      current values of these registers, set the record elements to -1.
 
Programming With OS/2 Protected Mode
    ■ The Interrupt and InterruptX routines are not available for OS/2
      protected mode. For OS/2 protected mode, replace these routines with
      the equivalent OS/2 function invocations. For more information, see
      "OS/2 Programming" in the Programmer's Guide.