The Dow Jones industrial average, which had been nearly 50 points down early in the day, turned around to close up 21.79 at 5,603.65.
Decliners led advancers by 4-to-3 on the New York Stock Exchange, where volume totaled 421.31 million shares, up from 379.19 million in Tuesday's session.
"It did come back quite quickly and for a while quite vigorously, but with today's close it really has not resolved some of the near-term damage created by weakness in technology and last Friday's 115-
point drop (in the Dow)," said Eugene Peroni, director of technical research at Janney Montgomery Scott in Philadelphia.
"The market is trading within a range and is still somewhat uncertain about the interest rate outlook, and there's caution on the earnings front, too," he said.
Among broader markets, the NYSE composite gained 0.18 to 351.75 and the S&P 500 list rose 1.31 to 656.06. The Nasdaq composite dropped 15.44 points to 1,138.15, while the Amex market value index fell 4.86 to 561.81.
Wednesday's early declines were touched off by Motorola Inc., which reported late Tuesday that its second-quarter profits were short of expectations, falling 32 percent.
The uneven day in stocks came despite another strong day in the bond market, which has recovered some ground from Friday's steep sell-off.
The Treasury's benchmark 30-year bond rose about one-half point, sending its yield down to 7.08 percent.