McCormick & Co., the giant Maryland spice and specialty food products company that is fighting an unfriendly takeover bid from Sandoz Ltd., of Switzerland, yesterday reported a modest increase in profits during its first fiscal quarter.

In separate earnings reports, Quality Inns International posted a continued rebound from last year's depressed results while Stanwick Corp., an Arlington management systems firm, wrote off $3.5 million of assets related to an Iranian contract and listed substantial net losses.

Earnings of McCormick, whose directors met yesterday with Sandoz Chairman Yves Dunant to hear details of a $418-million or $37-a-share take-over offer, rose 8 percent in the three months ended Feb. 29 to $3.16 million (28 cents a share) from $2.93 million (26 cents). Sales jumped 22 percent to $116 million.

President Hillsman Wilson said the strong first-quarter sales were in line with expectations, especially for domestic retail and specialty frozen food units. The sluggish profitablity growth reflected "substantially higher interest costs and a drop in income of unconsolidated foreign affiliates from the high levels of 1979," Wilson added.

At their board meeting yesterday, directors voted a dividend of 13 cents a share, payable April 10 to owners of record March 27.

The meeting, which began at 1 p.m., was still in progress last evening and there were no indications that McCormick's management had budged from its position of opposition to the Sandoz offer.

Quality Inns, an international hotel operating firm based in Silver Spring, reported a tripling of six-month earnings and declared a sixth consecutive dividend. Profits for the two quarters ended Feb. 29 were a record $2.19 million (82 cents a share) compared with $730,000 (28 cents) a year earlier and the previous record for the period. Revenues rose to $30 million from $28 million.

For the latest three months, Quality reported earnings of $858,000 (32 cents a share), a substantial turnaround from a loss last year of $209,000. (Revenues rose to $14 million from $13.2 million. The firm has 340 hotels in the U.S., Canada, Mexico and Europe.

President Joseph McCarthy noted that the winter months traditionally represent losses as a result of the hotel industry's seasonal nature. He also noted that the second quarter results included a substantial gain from selling real estate, but that operating profits still were much better at $467,000 compared with a loss of $152,000 in the same period a year ago.

Directors voted a dividend of 12 1/2 cents a share, payable April 21 to owners of record April 1. The payout was boosted by 2 1/2 cents in the first quarter of the current fiscal year.

Stanwick Corp. a major corporate victim of the revolution in Iran, said the $3.5 million writeoff in the quarter ended Jan. 31 represented cash, billed receivables and other assets on deposit in Iranian banks or due under contracts with the pre-revolutionary government.

A suit being filed in U.S. District Court here is seeking $7 million from the Iranian government and certain former Iranian customers, Stanwick stated.

As a result of the Iranian business loss and accounts payable, Stanwick posted an overall net loss in the recent quarter of $2.1 million compared with profits a year ago of $231,000. Revenues fell to $2.5 million from $4.9 million a year ago, when four Iranian contracts accounted for 77 percent of all revenues.

However, Stanwick said that when the Iranian business is eliminated, revenues from continuing operations rose 95 percent, because of expanded work in naval design and publications engineering services.