If what you mean is that the engine revs and slows down, back and forth....
I would check the IAC valve located on the throttle body. Or I would be looking for an air leak like the boot on the top or bottom of the throttle body being damaged or not on properly.
Kdeal hit the nail on the head. Mine was doing the same thing and I found out the air box or the throttle body wasn't seated correctly. I can't remember which one exactly but it was one of the 2.
so does it stay running when you hit the gas? backfire?...while idling it revs up and down?...not sure what you mean...check the throttle body boot on both ends to make sure it is securely fastened...
I remember that old bogus hex code made one of mine rev wildly up and down. If I shut it off hot then it would idle ok for a while . The latest hex code cured that one. Of course you need to check for air leaks buy the injectors ,throttle body and IAC.