80-Bus News |
September–October 1984 · Volume 3 · Issue 5 |
Page 11 of 47 |
---|
about 40 instructions after it sets the Busy line back to 1 before it disables interrupts. This gives the host machine more than enough time to send the data and make the strobe go low and then high again. If an interrupt occurs the Busy line is at once set back to 1 to ensure that a second character is not sent. This system should work correctly, although it would in theory be possible for someone to write a Centronics output routine which is so slow to send the strobe after examining the Busy line that the data is held until the interrupts are next enabled. This could in theory cause loss of characters. All known versions of the BIOS for Gemini systems, as well as RP/M itself, work perfectly as host machines.
The GIPB accepts input both when it is inactive, and when it is waiting for the handshake signal or the UART status to become ready during printing.
The GIPB adjusts to the size of memory available, so that in fact only 2K of RAM at the start of memory is needed, although this would be of limited use. The reason that 64K is normally needed is that there must be 4K of RAM at the top of memory, occupying the same addresses as the EPROM. This is because the EPROM has to be paged out during use of the GIPB, and it copies itself to the same area in RAM. This is necessary because of a hardware feature of the card which prevents the PIO receiving the RETI instruction from code in the EPROM. Therefore the PIO can handle only one interrupt and then locks up.
An alternate version of the GIPB operates using only port B, with the Ready and Strobe lines for handshaking. This requires special interrupt handling software at the host end.
Below I have given the complete code needed. It is necessary only to create a 2732 EPROM and plug this into a GM813. The listing is shown in two halves, for convenience, and the CRCs for the two halves have been calculated separately, to make checking simpler.
CRC for first half: CRC = 6B A6
CRC for second half: CRC = A7 42
I have also given the source code of the routine which does the GIPB operation. It is self contained, and as you can see could easily be adapted to operation under any other operating system.
Page 11 of 47 |
---|