Software synchronizing of video displays and Z-80 processing in the Model III TRS-80

A machine language technique is described whereby the Z-80 microprocessor of the Model III TRS-80 can be programmed to monitor position of the electron beam during CRT scanning. This technique provides the opportunity to synchronize the appearance of video displays with Z-80 processing. The programmer can therefore be assured of crisp stimulus displays and precisely recorded reaction times. The computer’s real-time clock operates on video circuitry as part of a routine that is initiated by a maskable interrupt. The real-time clock interrupt can be vectored from its normal use to a routine that signals the Z-80 when the electron beam is at a known screen location. A machine language program and a TRSDOS BASIC program that demonstrate the technique are described.