home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / tools / numadd / qb.bi < prev    next >
Text File  |  1994-03-29  |  3KB  |  86 lines

  1. '*********************************  QB.BI  ********************************
  2. '                             MODIFIED with JOHNS.BI
  3. 'JRD NOTE:
  4. 'I'm using so many programs that include this $INCLUDE file that I decided to
  5. 'make QB.BI my own
  6. '1/23/94
  7.  
  8. 'One User Defined TYPE for -both- CALL INTERRUPT and CALL INTERRUPTX
  9. '
  10. 'The only difference is in the DECLARE, both use RegType as TYPE
  11. 'Be sure to change "RegTypeX" to "RegType" in the INTERRUPTX call.
  12. 'August 17, 1993
  13. '
  14. 'QuickBASIC can use 10 of the 14 Registers (Built-in integer variables)
  15.  
  16. TYPE RegType
  17.      ax        AS INTEGER               'Accumulator       Register
  18.      bx        AS INTEGER               'Base                 "
  19.      cx        AS INTEGER               'Count                "
  20.      dx        AS INTEGER               'Data                 "
  21.      bp        AS INTEGER               'Base Pointer         "
  22.      si        AS INTEGER               'Source Index         "
  23.      di        AS INTEGER               'Destination Index    "
  24.      flags     AS INTEGER               'Flags                "
  25.      ds        AS INTEGER               'Data Segment         " (CALL InterruptX)
  26.      es        AS INTEGER               'Extra Segment        " (CALL InterruptX)
  27. END TYPE
  28.  
  29. 'User defined TYPE for FileExists SUB
  30. TYPE DTA                           'used by DOS services
  31.         Reserved  AS STRING * 21       'reserved for use by DOS
  32.         Attribute AS STRING * 1        'the file's attribute
  33.         FileTime  AS STRING * 2        'the file's time
  34.         FileDate  AS STRING * 2        'the file's date
  35.         FileSize  AS LONG              'the file's size
  36.         FileName  AS STRING * 13       'the file's name
  37. END TYPE
  38.  
  39.   ' Key code numbers
  40.     CONST BACKSPACE = 8
  41.     CONST DELETE = 21248
  42.     CONST DOWNARROW = 20480
  43.     CONST ENDKEY = 20224
  44.     CONST ENTER = 13
  45.     CONST ESCAPE = 27
  46.     CONST HOME = 18176
  47.     CONST INSERTKEY = 20992
  48.     CONST LEFTARROW = 19200
  49.     CONST RIGHTARROW = 19712
  50.     CONST TABKEY = 9
  51.     CONST UPARROW = 18432
  52.  
  53.     CONST False = 0
  54.     CONST True = NOT False
  55.  
  56.  
  57. '                 DECLARE statements for the 2 routines
  58. '                 -------------------------------------
  59. '
  60. ' Generate a software interrupt, loading all but the segment registers
  61. '
  62. DECLARE SUB INTERRUPT (IntNum AS INTEGER, InRegs AS RegType, OutRegs AS RegType)
  63. '
  64. ' Generate a software interrupt, loading all registers
  65. '
  66. DECLARE SUB INTERRUPTX (IntNum AS INTEGER, InRegs AS RegType, OutRegs AS RegType)
  67. '
  68. '
  69. ' Call a routine at an absolute address.
  70. ' NOTE: If the routine called takes parameters, then they will have to
  71. '       be added to this declare statement before the parameter given.
  72. '
  73. DECLARE SUB ABSOLUTE (address AS INTEGER)
  74. '
  75. ' Generate a software interrupt, loading all but the segment registers
  76. '       (old version)
  77. '
  78. DECLARE SUB INT86OLD (IntNum AS INTEGER, inarray() AS INTEGER, outarray() AS INTEGER)
  79. '
  80. ' Generate a software interrupt, loading all the registers
  81. '       (old version)
  82. '
  83. DECLARE SUB INT86XOLD (IntNum AS INTEGER, inarray() AS INTEGER, outarray() AS INTEGER)
  84. '
  85.  
  86.