interrupt routine itself. This address is placed at the start of the
table, low order byte first, as usual.
The interrupt routine itself calls its own copy of the SRLIN
routine and loops until the routine returns with the Carry set. It then
outputs the character to the PIO, enables the CPU interrupts and
immediately returns. This last bit of code reads:
OUT (5), A
Cassette input program for Nascom 2
The other half of the software lives in the Nascom 2. The
program initializes the PIO just like the other program, except that
the PIO mode is 4FH, for input mode. After setting up the PIO, the CPU
interrupts are not enabled. Instead a dummy READ to the PIO is made to
ensure that handshaking starts. Then a version of the READ routine,
copied out of NAS-SYS, is executed. If the routine ends, control
returns to NAS-SYS. Instead of the need for changing tables and RST RIN
to get an input, normal calls are made to a new routine called CIN.
This routine reads as follows:
CIN OR A
SLP JR NC SLP
This loops until an interrupt occurs, and the interrupt routine sets
the Carry flag, and puts the input character into A. The interrupt
routine reads simply:
PROC IN A, (5)
Note that it does not re-enable CPU interrupts.
As you can see, the use of the PIO requires a bit of thought,
but if you read the notes above, and have a look at the PIO manual, you
should be able to write these routines for yourself, exactly as you
wish, which is much more interesting than typing in some HEX listings
from the library.
Please write in and let others know if you have any other uses
for two (or more) machine systems. How about a controlling machine
loading other slave machines with data, programs, perhaps even
interpreters as well, then doing other work while the slave machine
performs the subordinate tasks. This would be one way to tackle a
multi-user operating system with resources such as printer or disc
attached to only some machines.
PS You could use two Nascom 2 computers, if you don’t already have a
PPS Don’t blame me if you get your wires mixed up and blow up both