Technical information
Serial Solutions BASterm
file is specified on the command line then the file
’TERMDEF.TXT’ is tried. GW-BASIC does not have a
command line access mechanism, so the variable which contains
the command line in QuickBASIC, Command$, will be empty in
GW-BASIC unless the user explicitly sets it before running the
program.
The program then enters an infinite loop (lines 5000 to
5120) which alternately calls two subroutines, at lines 9010 and
9500. The subroutine at line 9010 is shown in Figure 10-2,
above. The subroutine at line 9500 checks for characters at the
keyboard and if any are read translates them and sends them to
the keyboard via the subroutine at line 10000, shown in Figure
10-3.
The ’hot’ keys F1, F2, F10 and ALT-C initiate routines as
follows:
F1 Line 17000. Displays help information. Line 17000 is
also called by the command decode routine for help
information.
F2 Line 12000. Setup menus. These present the user
with a series of menus to set parameters such as the
Baud rate. These menu routines call on the various
command execution routines.
F10 Line 15000. Quit program. Also called by command
decode routine.
ALT-C Line 14010. Commands. The program prompts the
user for a command, and passes this on to the
command decode routine at 11000.
It can be seen that serial communications from BASIC are
comparatively simple, though the complexities of BASterm and
the difficulties of accessing the BIOS from BASICA/GW-BASIC
may obscure this.
Page 162 Chapter 10