Updated

After weakly hovering around the unchanged mark for most of the day, stocks got a late boost from bargain-hunters to end the session in positive territory Friday.

After spending much of the session hovering near unchanged levels from Thursday's close, the blue-chip Dow Jones industrial average climbed 44.70 points, or 0.46 percent, to 9,811.15. The technology-packed Nasdaq Composite Index advanced 6.66 points, or 0.34 percent, to 1,953.17. The broader Standard & Poor's 500 Index rose 3.69 points, or 0.33 percent, to 1,123.07.

"We've had a bit of profit-taking after a pretty good couple of weeks and the consensus had become that there would be a correction," said John Manley, chief equity strategist at Salomon Smith Barney. "But now there's more upside to the market after all the selling."

For the week, the Dow fell 2.4 percent, the Nasdaq dropped 3.4 percent and the S&P 500 gave back 3 percent. Over the last few days, indexes have sliced the top off the autumn rally that has carried the broad market 20 percent above three-year lows reached on Sept. 21. It was the largest weekly decline since the market plunged in the immediate aftermath of the Sept. 11 attacks .

"It seems like there are snippets of news that things are going well in Afghanistan," said Peter Coolidge, senior equity trader at Brean Murray & Co. "Certainly, it would be a big positive for the market, if there was some sort of conclusive action in the forseeable future because we've been told not to expect any one event to be the conclusion to anything."

Friday's market action is "more staying close to flat, going into the weekend ... just making sure if there are further positive developments in Afghanistan over the weekend, you don't want to be short going into it because the market is likely to jump if anything further develops," he added.

The possibility that the war in Afghanistan could be drawing to a close gave traders reason to buy, analysts said. On Friday, U.S. aircraft bombed eastern Afghan mountains, which are reported to be the final refuge of Usama bin Laden and his al Qaeda fighters, who are being held responsible for the Sept. 11 attacks.

McDonald's Corp., the world's largest fast-food chain, helped support the blue-chip Dow and sparked a rally in restaurant shares by predicting growth in 2002, even as it said fourth-quarter U.S. sales would fall slightly. McDonald's climbed $1.07 to $26.80.

Amgen Inc., the world's largest biotechnology company, fell $4.16 to $56.03 as investors seemingly gave a "thumbs down" to reports of a plan to buy Immunex Corp. , a leading arthritis drug maker. Immunex lost $1.34 to $25.62.

Cisco Systems Inc. led technology issues higher and was the most actively traded stock on the Nasdaq. Stock of the California-based company rose 38 cents, or 2 percent, to $19.39.

Software giant Oracle Corp. posted an earnings drop late Thursday, which helped dampen gains in the technology sector. Oracle shed 10 cents to $14.57.

The world's No. 2 software vendor posted earnings that were down from a year ago and called the last quarter "our toughest quarter in a decade." But Oracle said it expects profit growth to resume by the second quarter of next year.

The Philadelphia Stock Exchange semiconductor index rose by 2.32 percent, to 549.02. Shares of chip-making equipment companies staged a broad rally after the previous session's sharp decline. Analysts said the gains mirrored cautious investor optimism about the sector's prospects.

Shares in drug developer Pharmacyclics Inc. dove $12.31 to a record low at $9.39, or more than 56 percent. The company's lead cancer drug, Xcytrin, failed to prove effective in the treatment of brain metastases -- cancer that has spread to the brain from another part of the body.

Calpine Corp. sank $2.85 to $13.20. The power producer was hurt by Thursday's announcement by Moody's Investor Service, who put Calpine's credit rating on review for a possible downgrade on concern over the company's liquidity.

Calpine's weakness and the spectacular collapse of energy trading giant Enron Corp. continued to feed the decline of other stocks in the energy sector. Dynegy Inc., which broke off a merger with Enron, fell $1.64 to $24.94. Investors have grown skeptical of the energy sector since Enron, once a Wall Street darling, sought bankruptcy court protection in the biggest bankruptcy case in U.S. history.

Several economic reports offered markets some encouragement that economic conditions could be improving.

The Labor Department said its Consumer Price Index, a gauge of inflation, was flat last month after dropping 0.3 percent in October. But without lower costs for food and energy items, the core CPI rose a bigger-than-expected 0.4 percent -- the sharpest gain for any month since January 1996.

U.S. industrial output shrank again in November, but an upswing in auto production limited the overall decline, the Federal Reserve said in a report.

Advancing issues outnumbered decliners slightly more than 8 to 7 on the New York Stock Exchange. Volume came to was heavy, but down slightly from recent levels.

The Russell 2000 index, which tracks smaller company stocks, rose 2.63, or 0.6 percent, to 471.30.

Overseas, Japan's Nikkei stock average rose 0.8 percent. In Europe, Germany's DAX index fell 1.1 percent, Britain's FT-SE 100 dropped 0.3 percent, and France's CAC-40 declined 1.6 percent.

Reuters and the Associated Press contributed to this report.