U.S. stocks barely budged Tuesday, ending marginally higher after oil prices backed off a session high near $60 a barrel, which helped offset National Semiconductor Corp.'s lowered outlook.

The Dow Jones industrial average rose 4.57 points, or 0.04 percent, to end at 12,666.31, while the Standard & Poor's 500 Index added 1.01 points, or 0.07 percent, to reach 1,448.00. The Nasdaq Composite Index inched up just 0.89 of a point, or 0.04 percent, to 2,471.49.

Click here to visit FOXBusiness.com's Investing Center.

Oil futures prices retreated after climbing to the NYMEX session peak of $59.99 a barrel as a cold front swept across the northeastern United States. It gave up more than $1 of that gain before the close, which eased investors' concerns about higher energy costs and inflation.

Earlier, investors sold technology stocks after microchip maker National Semiconductor reduced its quarterly revenue forecast.

But strong profits from several companies, including cosmetics marketer Avon Products Co. (AVP), supported the S&P 500 and helped it finish the day with a slight gain.

"Oil's definitely come off, so that's added a bit of spark to the market," said Anthony Conroy, head trader at BNY Brokerage, a unit of Bank of New York, in New York.

"This afternoon, it looks like some people are selling some of those yield stocks — utilities — and taking on some of the ones that have been beaten up and those are the tech stocks," he said.

National Semiconductor's shares fell 2.7 percent, or 64 cents, to $22.68 on the New York Stock Exchange after it cited sluggish shipments, particularly to Asia, as one reason why it cut its quarterly revenue forecast.

Its decline gave investors a reason to sell other tech stocks.

The Philadelphia semiconductor index fell 0.54 percent.

The Nasdaq's biggest gainer was online marketplace eBay Inc. , up nearly 2 percent, or 60 cents, at $32.85 a day after launching a new service for U.S. auto dealers.

Crude oil for March delivery gained 14 cents to settle at $58.88 a barrel on the New York Mercantile Exchange.

The S&P 500's top performer was Avon, the world's largest direct seller of cosmetics and beauty products. Its stock jumped almost 10 percent, or $3.38, to $38.00 on the NYSE, after its earnings topped Wall Street's estimates.

A rally in Citigroup, the largest U.S. bank, helped both the Dow and the S&P 500. Citigroup's stock rose 0.4 percent, or 20 cents, to $54.95. The S&P index of financial services stocks rose 0.48 percent.

"You've had banks under pressure the last couple of days, people talking about subprime lending ... that seems to have shaken off a bit," said Victor Pugliese, director of listed equity trading at First Albany Corp. in San Francisco.

General Motors Corp. (GM) helped lift the Dow late in the day after saying it will pay a first-quarter dividend of 25 cents a share. Its stock climbed 2.2 percent, or 72 cents, to $33.43 on the NYSE after the dividend announcement. Investors had expected that the automaker might lower its dividend for the quarter.

Earlier, Federal Reserve Chairman Ben Bernanke addressed a meeting in Omaha, Nebraska, but he did not discuss the economy or the outlook for U.S. interest rates.

Trading was moderate on the NYSE, with about 1.48 billion shares changing hands, below last year's estimated daily average of 1.84 billion, while on Nasdaq, about 2.17 billion shares traded, above last year's daily average of 2.02 billion.

Advancing stocks outnumbered declining ones by a ratio of about 2 to 1 on the NYSE and by about 4 to 3 on Nasdaq.

Click here to visit FOXBusiness.com's Investing Center.