Pulsed-field ionization spectroscopy of CO via the E1Π state and NO via the B2Π state