Both markets started the day higher. Then the Nasdaq fell more than 100 points to a low of 3,042.66 before closing up 106.06 at 3,270.61.
The Dow fluctuated, falling to a low of 10,364.35 before finishing up 113.08 at 10,535.35, led by Intel and Coca-Cola.
The Standard & Poor's 500 index rose 25.19 to 1,399.05.
Shares of retailer Costco Wholesale were the most-actively traded on the Nasdaq Stock Market. At the end of regular trading, Costco was down $8.75, or almost 22 percent, at $31.88. Volume topped 144 million shares, more than 28 times the stock's daily average. The company said earnings for the fourth quarter will not meet analysts' expectations.
Intel gained $7.50 to $117.38. Microsoft rose $2.38 to $65.56. The software giant and various government agencies argued in court over a proposed two-way breakup of the company, while U.S. District Judge Thomas Penfield Jackson indicated an interest in a three-way split.
Jackson asked the government to submit a final, revised remedy proposal by Friday, a strong indication that a decision in the antitrust trial could come soon.
The CNET tech index gained 88.11 to 2,484, led by shares of eBay, American Power Conversion and Intuit. Winners edged out losers, with 73 of the 99 stocks in the index rising, 25 falling and one remaining unchanged.
Of the 18 sectors tracked by the index, computer memory storage, semiconductor equipment and server hardware companies showed the greatest advances, rising about 5 percent each. Computer-aided design companies were the only losers, falling 2 percent.
American Power rose $4.56, or 16 percent, to $32.94, while eBay gained $13.94, or 12 percent, to $129.94. Financial software maker Intuit rose $8, or 30 percent, to $35.06 after reporting strong earnings yesterday.
On the negative side, E*Trade fell $1.81, or 12 percent, to $13.94. Robertson Stephens lowered earnings estimates for the online broker's next quarter along with those of Ameritrade Holding and Knight Trading Group. Ameritrade fell 56 cents to $11.19, and Knight rose $1.56 to $27.63.
The Philadelphia semiconductor index rose 45.46, or 5 percent, to 915.20, led by chipmaker Linear Technology, which gained $6.13 to $52.44.
The Securities and Exchange Commission widened its investigation of once high-flying software company MicroStrategy to include auditors PricewaterhouseCoopers. MicroStrategy's shares fell $2.44, or 11 percent, to $18.81.
Looking to boost its portfolio of chips that connect appliances in the home, Broadcom said it will acquire Pasadena, Calif.-based Pivotal Technologies in a stock deal valued around $242.5 million. Broadcom rose $4 to $129.