House leaders scoured the Capitol for votes Friday for a compromise budget that would reach into the pockets of the rich, raise Medicare recipients' bills and add an extra nickel to everyone's gasoline tax.

Top Democrats and Republicans said they believed the House would endorse the giant deficit-cutting package. For the rank and file, the vote - the climax of the 101st Congress' raucous year - was a chance to make a statement and return home in time for Election Day."Democrats have a message of fairness to carry home, and I want to get out of here so I can do it," said Rep. Tom McMillen, D-Md.

"I'm voting against this because it's not necessary to raise taxes on anybody, let alone everybody," said Rep. Richard Armey, R-Texas.

Sensing that support could only wane with time, House leaders planned to bring the measure to the floor as soon as it was drafted into legislative language - a painstaking process not expected to be over until well after midnight.

Just a week after the House and Senate approved separate budgets, bargainers molded the final details of a compromise bearing about $140 billion in new taxes and $100 billion in spending cuts for the next five years.

The original $250 billion size of the package shrank by about $9 billion as leaders dropped unpopular items - such as forcing state and local government workers to join Medicare - as a tradeoff for votes. By late afternoon, leaders said the fine-tuning was complete.

"It's over," said House Majority Leader Richard Gephardt, D-Mo. "We're done."

Even some conservatives who would have preferred deeper spending cuts supported the plan, arguing that at least it took a whack at the government's growing red ink.

"I don't know if it was Confucius or Garfield who said, `When you find yourself in a hole, the first rule is quit digging,' " said Rep. Charles Stenholm, D-Texas.

When enacted, the bill is to be the heart of an effort to shrink the deficit by $500 billion over the next five years. The remaining savings are to come from restraints on defense spending and from lower interest payments because of reduced borrowing.

Meanwhile, the Treasury Department reported that the red ink figure for fiscal 1990 - which ended Oct. 1 - reached $220.4 billion, the second highest ever.

Passage of the budget package would ease the way for an end to the long and troubled congressional session. On Friday, the House and Senate also dealt with a flurry of other legislation:

- The House approved the first overhaul of federal clean air laws in 13 years 401-25 and immediately sent the 1,100-page bill to the Senate. Senate Majority Leader George Mitchell, D-Maine, scheduled a vote Saturday.

-The Senate gave final congressional passage to a $268 billion defense bill that made modest cuts in weapons systems.

-The Senate passed, 89-8, a comprehensive overall of the nation's immigration laws. But the House threw the bill onto a siding, facing an uncertain future, when it voted 235-186 not to approve ground rules for debate.

-A conference committee of the Interior appropriations bill voted to accept the mild anti-obscenity on arts financing in the House bill, dropping the tougher provisions of the Senate version.

-The House approved on a voice vote and sent to the Senate a bill toughening sanctions against banks and savings and loans convicted of money laundering for drug dealers.

-The House passed and sent to the president a bill requiring more nutrition information on food labels.

-A House-Senate conference committee reached agreement early Friday on a $15.5 billion foreign aid bill that, among other things, would forgive $6.7 billion in Egyptian military indebtedness to the United States.

Although legislative leaders expressed confidence that the budget deal would make it through Congress, they spent much of the day hunting for votes among the rank and file.

Top Democrats sought the support of the Congressional Black Caucus. But many of its 24 lawmakers - all Democrats - said they would oppose the budget unless the Senate took another crack at overriding Bush's veto of the civil rights bill. The Senate fell one vote short of override this week.

"Then, we could declare victory and all go home," said Rep. Charles Rangel, D-N.Y.

Once the bargaining was over and the deficit-reduction bill moved through the House, it was expected to have little trouble in the Senate.

The package nearing completion contained a jump in the federal gasoline tax to 14 cents a gallon from 9 cents. New levies also would be aimed at alcohol, tobacco, furs and costly private planes.

The ballooning costs of Medicare would be reined in by $44 billion over the next five years. Most of the reductions would be in payments to doctors and hospitals, but $10 billion of the cuts would come directly from the elderly and handicapped people the program serves.

Their monthly premiums for doctors' coverage would swell from $28.60 this year to $46.20 in 1995, and their annual deductible would be bumped from $75 to $100.

People earning more than $100,000 annually would lose some of their income-tax deductions and face a phaseout of the $2,050 personal exemption.

The income-tax rate on the 600,000 richest Americans would rise from 28 percent to 31 percent. The top rate on the 4 million next most well-to-do - individuals earning more than about $80,000 - would drop from 33 percent to 31 percent.

*****

(ADDITIONAL INFORMATION)

The budget proposal

- $140 billion in new taxes

- $100 billion in spending cuts for the next five years.

- Increase federal gasoline tax by 5 cents

- The income-tax rate on the 600,000 richest Americans would rise from 28 percent to 31 percent

- $2.5 billion in tax breaks for the gas and oil industry

- No requirement for state and local government workers to join Medicare

*****

How Utahns voted

All three members of Utah's House delegation voted for the Clean Air Act. Both Utah senators voted for the 1991 defense spending bill.