Technical information
BASterm Serial Solutions
The switch ’/L’ is important because the program requires a
subroutine, Interrupt, found in the library qb.qlb, loaded by the
/L option.
From within the environment <definition_file> can be
specified via Command$, which is set in the ’Run’ menu (the
user may first need to set ’full menus’ in the ’Options’ menu).
From within GW-BASIC or BASICA the user can load
BASterm with the command
LOAD "BASTERM"
The program as distributed will run directly under QuickBASIC,
but will fail under GW-BASIC/BASICA because of line 28470,
the interface to the BIOS used by the latter BASICs. This line is
commented out to allow QuickBASIC to compile the program,
and must be reinstated before GW-BASIC/BASICA can run the
program. The line should read:
28470 CALL ADDR(INREGS.AX, INREGS.BX, INREGS.CX, INREGS.DX): RETURN
Apart from this problem with mutually exclusive syntaxes the
program will run correctly under either BASIC, detecting which
BASIC it is running under and adjusting accordingly. The
interface to the BIOS, which allows the program to change
parameters associated with the serial port, such as Baud rate, is
the only part of the program where the two BASICs diverge.
The remainder of the program shys away from using the many
extra features of QuickBASIC to maintain compatibility with
GW-BASIC. The chapter "Using NewBIOS", discusses in detail
the BIOS interface used with both QuickBASIC and
GW-BASIC.
GW-BASIC does not recognise command line parameters
for programs, so specify <definition_file> by setting
COMMAND$ to the name of the file, eg.
COMMAND$ = "mydef.txt"
Run BASterm with the command:
RUN
Once the BASterm is running any characters typed at the
keyboard are sent to the serial port, and any characters received
from the serial port are displayed on the screen. At any time the
Chapter 10 Page 153