Momentarily distracted during a vote on the floor of the state legislature recently, Prince George's County Sen. Thomas P. O'Reilly, a candidate for Gladys Spellman's seat in Congress, hurriedly asked the president of the Senate to add his belated vote to the final tally. "Don't worry," said Senate President James L. Clark, Jr., "it won't affect the election."

Clark's wry remark was in keeping with the talk of Annapolis these days. Along with the ususal list of legislative matters, the special election for Maryland's 5th District seat occupies the lawmakers' attention.

Among the 32 contenders are a legislative gang of four, including Senators O'Reilly and Edward T. Conroy and Delegates Stewart Bainum, Jr. and Francis W. White. They are an unlikely menagerie of hot dogs, underdogs and dark horses, prancing and prowling the political pathways they hope will lead to Capitol Hill.

To the frequent amusement of their colleagues, they-who-also-run walk a tightrope in a two-ring circus between the legislative arena and the campaign trail. The timing of Tuesday's primary in the midst of the session has given them the worst of both worlds. Dutiful legislators are seldom heard on the stump. Dutiful campaigners are seldom seen on the floor.

At one end of the spectrum is O'Reilly, "here mornings, afternoons and evenings," he notes. At the other is Bainum, who, by his account, has missed only one committee meeting but numerous floor votes he considers less crucial.

"He's on the floor when he believes it's important to be on the floor," said Richard Lazarnick, a campaign aide to the wealthy and ambitious Montgomery delegate. "O'Reilly is not taken seriously and wouldn't gain by heavy campaigning, while Bainum has taken himself from zero and made himself a serious contender," he said.

But here in Annapolis, serious doesn't always play well. In a recent committee meeting, for instance, Bainum began a discussion of legislation with the words, "I've been going door to door . . ." Before he got any further, his colleagues, poking fun at his campaign efforts, interrupted with a raucous chorus of "why?"

"Can we keep order, please," Bainum said, plunging on to assert the issue at hand -- probate reform -- was much on the minds of constituents.

Communicating with voters another day caused him to miss a floor vote on a cable television reform measure. "Stu Bainum I would've counted on for the vote but he's out campaigning," lamented Del. Luiz Simmons (D-Montgomery) after his cable bill went down to defeat by an admittedly decisive margin. During a reconsideration vote a few days later, Bainum was present, but his affirmative vote failed to reverse the previous outcome.

Always seen but seldom heard is Francis White, the former Prince George's council chairman elected to the House of Delegates in 1978. White takes credit for only one "major legislative initiative" this session -- which has failed to emerge from committee -- and seldom speaks on the floor.

Thus, his remarks on the budget, backing committee cuts, were widely noted if not reported here. "I felt it was a time to be a statesman," said White, who says his "most difficult problem" is "to get across that I am running."

Conroy, for more than a decade the state senator from Bowie, tried last year to become the U.S. senator from Maryland. Now, in his bid to become a freshman congressman, the statehouse veteran recently made congressional redistricting, certain to produce regular news coverage, his legislative -- many say his political -- priority.

But, broad skepticism greeted Conroy's plan to hold a hearing on the controversial issue and propose legislation in the closing weeks of the session. As a result, attendance at the hearings was sparse and coverage, nil.

His effort, however, did not go unnoticed on the Senate floor where fellow legislator Laurence Levitan (D-Montgomery) announced tongue-in-cheek that his committee would meet that night -- when Conroy would be away campaigning -- to consider its own redistricting plan.

Conroy chairs the Constitutional and Public Law Committee but during the campaign has ceded much of the floor work to Vice-Chairman Norman R. Stone (D-Baltimore County). The other night, Stone stood to defend a committee-passed measure under attack, with Conroy silent and seated nearby. Said Stone, "It seems like I've been on my feet all year on very controversial issues."

And then there's Steny Hoyer, the former president of the Maryland Senate whose co-campaign manager is Prince George's Sen. Tommie Broadwater and whose spirit still lingers in these marble halls. In debate over abolition of the so-called "sunset" law under which allegedly useless state boards face extinction, one senator the other night recalled the reformist fervor that accompanied the bill's passage in 1978, when then President Hoyer was running in place for a higher elected post.

"It was a hoax because one of the people [pushing it] was running for office," Sen. James C. Simpson (D-St. Mary's). "He still is," quipped Sen. O'Reilly, also candidate O'reilly and a Hoyer opponent. Broadwater, meanwhile, dozed in his seat.

The next day in the Senate finance committee, television cameras were rolling when O'Reilly, the quipster, tried to play it straight. He denounced a racetrack measure he said would only cause problems next year "for those of us who'll be here."

"Don't worry, Tom," the committee chairman said, "we'll call you in Washington."