Gannett Co., the nation's largest newspaper publisher, said yesterday that dwindling advertising volume led to modest declines in its profit for the third quarter and first nine months of 1990.

The Arlington-based media company said the prospect of new taxes and higher energy prices has shaken consumer confidence, adding to the troubles facing retailers -- who always are among the largest newspaper advertisers.

Gannett reported a $259.7 million profit in the first nine months, down almost 4 percent from the $270.1 million it earned in the same period last year. Per-share earnings fell to $1.62 from $1.68, while revenue fell 0.5 percent, to $2.54 billion from $2.55 billion.

In the third quarter, the company said it earned $79.4 million (50 cents a share), down 4.5 percent from 1989 third-quarter profit of $83.1 million (52 cents).

Gannett's revenue rose 0.2 percent in the third quarter, to $829.9 million from $827.9 million.

The company said newspaper ad revenue fell 3 percent in the third quarter. Retail ads were down at most of its newspapers, it said, and classified-ad volume reflected slowing demand for autos and a decline in real estate and help-wanted advertising.

Paid advertising pages at USA Today, Gannett's flagship newspaper, were down 6.5 percent in the third quarter, and are down almost 8 percent for the year. On the other hand, broadcasting revenue rose 4 percent in the quarter and billboard ad revenue grew 3 percent.

Gannett publishes 82 daily newspapers, operates 10 television stations and 15 radio stations, and has the largest outdoor advertising company in North America.

First Maryland Bancorp, the wholly owned U.S. unit of Allied Irish Banks PLC, said its earnings fell 18 percent in the third quarter, to $16.3 million from $19.9 million. The year-ago results included a $4 million one-time gain.

The bank did not give reasons for the drop in earnings, but said its third-quarter results "represented a solid performance in a difficult business climate."

First Maryland, which launched a $217 million bid for Baltimore Bancorp. earlier this year, said its loan-loss reserves stood at $146 million as of Sept. 30, amounting to 2.66 percent of its total loans. It added $3 million to that reserve, which protects the bank against loan defaults, in the latest quarter.

Computer Data Systems Inc., a Rockville-based computer services company, reported a 24 percent drop in profit in the fiscal first quarter ended Sept. 30, but said the results were skewed by a one-time gain a year ago from the sale of warehouse land.

The company said it earned $734,100 (26 cents) in the first quarter, compared with $969,300 (34 cents) in the fiscal 1989 first quarter. Excluding the 12 cents a share gain last year on the warehouse land sale, the firm said, its earnings would have risen 2 cents a share.

Despite those underlying gains, company Treasurer Donald E. Ziegler said the federal budget impasse was beginning to hurt CDSI and other federal contractors.

With some contracts expiring and the federal government holding off on awarding new ones, Ziegler said, the company has laid off about 150 of its 2,700 employees.