80-Bus News


November–December 1982 · Volume 1 · Issue 4

Page 13 of 51

SETUP has been written as a subroutine so that it may be used by other programs such as the screen dump to be described later. There is one other section of code that probably warrants explanation, setting up the PIO which is described below.

Configuring the PIO.

In keeping with explaining setting up the printer before explaining setting the PIO, I have configured PORT B first and will explain it last. Confused?


This is set up in bit (control) mode with all the bits as outputs. In order, the bytes sent to PACONT to do a this are:£FF;0;7;3. £FF selects mode 3 (control mode) and the following 0 makes all the bits outputs. The 7 is the interrupt control word which is set to prevent any interrupts. The final 3 disables all interrupts on PORT A just to be sure.


This is identical to the configuring of PORT A exept for the second byte. This is £F8 (1111 1000) because we require bits 0,1 and 2 to be outputs and bits 3,4 and 5 to be inputs. We don’t care about 6 and 7 and so could have sent £38 etc.

The next installment.

The screen dump program will have to wait until next time, while I think of some suitable abbreviated names for it. I hope all this is of interest to someone and maybe even useful. In this extremely unlikely event I would be glad to supply a cassette of the ZEAP source ta those too busy (lazy) to type it all in. A cheque for £1-50 (ta cover costs) to Comfware at __ ______ Dr. Haslington Crewe Cheshire ___ ___ will secure this.

Page 13 of 51