The Dow and S&P 500 slipped on Tuesday as financial shares sank and on disappointing housing data, but the Nasdaq rose as investors snapped up technology shares ahead of results from Hewlett Packard .

Financial shares fell as the U.S. Senate passed a bill to curb sudden credit card interest rate increases and hidden fees, driving the Dow and S&P 500 down in late trade after being higher for much of the day.

Anyway you look at it, it's less favorable for banks, said Stephen Massocca, managing director at Wedbush Morgan in San Francisco.

Analysts said the bill would hurt the profits of major credit card issuers.

Shares of American Express fell 5.1 percent to $24.79, while Capital One Financial fell 4.5 percent to $24.90. Shares in JPMorgan Chase & Co were off 3.9 percent to $36.81.

But the Nasdaq was cushioned from the worst of the losses as investors snapped up shares in the technology sector ahead of results from Hewlett Packard, betting the tech bellwether might be the latest company to beat estimates.

The Dow Jones industrial average <.DJI> was down 29.23 points, or 0.34 percent, at 8,474.85. The Standard & Poor's 500 Index <.SPX> was down 1.58 points, or 0.17 percent, at 908.13. The Nasdaq Composite Index <.IXIC> was up 2.18 points, or 0.13 percent, at 1,734.54.

(Reporting by Edward Krudy, Editing by Leslie Adler)