home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / os2 / gg243731.arj / INT19.BAS < prev    next >
Encoding:
BASIC Source File  |  1992-04-17  |  2.1 KB  |  65 lines

  1. '*********************************************************
  2. '*  Program name: INT19.BAS                              *
  3. '*  Created     : 05/05/90                               *
  4. '*  Revised     :                                        *
  5. '*  Author      : Bernd Westphal                         *
  6. '*  Purpose     : Execute INT 19h in an OS/2             *
  7. '*                VDM environment. Only the current      *
  8. '*                should be terminated.                  *
  9. '*  Compiler    : IBM BASIC Compiler/2 V1.00             *
  10. '*  Compile     : BASCOM INT19 /O;                       *
  11. '*  Link        : LINK INT19;                            *
  12. '*  Input param : none                                   *
  13. '*********************************************************
  14.  
  15. ' Variable definition for Interrupt call
  16. TYPE RegType
  17.    ax    AS INTEGER
  18.    bx    AS INTEGER
  19.    cx    AS INTEGER
  20.    dx    AS INTEGER
  21.    bp    AS INTEGER
  22.    si    AS INTEGER
  23.    di    AS INTEGER
  24.    flags AS INTEGER
  25. END TYPE
  26.  
  27. DECLARE SUB Interrupt (intnum AS INTEGER, inreg AS RegType, outreg AS RegType)
  28.  
  29. DIM InRegs AS RegType
  30. DIM OutRegs AS RegType
  31.  
  32.         ' *** Program code ***
  33.         CLS
  34.         COLOR 15
  35.         PRINT "OS/2 Virtual DOS Machine + INT 19h"
  36.         PRINT STRING$(80, 196);
  37.         PRINT
  38.         PRINT "Execution of INT 19h under DOS on a 8086 processor"
  39.         PRINT "will reboot the system."
  40.         PRINT
  41.         PRINT "To prevent a system reboot running under OS/2 Version 2.0,"
  42.         PRINT "the Virtual DOS Machine Manager terminates the current"
  43.         PRINT "VDM if an INT 19h occurs."
  44.         PRINT
  45.         PRINT "Press Enter to execute the INT 19h interrupt"
  46.         PRINT "or press Esc to terminate."
  47.         PRINT
  48.         PRINT "Your choice: ";
  49. GetChr: kb$ = INPUT$(1)
  50.         SELECT CASE kb$
  51.            CASE CHR$(27)
  52.                 CLS
  53.                 END
  54.  
  55.            CASE CHR$(13)
  56.                 PRINT "OK, restarting ..."
  57.            '    CALL Interrupt(&H19, InRegs, OutRegs)
  58.                 CALL Int86(&H19, InRegs, OutRegs)
  59.  
  60.            CASE ELSE
  61.                 GOTO GetChr
  62.         END SELECT
  63.  
  64.  
  65.