Technical information

Serial Solutions Forterm
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). FORterm
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 Forterm Serial Connection.____________________________
This section will look at the parts of Forterm that access
the serial port and so explain how any Fortran program could
use the serial port with NewCOM. The use of the serial port is
quite straightforward, as NewCOM does most of the hard work.
Quick Summary._______________
The statements used by FORterm to access the serial port
are as follows.
C Open serial port as unit 1, binary file, io is error check
open (1, file=’COM1’, form=’binary’, iostat=io)
.
C Read a character from the serial port
read (i, iostat=io) c
.
C Prepare file for output
rewind( 1 )
.
C Output characters to serial port. Line 1000 is an error trap
write (1, err=1000) data(1:count)
The external subroutine intrpt, supplied as part of Serial
Solutions, is used to access the machine BIOS service of
NewCOM. These allow FORterm to set serial port parameters
such as Baud rate and parity.
Opening The File.________________
The subroutine ’open_com’, Figure 11-1, opens the unit
associated with the serial port.
Page 164 Chapter 11