Quote: In addition to the Z80A which is its main processor, the NewBrain contains a National Semiconductor COP420 4-bit processor which is used as an intelligent I/O controller and manages the keyboard, line display, and tape I/O.
Communication between the two processors is handled via two page zero locations; COPCTL and COPST. The COPCTL is a command byte which is written to the COP at interrupt time, and COPST is a series of flags which tell the Z80 what the COP has done, or is doing. There is also a third location, COPBUFF, which is used as a data buffer either to or from the COP. The COPCTL, COPST, and COPBUFF (the names are those used by the technical manual) are at 59, 60 and 61 respectively.
Unless tape I/O is going on, COPBUFF will normally contain the keyboard matrix value of the last key pressed. This value will remain until another key is pressed (it won’t change when you release the key).
|