TSMC <2330.TW>, the world's biggest contract chip maker, reported its weakest quarterly earnings in nearly eight years on Thursday as a slowing global economy hit demand for technology products.

But the chip foundry market, dominated by TSMC, UMC <2303.TW> and Chartered , is likely bottoming out, due partly to China's stimulus package that is seen supporting demand for computers, cellphones and flat-screen TVs.

Taiwan Semiconductor Manufacturing Co Ltd (TSMC) , which counts U.S. Texas Instruments and Nvidia among its major clients, said it booked a net profit of T$1.56 billion ($47 million) in January-March.

Profit tumbled 94.5 percent from T$28.14 billion a year ago, but beat a consensus T$1.2 billion forecast of six analysts surveyed by Reuters.

As a result of deepening economic recession worldwide and customers' inventory adjustment, first quarter saw a sharp decline in demand for semiconductors across all applications, TSMC said in a statement.

On Wednesday, cross-town rival UMC posted a T$8.16 billion net loss for January-March but said it would return to profit in the current second quarter as wafer shipments more than double from those in January-March.

ASE <2311.TW> , the world's largest chip packager, and Taiwan's chip designer Mediatek <2454.TW> also predicted a brighter second quarter.

TSMC's results came as the Taipei stock market closed on Thursday. TSMC shares surged 7 percent to their daily limit and UMC shares also rose limit up, in line with the main TAIEX's <.TWII> rally on hopes of Chinese investment to the island.

(US$1=T$33.2)

(Reporting by Baker Li, Editing by Anshuman Daga)