An 89 is TBI unless they have changed it to a carb. This is such a general question to try to answer, could be the TPS (throttle position sensor), an o2 sensor, fuel filter. You can take it to autozone or shucks and they will usually check the computer codes for you for free.
Id pull the throttle body off, have a look at the base gasket(usually leaks there) and give it a good cleaning. Id also replace the fuel filter and give it a whirl. Could be other things though too. Spark plug wire arcing on the manifold?
Did you ask it what is wrong?
My bet is the EGR is stuck open
Hey
When it doesn't start; remove the aircleaner and see if your getting gas into the carb from the jets, if not you have a bad fuell pump which is most likely in the tank. If your getting gas but no spark, look at the coil unless yours is an HEI. Intermittent fuel pumps can act just like that. Good luck.
Pete Wilson