340 runs on only 4 or 5 cylinders after backfiring

I'd be looking for bent push rods. Pop the valve covers off and make sure everything is moving correctly. Then go to the ignition.