A microprocessor-controlled apparatus for the measurement of pulsed spectra