QL Networking

Author(s): Al Feng
Publication: Update Magazine
Pub Details: Update October 1989
Date: October 1989
Pages: 33-37

Claims abound for computer hardware and software. The original claims for SINCLAIR’s QL (aka ZX-83) promised the capability of a PEER/PEER NETWORK because the QL had been designed for use in a “business” environment. The two ‘NET’ ports bear witness to this intent. In a PEER/PEER NETWORK each QL would have the capability of sharing data and devices equally (therefore, as a “peers”).

Reality interferes with claims (design?) and a standard QL is a stand alone computer. It is generally conceded that there are limitations in the standard QL firmware (i.e., QDOS) which makes PEER/PEER NETWORKing difficult, if not impractical and/or impossible. This may yet be a matter of poor communication by those who have claimed to have NETWORKed several QLs together using ‘NETi(n)’ and ‘NETo(ut)’ in the way of bad or incomplete examples. Regardless, I have tried many attempts at establishing a NETWORK using two QLs using ‘NETi’ and ‘NETo’ to no avail.

Regardless, it is possible to NETWORK several Sinclair QLs via a dedicated FILE-SERVER/CLIENT NETWORK. This is made possible by the multi-TASKing capabilities of the QDOS operating system with the assistance of SuperTOOLKIT coding on each participating QL (both authored by Tony Tebby). Occassional explanations of how this has been performed has been published in various magazines and newsletters. Most have been oblique.

At a recent meeting of our local user group (Chicago Area Timex User Group / CATUG) a QL NETWORKing demonstration was performed for the benefit of those who hadn’t seen it before. Constraints of physical space precluded linking more than two QLs together; but, as many as 63 CLIENTs may be “serviced” by a single SERVER.

There are practical constraints to employing any NETWORK. If the FILE-SERVER is pre-occupied with another CLIENT then access will be delayed until the first CLIENT is serviced. The more CLIENTS attempting access, the slower the service. The specifications indicate that as many as eight FILE-SERVERs may be active on a QL NETWORK at any given time.

In a QL NETWORK, each computer active on the NETWORK is assigned a ‘NET(work) number’ (e.g., ‘net 1’). NETWORK ‘numbers’ are assigned arbitrarily, with the only proviso being that two QLs not have a duplicate ‘NET numbers.’

It is generally espoused, based on “other” LOCAL AREA NETWORKs (LAN) implementations, that the QL with the most hardware (e.g., a hard disk, floppy disk, printer, etc.) attached act as the FILE-SERVER. The “first” computer (Butch’s) was fully configured with a TRUMP card running dual 720K 5.25″ disk drives. The “second” computer (Steve’s) was a 128K QL to which a SuperTOOLKIT eprom was attached via the ‘ROM’ port.

To implement the NETWORK the following commands were typed into each computer (‘<ENTER>’ indicates that the ‘ENTER’ key was pressed after entering the preceding statement):

(BUTCH's QL)        (STEVE's QL)

NET 1  <ENTER>      NET 2        <ENTER>
FSERVE <ENTER>      NFS_USE flp, n1_flp1_, n1_flp2_ <ENTER>

The “FSERVE” statement which is entered indicates that this QL’s function within the NETWORK is to act as a FILE-SERVER.

The multiple statement INPUT into the CLIENT QL indicates that you want any calls made to using ‘flp1_’ and ‘flp2_’ be answered by the computer which was assigned ‘NET(work number) 1’ by the devices specified in the second and third part of the statement. In this instance, we wanted a call to ‘flp1_’ to be answered by ‘flp1_’ on the QL wich was assigned a ‘NET(work number) 1’; and similarly, any calls to ‘flp2_’ by the client would access ‘flp2_’ of the QL whose address was ‘NET 1’. If a disk drive interface had been attached to Steve’s QL, then it would have been made dormant by the “NFS_USE flp” statement.

The computers were connected with a shielded cable having 1/8″ microphone jacks (included with the QL) via the NET ports located next to the POWER socket. If we had wanted to connect more QLs, we would have indicated a ‘NET number’ (eg., NET 3) for the CLIENT followed by the NFS_USE statement. Alternatively, we could have accessed Butch’s RAM disks, or microdrives (limited to a choice of two of any combination).

After establishing his QL as the FILE-SERVER, Butch loaded in a copy of the Psion XCHANGE. A copy of QLSS from one of Butch’s disks was LOADed into Steve’s QL.

LOADing via the NETWORK was much slower than direct (dedicated) access to the disk drives. There are at least two reasons for this. First, communication is done at a rate of “only” 19,200 baud. And, secondly, the transmission is not continuous because the SERVER is periodically checking for “other” input. That is, the NETWORK is being multi-TASKed along with SuperBASIC and whatever else the user may have EXEC’d on the FILE-SERVER.

Multi-TASKing tends to slow effective program/TASK speed. In part, this is because each TASK is given a priority number between 0 (off) and 127 (maximum), with 32 being the “standard” priority given to either SuperBASIC or an EXEC_W’d program. It appears that background TASKs are suspended by the operating system.

