Investors poured into tech shares on Friday as promising chipmaker earnings and optimism that a solution was on the horizon for the U.S. debt stalemate triggered a move into growth-oriented shares.

The Dow was held back by Caterpillar Inc , with shares of the heavy equipment maker falling 5.8 percent on disappointing results. The stock exerted a 48.6-point drag on the Dow, which ended off 43 points.

The benchmark S&P 500 index rose 2.2 percent for the week, lifted by strong earnings and a new bailout plan for Greece to contain Europe's debt crisis. Stocks have been restrained, however, by the long slog of negotiations to resolve the U.S. debt crisis.

It's likely an agreement in any form will cause a relief rally for equities, said Andrew Slimmon, managing director, global investment solutions at Morgan Stanley Smith Barney in Chicago.

Coming on the heels of overall pretty good earnings numbers and some sort of resolution in Greece and that could make for a rally in the market, he said.

President Barack Obama insisted on Friday he was prepared to make tough choices for a sweeping deficit-reduction deal to avert a U.S. default, despite Democrats warning him not to make too many concessions.

Semiconductor shares led the market on Friday after Sandisk , a maker of flash memory chips used in smartphones and tablets like the iPad, and Advanced Micro Devices reported strong results late Thursday. The PHLX Semiconductor index <.SOX> rose 2.4 percent, led by AMD, which jumped 19.2 percent to $7.75.

Nasdaq has more things out on the risk curve, and one of the things our folks have been saying is that the risk-on button should be pushed here, said Glenn Starkman, global head of sales trading at Dahlman Rose in New York.

You might see some rotation into things like energy, into materials and industrials as well as technology and money might rotate out of things like defensives.

The Dow Jones industrial average <.DJI> dropped 43.25 points, or 0.34 percent, to 12,681.16. The Standard & Poor's 500 Index <.SPX> added 1.22 points, or 0.09 percent, to 1,345.02. The Nasdaq Composite Index <.IXIC> gained 24.40 points, or 0.86 percent, to 2,858.83.

For the week, along with the S&P's 2.2 percent, the Dow rose 1.6 percent and the Nasdaq advanced 2.5 percent.

The second bailout for Greece supported sentiment, even as Fitch ratings agency on Friday said Greece would be in temporary default as the result of the new rescue plan. Fitch pledged to give Greece a higher, low speculative grade rating after its bonds had been exchanged and said Athens now had some hope of tackling its debt mountain.

Caterpillar, a maker of equipment used in mining and construction, has been a stalwart performer in recent years and was the top Dow performer for 2010, but rising labor and materials costs hit earnings.

Fellow Dow component McDonald's Corp's income topped estimates, sending the stock up 2.3 percent to $88.56.

Microsoft Corp posted a greater-than-expected jump in its fiscal fourth-quarter profit but sales of its flagship Windows software disappointed for a third straight quarter. The Dow component rose 1.6 percent to $27.53.

But General Electric Co dipped 0.6 percent to $19.04, even as it reported a 21.6 percent jump in quarterly profit.

Verizon Communications Inc lost 2.2 percent to $36.74 after the telecom giant posted second-quarter results and named a new chief executive officer.

Volume was light with about 5.81 billion shares traded on the New York Stock Exchange, NYSE Amex and Nasdaq, well below the daily average of 7.48 billion.

Declining stocks outnumbered advancing ones on the NYSE by 1,530 to 1,400, while on the Nasdaq, decliners beat advancers 1,294 to 1,256.

(Reporting by Chuck Mikolajczak; Editing by Leslie Adler)