The S&P added 2.72 points or 0.2 percent to close at 1,692.09 as second quarter profits reported this week outperformed analysts' projections.
The Dow Jones industrial average dipped fractionally, just 4.80 points or 0.03 percent to close at 15,543.74, while the Nasdaq dropped 23.66 points or 0.7 percent to 3,587.61, pressured by lower-than-expected earnings from Microsoft and Google.
On the New York Stock Exchange 1,546 issues advanced while 1,491 declined on volume of nearly 3.322 billion shares.
Investors appeared to be gaining confidence the Federal Reserve could ease off its monetary policy without roiling markets, following Fed Chairman Ben Bernanke's appearances this week on Capitol Hill. Bernanke said the Fed's plan for ending its quantitative easing police was not written in stone.
The 10-year treasury note gained 11/32 to yield 2.488 percent.
Foreign markets were mostly lower. Japan's Nikkei index lost 218.59 points or 1.48 percent to close at 14,589.91. Hong Kong's Hang Seng index gained 17.20 points or 0.08 percent to close at 21,362.42. London's FTSE 100 lost 3.69 points or 0.06 percent to close at 6,630.67. Germany's DAX lost 5.52 points or 0.07 percent to close at 8331.57 and the French CAC 40 lost 2.47 or 0.06 percent to close at 3.925.32.
In after-hours trading on the New York Mercantile Exchange, crude oil was up 46 cents to $108.50 a barrel.
Gold gained $8.70 to close at $1,293.30 per troy ounce on the NYMEX Comex division while silver gained 8.9 cents to close at $19.465.
On currency markets, the euro was at $1.3141 against the dollar from Thursday's $1.3109. Against the yen, the dollar rose to 100.64 yen from Thursday's 100.43.
On the Chicago Board of Trade, December corn was off 1/2 to $5.00 1/4, November soybeans were up 7 3/4 to $12.73 1/2 and September wheat was up 3 1/4 to $6.63 3/4.
Pot vending machine to debut
Pistorius testifies he didn't consciously pull trigger when he shot girlfriend