Technical information
Serial Solutions BASterm
user can hit a function key, which have the following effects:
F1 Display a help screen
F2 Setup. This is a group of menus which interactively set up
the serial port. At each menu the user must hit one of the
digit keys to make a selection. The menus include setting
the port, the Baud rate, the number of data bits, the
number of stop bits and the parity.
F10 Quit. This immediately exits the program.
ALT-C
(That is ’C’ and the ’ALT’ key pressed together). BASterm
prompts the user for a command. The user can enter a
command together with any parameters that it requires.
These are the same commands found in the definition files,
and control the way that the terminal functions.
The BASterm Serial Connection._____________________________
This section will look at the parts of BASterm that access
the serial port and explains how any BASIC program may use
the serial port with NewCOM. The use of the serial port is quite
straight forward, as NewCOM does most of the hard work. All
PC BASICs include a special "OpenCOM" routine that bypasses
normal file handling but is limited to only 2 ports. BASterm
ignores this feature and instead uses NewCOM, so that multiple
ports and different handshake schemes can be implemented.
Quick Summary._______________
The commands that BASIC uses to access the serial port
are as follows. The BASICA and QuickBASIC versions use
exactly the same file handling commands.
OPEN "R", #1, "COM1", 1 ’Open port, for random i/o
FIELD #1, 1 AS P$ ’Set up P$ as i/o variable
.
GET #1 ’Read a character into P$
PUT #1 ’Send P$ to serial port.
IF EOF(1) THEN..... ’Check for end of file
.
ON ERROR GOTO 10200 ’Trap errors
.
Page 154 Chapter 10