Technical information
Serial Solutions Pasterm
bits and the parity.
F10 Quit. This immediately exits the program.
ALT-C (That is ’C’ and the ’ALT’ key pressed together).
Pasterm 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 Pasterm Serial Connection.____________________________
This section will look at the parts of Pasterm that access
the serial port and so explain how any Pascal program could use
the serial port with NewCOM. The use of the serial port is quite
straight forward, as NewCOM does most of the hard work.
Quick Summary._______________
Pasterm uses the following commands to perform serial
input/output.
VAR
com: File Of Char; { Create file variable }
.
Assign( com, ’COM1’); { }
Reset( com ); { Open file input }
Rewrite( com ); { Open file output }
.
Read( com, c ); { Read from Serial port }
Write( com, c); { Write to serial port }
IF IoResult <> 0 THEN.... { Check for errors }
.
Close( com ); { Close serial port }
Pasterm uses the procedure Intr from the function
BIOS_X_Init to access the BIOS services provided by NewCOM
to set the Baud rate, parity etc. of the serial ports.
Pasterm also uses the procedure MsDos to access DOS
function $44 codes 0 and 1 to get and set respectively the device
information for a port. This allows the procedure Uncook to
change the file associated with the serial port from cooked to
raw data mode. This allows faster transfers of data and prevents
DOS interfering with control characters.
Page 142 Chapter 9