Technical information
Serial Solutions Using NewBIOS
END.
QuickBASIC V4.5 & Visual Basic Dos.__________________________________
QuickBASIC, and its highly compatible successor Visual
Basic for Dos, are powerful structured languages which has
managed to retain the easy program development of an
interpreted BASIC. It can easily access the machine’s BIOS.
QuickBASIC provides the ’Call Interrupt’ subroutine to
access the machine interrupt routines. This is declared as:
DECLARE SUB INTERRUPT (intnum AS INTEGER, inreg AS RegType,
outreg AS RegType)
where ’RegType’ is
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
The subroutine is in the library ’QB.LIB’, and the quick library
’QB.QLB’. Make sure that the latter is loaded into the
QuickBASIC environment by adding the switch ’/L’ to the
command line which invokes the environment, as
qb basterm /L
The two definitions above can be found in the include file
’QB.BI’, which is used in the examples which follow.
Interrupt places the values in ’inreg’ in the registers of the
8086 and performs an INT Intnum. On return the values in the
8086 registers are copied back into ’outreg’. This means that the
assembly language examples above are very easy to translate
into QuickBASIC.
The reader may wish to refer to the section earlier in this
chapter ’accessing asynchronous services’.
Page 56 Chapter 4