While the “server priority” appears to be ‘8’, the SERVER must constanty monitor the NETWORK for any communication from CLIENTs and allow access to its I/O storage devices. In effect, we “disabled” Butch’s QL while we were accessing his drives; and, it seemed to be moderatlely “crippled” for normal use.

NETWORKing on the QL clearly has some drawbacks. But it should be noted that this “crippling” effect occurs in all LOCAL AREA NETWORKs. In the non-SINCLAIR world, a single computer is often dedicated to the TASK of being the FILE-SERVER (eg., a mainframe, a minicomputer, or 80286/i386DX/i486). This should be taken as the model for QL NETWORKing, also, whereby a single QL is dedicated to the task of acting as the FILE-SERVER, with other QLs acting as CLIENTs. This becomes a valid application when several computers wish to share a common source of data (i.e., from a hard-disk). Use of a NETWORK as illustrated appears to be impractical for “home” applications.

The following SuperBASIC program may facilitate implementing multiple CLIENT stations in a FILE-SERVER/CLIENT NETWORK:

10 WINDOW#0,448,52,40,204: PAPER#0,7:INK#0,0
20 WINDOW#1,512,256,0,0: WINDOW#2,448,226,40,30
30 CLS: PAPER 7: INK 0: INK#1,3: CSIZE 0,0
40 PRINT#0,'[ ';VER$;' ROM ] '; , FREE_MEM;' bytes'
50 CSIZE 2,1
60 INPUT,\,"NETWORK STATION NUMBER: ";a$: NET a$
70 NFS_USE flp, n1_flp1_, n1_flp2_
80 CLS: INK 37: PRINT,\, "NETWORK";: INK 0: PRINT " CLIENT STATION";: INK 2:PRINT" ( ";:INK 0: PRINT a$;:INK 2:PRINT " )"
90 FOR n=0 TO (a$-1):BEEP 250,10 :PAUSE 8:NEXT n
100 REMark ******* CLIENT (PLATYPUS Software 1988) *********

SAVE this program as either BOOT or CLIENT_BAS. If you have a hard-disk, then you may wish to change line 70 to read:

70 NFS_USE flp, n1_flp1_, n1_hdk1_          (?)

to access the hard-disk when a call to ‘flp2_’ is made by the CLIENT. Line 90 provides an audible confirmation of the station number. The program “terminates” with the active cursor in ‘window#0’. Either LOAD your regular boot when this appears, or add a line which reads:

95  LRUN/EXEC_W flp1_ProgramName

where “ProgramName” is the name of the program you wish to LOAD at the given CLIENT station (substitute ‘EXEC_W’ for ‘LRUN’ as necessary).

FUDGING TO GET A PEER/PEER NETWORK

Since up to eight QLs can theoretically perform the FILE-SERVER role within the NETWORK, it is possible to have PEER/PEER NETWORK of sorts by INPUTting both the NFS_USE and FSERVE statements on each QL. What you may end up with is ‘dueling devices’, and a potential interruption of primary keyboard INPUT while someone attempts to access one of your devices.

Screen enhancer code (I prefer SPEEDSCREEN) is recommended if you plan to use the FILE-SERVER as an active terminal.

“HOME” USE OF QL NETWORKing

Okay. You’ve got two or more QLs and you’ve got SuperTOOLKIT coding on at least one of them. But, you don’t have a hard disk (who does?). The $64 question is:

Is NETWORKing practical enough for me to consider getting a second SuperTOOLKIT?

If you don’t even have a SuperTOOLKIT, is a possible expenditure of more than $100 for the NETWORKing capability money well spent? Just how much money you should spend on an orphan computer depends on how much viability you feel the operating system has for you individually. Had Sinclair Research not folded-up its tent, the price of the 128K QL would probably be more expensive than the current $100 (at the time of this writing). I suspect that it would have been plausible that the ZX-84/85, or at least the ZX-86 would have had an extended operating system which would have incorporated some of the SuperTOOLKIT coding with the 128K QL persisting as do the 8088/V-20 IBM PC clones.

Most people who have SuperTOOLKIT coding (originally available as “code” which was LRESPRed into RAM as well as the standard EPROM, it is now provided on several disk drive interfaces) claim that they wouldn’t live without out it. What does SuperTOOLKIT coding provide besides the facility to expedite a FILE-SERVER/CLIENT NETWORK? It does make file manipulation and SuperBASIC editing more convenient; but, it is not a necessity.

If you already have the hardware [or, extra cash to spend!], then you can indeed set up a viable NETWORK for “home” use if one ignores the conventional wisdom for setting up a LAN. What you want to do is to utilize the FILE-SERVER only as a source of additional memory (as with “extended memory” for MS-DOS) which is utilized to provide extra RAM storage via RAM DISKs.

If the INPUT into the two QL’s inicated in the first part of this article had been reveresed then the QL with the TRUMP card would have been the CLIENT, and the role of the FILE-SERVER would have been taken by the 128K QL.

[ 128K QL ]         [ TRUMPed-up QL ]

