Computer Data Systems Inc., a Rockville-based computer services company, said revenue from contracts with the Department of Energy and the General Services Administration helped to sharply increase its earnings in the fiscal year ended June 30.

The company reported a fiscal year profit of $3.7 million ($1.29 a share), compared with $844,000 (29 cents) in the previous fiscal year.

Revenue increased 18 percent for the year, to $124.8 million from $105.5 million in the 1989 fiscal year.

Earnings for the fourth quarter increased 81 percent, to $1.1 million (40 cents) from $634,200 (22 cents) in the same period a year ago.

Revenue had increased 2 percent, to $31.9 million from $31.1 million in the fourth quarter of 1989.

The company's contract with the Department of Energy contract, worth $158 million over five years, and its GSA contract, worth $120 million over four years, were both won in 1988. The profit increase reflects the end of startup costs associated with both contracts, the company said.

Crown Central Petroleum Corp., the Baltimore-based oil refiner and marketer, said its acquisition of a Texas refiner helped the company more than double its earnings in the second quarter. In the first half, Crown's profit rose 80 percent.

The company reported second-quarter profit of $15.2 million ($1.54), up 142 percent from 1989 second-quarter earnings of $6.3 million (62 cents). Revenue increased 62 percent in the quarter, to $492.1 million from $303.2 million.

Crown's earnings totaled $16.3 million ($1.66) in the first half, compared with $9.1 million (91 cents) in the year-earlier first half. Revenue again rose 62 percent, to $950.5 million from $587.5 million.

Besides its acquisition of Texas-based La Gloria Oil and Gas Co., Crown cited stronger refining profit margins in the first quarter and higher gasoline demand in the second period as reasons for its increase in earnings.

Its Houston and Tyler, Tex., refineries ran at near capacity during the first quarter, but a July 3 fire at the Houston plant caused damage that reduced its production, Crown said. Repair work is expected to be completed in early August.

Second National Federal Savings Bank reported a profit of $2 million (23 cents) in the second quarter, compared with a $2.3 million profit (32 cents) the thrift earned in the same period in 1989.

For the first six months, Annapolis-based Second National earned $4.4 million (51 cents), down slightly from the $4.6 million (63 cents) it reported in the first half of last year.

Chairman Henry A. Berliner Jr. said Second National's depressed earnings were the result of the "same general economic downturn facing other financial institutions in our region."

He said the problems rested mainly within the company's commercial real estate portfolio, but did not affect its residential lending.

To protect against any unanticipated losses, Berliner said the board doubled the monthly allocation to the thrift's loan loss reserve, making the annual contribution $2 million. He said the company also is curtailing its asset growth, is excluding new commercial real estate lending and is discouraging reinvestment in outstanding loans that come due.

The company had assets of $1.76 billion as of June 30, an increase of $405 million compared with 1989 second quarter assets.

Tempest Technologies Inc., a Herndon-based computer manufacturer, said its profit fell 98 percent in the fiscal first quarter ended June 30.

The company said the decline was caused by a softness in the government market for its main product -- computers made to a set of federal standards, known as Tempest, for protection against electronic eavesdropping.

Tempest Technologies reported first-quarter earnings of $4,000 (zero cents), compared with 1989 first-quarter earnings of $231,000 (3 cents). Revenue fell 22 percent, to $2.1 million from $2.7 million.

Franklin National Bank of the District said it earned $126,722 (8 cents) for the second quarter, compared with a loss of $12,446 in the same period last year.

For the first six months, the bank said it earned $219,000 (14 cents) compared with a loss of $103,000 in the first half of last year.

Total assets reached $43.4 million, an increase of 17 percent over June 30, 1989.

Chairman Joel Fernebok, who took over the bank last summer, said the quarterly performance "reflects the bank's steady, healthy growth."

He said that because of the current regulatory and business climate for commercial real estate, the bank is continuing a heavy focus on credit quality.

Jefferson Bankshares Inc., parent of Charlottesville-based Jefferson National Bank, said a downturn in loan demand, which it linked to weakness in real estate and other areas of the economy, pushed its profit down 13 percent in the second quarter and 12 percent in the first half.

The bank reported second-quarter profit of $3.75 million (54 cents), compared with $4.3 million (62 cents) in the 1989 second period.

First-half earnings totaled $7.3 million ($1.06), compared with $8.4 million ($1.21) in the 1989 first half.

Assets were $1.53 billion as of June 30, compared with $1.5 billion at the same point a year earlier.