All good advice so far.
Back-firing?
Have you installed that new distributor? My '98 had a similar prob. Yea I know. Different engine & fuel delivery system. Stiil a GM though!
Would just randomly stall. Occasionally buck or ping under power or up hills. Backfiring & coughing too. It would idle fine, but as soon as any load was on the engine, the problems would start again.
The teeth of the distributor had worn down to be knife-like sharp. This was causing the timing to vary either way from where it was supposed to be. That was messing with the computer's brain. Apparently a common prob with the GM distributers.
Had the valve covers off? SBC's are known for eating cam-shafts, too.
Just my .02. Could be out in left field with this.