home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
basic
/
tools
/
numadd
/
qb.bi
< prev
next >
Wrap
Text File
|
1994-03-29
|
3KB
|
86 lines
'********************************* QB.BI ********************************
' MODIFIED with JOHNS.BI
'JRD NOTE:
'I'm using so many programs that include this $INCLUDE file that I decided to
'make QB.BI my own
'1/23/94
'One User Defined TYPE for -both- CALL INTERRUPT and CALL INTERRUPTX
'
'The only difference is in the DECLARE, both use RegType as TYPE
'Be sure to change "RegTypeX" to "RegType" in the INTERRUPTX call.
'August 17, 1993
'
'QuickBASIC can use 10 of the 14 Registers (Built-in integer variables)
TYPE RegType
ax AS INTEGER 'Accumulator Register
bx AS INTEGER 'Base "
cx AS INTEGER 'Count "
dx AS INTEGER 'Data "
bp AS INTEGER 'Base Pointer "
si AS INTEGER 'Source Index "
di AS INTEGER 'Destination Index "
flags AS INTEGER 'Flags "
ds AS INTEGER 'Data Segment " (CALL InterruptX)
es AS INTEGER 'Extra Segment " (CALL InterruptX)
END TYPE
'User defined TYPE for FileExists SUB
TYPE DTA 'used by DOS services
Reserved AS STRING * 21 'reserved for use by DOS
Attribute AS STRING * 1 'the file's attribute
FileTime AS STRING * 2 'the file's time
FileDate AS STRING * 2 'the file's date
FileSize AS LONG 'the file's size
FileName AS STRING * 13 'the file's name
END TYPE
' Key code numbers
CONST BACKSPACE = 8
CONST DELETE = 21248
CONST DOWNARROW = 20480
CONST ENDKEY = 20224
CONST ENTER = 13
CONST ESCAPE = 27
CONST HOME = 18176
CONST INSERTKEY = 20992
CONST LEFTARROW = 19200
CONST RIGHTARROW = 19712
CONST TABKEY = 9
CONST UPARROW = 18432
CONST False = 0
CONST True = NOT False
' DECLARE statements for the 2 routines
' -------------------------------------
'
' Generate a software interrupt, loading all but the segment registers
'
DECLARE SUB INTERRUPT (IntNum AS INTEGER, InRegs AS RegType, OutRegs AS RegType)
'
' Generate a software interrupt, loading all registers
'
DECLARE SUB INTERRUPTX (IntNum AS INTEGER, InRegs AS RegType, OutRegs AS RegType)
'
'
' Call a routine at an absolute address.
' NOTE: If the routine called takes parameters, then they will have to
' be added to this declare statement before the parameter given.
'
DECLARE SUB ABSOLUTE (address AS INTEGER)
'
' Generate a software interrupt, loading all but the segment registers
' (old version)
'
DECLARE SUB INT86OLD (IntNum AS INTEGER, inarray() AS INTEGER, outarray() AS INTEGER)
'
' Generate a software interrupt, loading all the registers
' (old version)
'
DECLARE SUB INT86XOLD (IntNum AS INTEGER, inarray() AS INTEGER, outarray() AS INTEGER)
'