NET 1  <ENTER>      NET 2        <ENTER>
FSERVE <ENTER>      NFS_USE mdv, n1_ram1_, n1_ram2_ <ENTER>

In this example, since the 128K QL did not have disk drives, calls were made to theoretical RAM DISKs. Calls to ‘mdv1_’ and ‘mdv2_’ are now answered by ‘ram1_’ and ‘ram2_’ of the QL with the ‘NET 1’ assignment.

Because a standard QL does not have RAM DISKing capabilities, extra code needs to be LRESPRed. While this can be purchased, code to provide “static” RAM DISKing is also available with the CHOice program code; and, “dynamic” RAM DISKing is available with the QRAM program code (a STATIC RAM DISK needs to be formatted whereas a DYNAMIC RAM DISK does not). A 128K QL can provide a STATIC RAM DISK of about 80K, or 160 sectors.

This doesn’t sound like a lot, and it isn’t. But, if you have any additional memory expansion beyond what you are currently using on your primary QL than that which QDOS is capable of directly addressing then it can be implemented by the FILE-SERVER for the STATIC/DYNAMIC RAM DISK.

A multiple QL configuration utilizing twin 512K Expanderams is currently being run as I input this text to ensure viability of the concept described. Essentially, a second QL with a 512K Expanderam was powered up in addition to my normal QL which has an 512K Expanderam and Cumana disk interface. The second QL was designated as the FILE-SERVER. My regular QL was designated as the CLIENT. The initial statements were as follows:

[ 512K QL ]         [ 512K QL with CUMANA I/F, etc. ]

NET 1  <ENTER>      NET 2        <ENTER>
FSERVE <ENTER>      NFS_USE mdv, n1_ram1_, n1_ram2_ <ENTER>

DYNAMIC RAM DISK code used on the FILE-SERVER in this instance.

If I had a third QL with a SuperTOOLKIT, it too could have been designated as a FILE-SERVER with its memory being utilized as a RAM DISK:

                    NET 2        <ENTER>
                    NFS_USE mdv, n1_ram1_, n3_ram1_ <ENTER>

If the third QL also had a 512K memory expansion, then it this hardware configuration would provide two RAM disks of about 547K each (1094k total) in addition to whatever memory was available to the primary QL! However, before you run to the phone to order additional hardware one should note that this may only be viable if one already has the extra QL, extra memory, et cetera. I suspect that configuration is NOT price competitive with the MEGA-board. Again, remember that you are limited to using the “extra” memory as RAM disks.

There is an advantage to utilizing “external” RAM disks. If the program you are working locks up the keyboard (it happens), you will not loose the contents of the data which had been stored in RAM when you RESET the computer. Of course, programs and data stored in the RAM of the primary computer will be lost; and, power spikes or outages will result in a loss of the contents in any RAM disk.

Two things are clear from this type of memory expansion.

The first is that one has to get used to making ‘calls’ to ‘mdv1_’ or ‘mdv2_’ for the extended memory. This isn’t too difficult; but, if you opt for this type of system configuration as a permanent set up, then you may want to modify a majority of your programs to look to ‘mdv1_’/’mdv2_’ for data storage. [The DYNAMIC RAM DISKs on the primary QL are still referred to as ‘ram1_’/’ram2_’]

The second mistake I notice myself making is that if I “walk away” for a moment and come back, I often begin typing on the “wrong” keyboard. This is more a matter of logistics, and can be resolved by a number of options, including placing the FILE-SERVER behind the CLIENT, or simply ‘out of reach’.

It appears that a CLIENT cannot assign one of its own storage devices to the NFS_USE statement as in the following example:

[ any QL ]          [ any other QL ]

NET 1  <ENTER>      NET 2        <ENTER>
FSERVE <ENTER>      NFS_USE mdv, n1_ram1_, n2_mdv2_ <ENTER>

It also appears that “NFS_USE ram” is does not appear to be a valid configuration. A request for another QL’s RAM would seem to require either an “NFS_USE mdv” or an “NFS_USE flp” statement, with similar devices then become inoperative on the CLIENT.

The NFS_USE statement appears to have some limitations which are not flagged by the system. In fact, I have found that there is more flexibility than had been immediately evident. First of all, the NFS_USE statement made be made to request just about ANY designation. You can theoretically use the statement:

NFS_USE bozo, n1_ram1_, n1_ram2_

The difficulty with a four letter device name is that you may CRASH some programs which are only looking for a three character string. So, the above “name” should be truncated to “boz” or “bzo” or any other three character device name. Of course, you can use a more reasonable name such as “fdk”, “rdk” (?). “Net” might be a good choice, but existing keywords are invalid. Remember the assigned designation so you may readily access it.

The NFS_USE statement may be changed (several times) to access other devices from other FILE-SERVERs as needed.

I don’t have a current application for utilizing this much memory since I “learned” not to multi-TASK more than two programs at any given time; and, it may take me a while to get in the habit LOADing more than I need. Of course, some people who multi-TASK their programs prefer to LOAD all of them in at once; and, some programs are memory hungry (e.g., EXCHANGE).

HAPPY TRAILS, AND COMPUTING, TO YOU. . .

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.