IBM Thursday reported its sixth consecutive quarterly rise in profit, as its long-term contracts largely shielded it from the shortfalls that hit other technology companies.

International Business Machines Corp.'s (IBM) earnings beat expectations, and the stock rose slightly even though revenue fell about $100 million shy of analysts' average estimates.

"While revenue was a little light, we saw gross margins hold," said Marty Shagrin, a Victory Capital analyst.

The world's largest computer company said second-quarter net income rose to $2.0 billion, or $1.16 a share, from $1.7 billion, or 97 cents a share, a year earlier, including items.

Revenue rose to $23.2 billion from $21.6 billion a year earlier.

Analysts expected the company to report earnings of $1.12 a share and revenue of $23.33 billion, according to Reuters Estimates. But some analysts had said in the days leading up to the report that revenue at IBM might be a couple of hundred million dollars below consensus expectations, given weakness at other technology companies.

IBM, based in Armonk, N.Y., is often seen as an indicator for the broader technology sector because it sells everything from tiny microchips to computer software and services to extremely powerful mainframe computers.

"The recovery is slow and steady but in the right direction. IBM is showing that," said Rob Schafer, program director at Meta Group, speaking about a modest rebound in the tech sector. "This quarter is the tortoise but not the hare."

IBM's Chief Financial Officer Mark Loughridge said the recovery was spotty but still on track.

"Customer spending continues to improve, though not uniformly across all segments and regions," Loughridge said, adding that he continues to forecast IT industry growth of about 4 percent to 5 percent, the best since 2000.

IBM's comments on technology spending come after several competitors, including the world's largest microprocessor maker Intel Corp. jangled investors' nerves by signaling a rise in inventories.

Some 20 software companies also reported shortfalls in recent weeks, saying it was difficult to close deals in the month of June. IBM's own software business, which relies on long-term contracts, showed flat sales at $3.5 billion.

Software sales were down 4 percent on a constant currency basis.

IBM said sales of computer services rose 7 percent to $11.3 billion. The company said it had signed $10 billion in new services contracts, an important indicator of future business.

Sanford Bernstein analyst Toni Sacconaghi had expected new contracts of $9.5 billion to $11.5 billion to be signed.

Sales of computer hardware, which include its mainframe servers and data storage systems, rose 12 percent to $7.4 billion.

In a bright spot for IBM, its troubled microelectronics operations posted a profit of $111 million. That was the first profit for the microchip business since the fourth quarter of 2002, as it struggled with production problems.

IBM's technology business, which includes microelectronics, was combined earlier this year with its server and storage division.

Microelectronics was helped by a $227 million licensing deal it signed early in the quarter with Applied Micro Circuits Corp.. In all, intellectual property sales contributed $432 million in income.

IBM shares were trading at $84.84 after closing at $84.02 on the New York Stock Exchange (search).