The CO and N2 abundance in comet P/Halley