It was late Saturday night, and the chief of President Carter's congressional liaison team, Frank Moore, and Carter's press secretary, Judy Powell, were making one last effort to win house votes for the president's energy program.

Powell and Moore established themselves in an anteroom off the House floor, where they received a series of visitors. One was Rep. James Howard (D-N-J.), chairman of a subcommittee that had drafted a highway bill Carter deemed too expensive.

Powell asked Howard how he was going to vote on the energy legislation.

Howard asked Powell whether Carter would sign the highway bill.

Powell and Moore both said they could not make a committment for the president. At that, Howard turned to one of the House leadership's votecounters to asked how he was being listed on the energy legislation.

He was listed as a supporter of the energy package, the staff man replied.

"Well, make that 'No' - and I'll take three other New Jersey Democrats with me." Howard huffed.

Soon afterward Speaker Tip O'Xeil placed a call to Carter. The president said he would sign Rep. Howard's highway bill.

Oy. what a night, as a member of the New York delegation might have put it.Like the participants in an old fashioned marathon dance contest, members of the House and Senate waitzed, then stumbled, then struggled mightily t survive the prolonged session that ended the two years of the 25th Congress.

There was high political drama, like that confrontation with Rep. Howard, and low political humor, and a grest deal in between. Congressional dignity disappeared early; by the end, the stocks of food in the Capitol's restaurants had also disappeared.

The mood in both houses flitted among tedium, testiness and giddiness. The giddiness in the House may have reached its apex at about 2 a.m. Sunday when retiring Del Clawson (R Calif.) fetched his saxophone and began to play oldies but goodies in the Republican cloakroom.

His concerto was clearly audible on the House floor. So the members voted on the Financial Institutions Regulatory Act to the strains of Battle Hymn of the Republic, Auld Lang Sype and I'll Be Down to Get You in a Taxi, Honey.

In the Senate the marathon began with a filibuster that lasted nearly 15 hours. It was the work primarily of retiring James Abourezk (D-S.D.), whose stubborn indiviualism and sometimes quixotic behavior could infuriate the self-consciously proper Senate establishment, but whose dedication to many liberal causes remained intense through the final hours of his Senate term.

Abourezk has felt for months that the emerging energy program was a disaster for American consumers and an unconscionable giveaway to the oil industry. He decided to make one last effort to block or alter the energy program, knowing that his attempt would exasperate colleagues anxious to adjourn.

Abourezk's vehicle was the conference report on the tax aspects of the energy program, providing credits for energy conservation to consumers (which Abourezk approved) and large credits also to energy producers (which he opposed). By prearrangement, the Senate was scheduled to vote at 10 a.m. Saturday on a "cloture petition" to cut off debate on the energy tax measure.

That cloture vote carried easily, but under Senate rules, every senator can speak for an additional hour after cloture. With a handful of allies and a good deal of parliamentary resourcefulness. Abourezk tied the Senate up all day and night with quorum calls, appeals of parliamentary rulings from the chair, and votes on motions to recommit the legislation to conference with the House.

Abourezk loves attention, and he likes to clown around. For Saturday's debate he hired a "lame-duck intern," political prankster Dick Tuck, who sat by him on the Senate floor. But there was a method to Abourezk's madcap behavior.

His principal goal was to try to help allies in the House force that body to consider an alternate package of energy taxes that the Senate had originally approved minus the benefits for producers. Speaker O'Neill was determined not to let this happen, but Rep. Richard L. Ottinger (D-X.Y.) hoped he could move to adjourn the House after midnight, providing for the beginning of a new legislative day immediately afterwards. If this worked, Ottinger and others in on the plot hoped, they might be able to put their version of the bill before the House as new business in the new legislative day.

SO the filibuster continued into the night. The longer it went, the more nervous Sen. Howard Cannon (D-Nev.) got. He was not involved in the emergy fight, but he had a bill on aircraft noise control that he was extremely anxious to bring before the Senate. Abourezk he knew, had reservations about that bill, and it was scheduled to come up right after the energy tax legislation.

During the long filibuster Cannon approached Abourezk about cutting a dcal to let the aircraft noise bill come up. What would he want? Cannon asked.

