Updated from 4:14 p.m. EST

Tech stocks charged ahead and blue chips used a late rally to close slightly higher, shaking off early weakness and overcoming a selloff in mining and energy shares.

The Dow Jones Industrial Average added 6.17 points, or 0.05%, to 12,480.69, and the S&P 500 was up by 1.74 points, or 0.12%, at 1418.34. The Nasdaq Composite jumped 30.27 points, or 1.25%, to 2453.43.

Chip giant Intel ( INTC) helped to boost the tech-heavy Nasdaq. Shares rose 3.7% after Banc of America raised its first-quarter and full-year 2007 earnings estimates for the company.

Volume weakened. More than 2.51 billion shares changed hands on the New York Stock Exchange, and decliners and advancers were matched evenly. Volume on the Nasdaq was roughly 2.17 billion shares, with winners edging losers 17 to 13.

One of the key stories of the session took place in the commodities arena, where crude futures extended the prior day's free fall that pulled prices to their lowest level in 19 months.

The decline came after the Energy Department's weekly inventory report, which showed that crude supplies fell by 1.3 million barrels. Distillates rose by 2 million barrels, and gasoline stocks were higher by 5.6 million barrels.

Oil prices dropped $2.73 to close at $55.59 a barrel in Nymex floor trading, bringing the two-day slide to 8.9%.

By sector, semiconductor stocks were among the top gainers of the session. The Philadelphia Semiconductor Sector Index jumped 2%. Oil stocks were among the hardest hit, with the Philadelphia Oil Service Sector Index losing 2.9% and the Amex Oil Index down 1.9%.

"There was strength in technology and further weakness in the energy sector," said Michael Sheldon, chief market strategist with Spencer Clarke LLC. "Volatility has clearly picked up, something investors will need to get used to this year."

Meanwhile, investors got some clarity on the holiday retail picture with the monthly release of chain-store sales reports, which brought many disappointments. Wal-Mart ( WMT) confirmed this weekend's announcement about its December sales, saying comparable-store revenue climbed 1.6% last month. Wal-Mart gained 23 cents, or 0.5%, to close at $47.78.

Target ( TGT), Kohl's ( KSS) and Federated ( FD) reported same-store growth for the month but came in below estimates.

Also among the laggards were Sharper Image ( SHRP), where comps fell 20%, and Pier 1 ( LTD), where same-store sales slid 10.7%.

The headline was specialty clothing retailers, most of which failed to meet Wall Street's forecasts and saw their shares decline. AnnTaylor ( ANN) and Limited ( LTD) were falling after missing sales estimates.

Hot Topic ( HOTT) saw comp sales fall 5.1%, forcing the retailer to reduce its fourth-quarter earnings projection. Shares plummeted 17% to finish at $11.23.

Elsewhere, the networking sector was active as Cisco Systems ( CSCO) said it would acquire IronPort Systems in an $830 million deal and JDSU ( JDSU) set plans to buy Casabyte.

On the economic front, the Institute for Supply Management said its services index dipped to a reading of 57.1 in December from 58.9 the previous month, matching expectations. A number above 50 indicates growth in the sector.

The services report follows the release of the ISM's manufacturing index on Wednesday, which showed an unexpected rise in manufacturing.

Elsewhere, the Labor Department said initial jobless claims rose by 10,000 to 329,000 for the week ended Dec. 30. Economists anticipated a slight increase to 320,000 claims. Additionally, factory orders rose 0.9% in November, just below estimates.

Treasuries moved higher following the economic releases. The 10-year note added 11/32 in price to yield 4.62%, and the 30-year bond rose 20/32 to yield 4.72%.

On Friday, the Labor Department will release the nonfarm payrolls data for December. Economists expect that the U.S. economy added 115,000 jobs, while the unemployment rate is expected to remain at 4.5%.

"This report will set the tone of trading for the day," said Sheldon. "Core inflation is still rising above the Federal Reserve's comfort zone, but the employment market has remained solid. Weekly jobless claims have continued to hold, so until some of those factors change the Fed will likely remain on hold."

More from Markets

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%

Replay: Jim Cramer on the Markets, 10-Year Yield, Oil Prices and Foot Locker

Replay: Jim Cramer on the Markets, 10-Year Yield, Oil Prices and Foot Locker

Video: You Could Live in a Ritz-Carlton or St. Regis Home

Video: You Could Live in a Ritz-Carlton or St. Regis Home