April 17, 2023

Entrex - Keyboard

The hope is that we can understand the keyboard from the interface circuitry on the processor board in conjunction with a study of the code in the 8080 ROM.

There are two input ports:

There is one output port:

A look at the ROM shows that port 0x48 is read (by an in 0x48 instruction) in 13 places. All but 4 of these are "pointless" because the read (into the A register) is immediately followed by another instruction that overwrites what was read from port 0x48. All this seemingly pointless reading of 0x48 makes one wonder it there is some strange side effect of simply reading the register.

The read yields 8 bits, only 4 of which contain actual data. The "f" bit (masked by 0x40) indicates that data is waiting to be read from port 0x50. The other 3 bits are the low 3 bits in the byte read as shown by "xxx" above. It is not clear what these bits are for.

The first read of 0x48 is at address 00CA. The "f" bit is tested and if it is set, a call is made to 0020 (just as if an RST-4 interrupt had taken place. RST-4 is set up as a keyboard interrupt handler, but as near as we can tell, the processor board has no hardware to generate such an interrupt, so this test and call must suffice to process keyboard events.

The RST-4 handler at address 0020 saves registers, then jumps to 0652. The first thing here is to read port 0x50.


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org