Specifications

also needed to interact with other devices, such as Hewlett Packard plotters.
The HP 7470A, for example, can be queried for information about the location of
the pen, etc., but the response is now very hard to trap from APL. Something
along these lines is needed on SuperPET, and it's up to some dedicated 6809 pro
grammer to provide it! Help!
In the example above, I have allowed the user to control when the next message
is sent to the host. Listen to the modem and watch the status lights; it usually
is clear when the next transmission should begin. This assumes, however, that
everything is working smoothly. If the system or network is down, the messages
you receive will be quite different from the ones you expect. Since you cannot
tell what the message says, only that there is one, this can lead to problems.
Hence, after you think you have successfully dialed up the host, use the pass
through mode to check on a successful log-on before you proceed with your task.
One such task might be to upload an APL function to the host. It is actually
easier to edit a function locally than on a mainframe, and it costs a lot less.
The example below provides a way to upload APL functions from the micro to the
host by first opening the function editor on the host and then sending succes
sive lines of the function. This represents the crudest form of uploading. If I
could, I would listen after each line is sent Cmtil the host sends a prompt for
the next line. Barring that capability, I simply delay two seconds between each
transmission. This is usually time enough for the host's editor to respond.
VSEND £W[[]]V
c
0]
SEND FN iFNiMATiNiI
I THIS REPRESENTS A VERY SLOW
c 1]
^UPLOADS APL FN TO HOST APL
FN EDITOR
| WAY TO UPLOAD APL FNS
c
2]
*ENTER: '.REVERSE 'FUNCTION
NAME'
I TO THE HOST. AFTER SENDING
c
3]
FN+Q
1 EACH F N , YOU NEED TO USE
c
4] -K3*DM7 FN)/ERR
j PASSTHRU AND CHECK ON THE
c
5]
N-UpMAT+QPR FN
I FN IN THE HOSTS' W S . THIS
[
6]
1-0 I IS OBVIOUSLY QUITE TEDIOUS
c
7] SEND 'V'.Ftf I AND SHOULD ONLY BE USED
c
8] 51:0 OpDDL 1
| OCCASIONALLY.
c
9]
SEND MATlI— I+1;]
c
10]
+(N>I)/S1
c U ]
W L 1
[
12]
SEND 'V'
VSENDLUlV
c
13]
*SENT»
C
0] SEND MSG
[
14]
-K)
[
1]
(UKR MSG) PUT 10
[
15] ERR:'FUNCTION: ' ,FN,' NOT FOUND'
There is no guarantee that all characters sent out the serial port will arrive
safely at the host. Is there a better way? The answer is yes. Waterloo has pro
vided powerful communication facilities (H0STCM) in each of the languages. This
includes error checking and automatic retransmission. To use these facilities,
however, the proper software must be running on the host computer. Fortunately
for APL users, John Wilson has mimicked much of this software in APL. Thus, if
you can communicate with a mainframe running APL, you can utilize some of SPET's
built-in HOSTCM facilities. This will be the subject of a later article. In the
meantime, if you do not have a HOSTCM Specifications Document, order one from
Waterloo. The one I have is written by T. Wilkinson and is dated February 1982.
The last example, listed below, provides a way to read files you have downloaded
to disk using a terminal program. Since nonprintable characters may have been
SuperPET Gazette, Vol.I No.11
-164-
December 1983/January 1984