home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / keyboard / keybuf / johns.bi < prev    next >
Encoding:
Text File  |  1994-03-09  |  2.9 KB  |  85 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.  
  54.  
  55.  
  56. '                 DECLARE statements for the 2 routines
  57. '                 -------------------------------------
  58. '
  59. ' Generate a software interrupt, loading all but the segment registers
  60. '
  61. DECLARE SUB INTERRUPT (IntNum AS INTEGER, InRegs AS RegType, OutRegs AS RegType)
  62. '
  63. ' Generate a software interrupt, loading all registers
  64. '
  65. DECLARE SUB INTERRUPTX (IntNum AS INTEGER, InRegs AS RegType, OutRegs AS RegType)
  66. '
  67. '
  68. ' Call a routine at an absolute address.
  69. ' NOTE: If the routine called takes parameters, then they will have to
  70. '       be added to this declare statement before the parameter given.
  71. '
  72. DECLARE SUB ABSOLUTE (address AS INTEGER)
  73. '
  74. ' Generate a software interrupt, loading all but the segment registers
  75. '       (old version)
  76. '
  77. DECLARE SUB INT86OLD (IntNum AS INTEGER, inarray() AS INTEGER, outarray() AS INTEGER)
  78. '
  79. ' Generate a software interrupt, loading all the registers
  80. '       (old version)
  81. '
  82. DECLARE SUB INT86XOLD (IntNum AS INTEGER, inarray() AS INTEGER, outarray() AS INTEGER)
  83. '
  84.  
  85.