By Benjamin Pimentel, MarketWatch SAN FRANCISCO (MarketWatch) -- Technology stocks recovered from early losses to eke out modest gains Thursday, aided by a rally in shares of Micron Technology Inc. Micron (MU) added 4% after Sterne Agee raised its rating on the memory-chip maker's stock. "We are upgrading Micron to a buy, $12 price target, from neutral, as we think DRAM pricing will start to moderate and stabilize over the next couple of months," Sterne Agee analyst Vijay Rakesh said in a note. Micron also got an upgrade to outperform from neutral by Baird. The Nasdaq Composite Index (RIXF) inched up 0.1% to 2,740. The Morgan Stanley High Tech 35 Index (MSH) and the Philadelphia Semiconductor Index (SOX) each rose fractionally. Meanwhile, shares of EMC Corp. (EMC) gained 2%. Lazard Capital boosted the stock's rating to buy from hold. Shares of some key players in the PC sector slipped after Gartner and IDC reported fourth-quarter PC data showing slower growth, partly due to stiffer competition from other devices, particularly Apple Inc.'s (AAPL) iPad. "The preliminary read confirms our fears of weak consumer demand and the early effects of the tablet invasion," J.P. Morgan analyst Mark Moskowitz said in a note. "In our view, these preliminary results, specifically indications of weaker-than-expected growth in Asia-Pacific, present modest downside risk to our PC market estimates." Intel Corp.'s (INTC) shares slipped about 0.2% ahead of the chip giant's fourth-quarter earnings report, due after the closing bell. Microsoft Corp. (MSFT) was down 1.2%, while Dell Inc. (DELL) declined 1.4%. Hewlett-Packard Co. (HPQ) and Apple Inc. were each up slightly. Shares of TTM Technologies (TTMI) advanced 14% after the printed circuit-board manufacturer raised its fourth-quarter forecast. Exfo Inc. (EXFO) shares jumped more than 20% after the Canadian telecommunications-testing-equipment maker posted better-than-expected financial results. But shares of Infosys Technologies (INFY) fell more than 5% after the Indian information-technology-services company reported weaker-than-expected results.