Since releasing its earnings report in the middle of last week, semiconductor equipment maker Applied Materials (NASDAQ:AMAT) has mostly dodged the market's downdraft. And it's done so even despite reporting a weak fourth quarter, with continued weakness in the forecast for the near future.

Q4 sales dropped 6% compared with the fourth quarter of last year, while gross margins fall 160 basis points to 45.5%, and operating margins shed 150 points to end at 23.7%. Fortunately, the company bought back enough shares (roughly 5% of its share count) to hold earnings per share steady at $0.30. But share buybacks can only go so far, and according to the CEO, fiscal 2008 is going to be "challenging, particularly on the silicon businesses."

Yet the news wasn't all bad. Most of the year was actually pretty good. Whereas sales fell 6% in the final quarter, they rose 6% for the year. Gross margin for the year lost only 70 basis points, and the operating margin actually climbed 240 points -- albeit primarily because of much-reduced restructuring charges.

Going green
How can Applied improve those margins further? Well, its new business of making solar-panel equipment for customers such as LDK Solar (NYSE:LDK) -- and perhaps for First Solar (NASDAQ:FSLR), Energy Conversion Devices (NASDAQ:ENER), or Suntech Power (NYSE:STP)? -- has caused the company to lose $30 million in Q4 and $89 million for the year. But this part of the business is also growing rapidly toward a scale that may eventually turn a profit. New orders in Q4 were 58% higher than sales in the segment, up from 48% higher for the year.

And Applied continues to grow this side of its business. This morning, the company announced that it will spend $330 million to buy Baccini, a privately owned Italian maker of systems for manufacturing ultrathin silicon photovoltaic cells.

Follow the money
Final point: We've been keeping a close eye on inventories and cash flow at Applied. Last week, I argued that the company "still has room for improvement" in these areas. And improve it has. Inventories dropped 7% year over year last quarter, a steeper fall than sales endured. And I'd imagine that with accounts receivable up a bare 1%, cash profits probably looked pretty good. It's hard to confirm, though, since the cash-flow statement wasn't included in the press release.

What did we expect out of Applied Materials last quarter, and what did we get? Find out in:

Fool contributor Rich Smith does not own shares of any company named above. Suntech Power is a Rule Breakers selection.  Why do we tell you this? Because The Motley Fool has a disclosure policy.