Two things, Abourezk replied: assurance that Cannon would permit the Select Committee on Indian Affairs to survive for two more years (Cannon had been blocking this extension), and deletion from the aircraft noise bill of a provision that would have given airlines more than $3 billion in federal funds to help them buy new equipment to meet federal noise standards.

"He gave in on both of them."

Abourezk beamed late Saturday night. Not a bad day's work - I saved $3 billion, and helped the Indians, too."

However, Ottinger's gambit didn't work in the House. When Abourezk learned this schortly after midnight he called off the filibuster, and at 1 a.m. Sunday the Senate began the work it had hoped to start at 9 a.m. Saturday.

Did the anger of his colleagues upset Abourezk? Apparently not. He decided to quit more than a year ago, largely out of frustration with senatorial behavior, and since then his opinions have only hardened.

Late Saturday Abourezk appeared in the radio TV gallery of the Senate and was asked if he had any regrets about the impending end of his oneterm Senate career. With the cameras rolling, he replied:

"I can't wait to get out of this chicken - outfit."

If Abourezk hadn't delayed the work of both houses, the tax conferees from the House Ways and Means Committee and the Senate Finance Committee would have. They worked through the day and night to compromise their radically different tax-cut bills, and didn't finish until after Abourezk had abandoned his filibuster.

When the conference report finally got to the House Rules Committee on its way to the floor, Rep. Trent Lott (R-Miss.) wanted to know if a proposal to tie future cuts to spending cuts - known as "son of Kemp-Roth" because it was close to Republican tax proposal of that name - had been retained by the conferees. Both House and Senate had passed the proposal.

Rep. Al Ullman (D-Ore.), chairman of Ways and Means, fudged his reply:

"Well, there's kind of a son of a son of Kemp-Roth."

Rep. Barber Conable (R-N.Y.), also a member of Ways and Means, disagreed: "It's not even a second cousin!"

Game four of the World Series was played Saturday night, giving rise to the following spectacle:

Dedicated reporters, putting their work ahead of the baseball, sat in the press gallery overlook the Senate floor. A lesser number of dedicated senators sat on the floor, while a larger number watched the game on TV in the Senate cloakroom, a few steps away. Also, large group of reporters watched the game on a television in the room behind the press gallery.

At exciting moments in the game, cheers could be heard from the Senate cloakroom. This alerted reporters in the press gallery, who then ran up the stairs to their own television in time to see the replays.

Much of the Senate's time during the final marathon season was taken up with tributes to retiring members from their colleagues, a tradition as old as the Senate spitoon, now used only by Herman Taimadge (D-Ga.). These speeches can be perfunctory or even silly, but one set of them Saturday night was poignant.

Colleague after colleague arose to praise Dewey Bartlett's contributions as a senator and, more emotionally, his courageous fight against cancer.

Chemotherapy has caused all the Oklahoma Republican's hair to fall out in recent weeks, and his complexion is blotched. He tried repeatedly to thank his colleagues and cut off the talk. But every time he tried, another senator rose to add to the tributes.

Finally he got his turn. After a gracious thank-you, Bartlett made it clear that he thought the occasion was too solemn. "There are probably people in the gallery who don't know what I look like with hair," he announced, "so I'm going to show them." He extracted a Harpo Marx wig from the drawer of his desk and pulled it over his head. The Senate and the galleries burst into laughter, then applause.

The marathon final session began Saturday morning at the same time that Senate Majority Leader Robert C. Byrd (D-W.Va.) held his final weekly news conference of the year. After the usual back-and-forth with reporters in his Capitol conference room, Byrd announced a surprise.

He went across the room to a stereo set and began a record. It was his record, "Senator Robert Byrd, Mountain Fiddler," due to be released this week by County Records of Floyd, Va. Byrd let the record play for two rousing numbers.

Then he took out his fiddle and offered the collected journalists a brief recital: "The Bonnie Lass O'Bon Accord," Byrd said the song was called, "those plaintive highland tones you expect from Scotland."

Then Byrd went back to the Senate. This week, the business of Congress done, the majority leader will be signing copies of his new album in a local record store.