The snow-haired dean of the Maryland Senate sat silently in his red leather chair as younger senators tore into each other for 10 hours, debating an ominously thick bill entitled: Racing -- Consolidation of Tracks."

At last, Sen. Frederick C. Malkus Jr., the raspy-voiced lawyer who has represented the Eastern Shore for 34 years in the General Assembly, rose to offer his perspective on the measure: "Now, everyone knows that this bill is a swindle," he barked, his eyes twinkling. "But the pleasant part of this swindle is that it doesn't hurt us out on Eastern Shore. In fact, it doesn't effect us at all."

Several hours later, when a crucial test vote was called on a controversial amendment to the bill, he quietly flipped his switch to "yea."

So it is that the most loudly condemned bill of the 1981 General Assembly session -- a $12 million bailout and reorganization of Maryland's troubled thoroughbred horseracing tracks -- has survived to the closing legislative legislative day, and now appears to have a better-than-even chance of being enacted just before the bell tolls at midnight today,

Like Malkus, most members of the General Assembly have no personal stake in the issue of horseracing, aside from a certain wariness over the string of political scandals it has spawned. Most say they do not have the patience to sort through the often-warring interest groups that balkanize the industry.

As a result, the political fortunes of Maryland racing are dominated by two sasoned legislators -- Paul Weisengoff (D-Baltimore) in the House, and Melvin Steinbergy (D-Baltimore County) in the Senate--who have managed to master the subject. In interviews, 20 legislators said they voted for the bill because Steinberg, Weisengoff or Gov. Harry Hughes asked them to, or because they got pet amendments for their districts inserted in it.

"I think the real danger of this issue is ignorance," said Sen. Arthur Helton (D-Harford), architect of a kay compromise amendment to the bill, who said he was himself fairly ignorant on the subject until two weeks ago. "Everybody's afraid to look at any bill that has anything to do with a racetrack, so nobody learns what's really at stake. They just look out for They just look out for themselves."

At issue is the future of Maryland's financially troubled racing industry, which generates about $600 million a year in business around the state, and the extent to which the state should get involved in halting its decline. But those issues have been pushed to the background in floor debates, which concentrate more on the parochial interests of legislators who support or oppose the bill.

Thus, the saga of this year's racing bill--the most ambitious since the downfall of now-imprisoned former governors Marvin Mandel in a racing-related scandel -- is a study in microcosm of Maryland legislative politics.

It began in mid-February, on Friday the 13th, when Hughes unveiled his surprise plan for rescuing Maryland's $600 million-a-year horseracing industry from financial ruin.Hughes, according to aides, hoped that his honest image would rally legislators to his cause and dispel the fears that have haunted racetrack legislation ever since the Mandel case.

The plan quickly came under attack for its central and most politically explosive feature: a state bailout of two thoroughbred tracks, Laurel and Pimlico. Hughes proposed to buy out the 96-day racing season of Bowie Race Course, the third major thoroughbred track, for $6 million -- a figure set by Bowie's owners as their nonnegotiable price for bowing out of Maryland racing. Diverting to Laurel and Pimlico all of the business that now belongs to Bowie and the Timonium fairgrounds track, which Hughes also proposed to close, would help overcome the financial ills of those two remaining tracks, Hughes predicted.

It was soon revealed that the state technically already owns the Bowie racing season, since it is the legislature that authorizes each day of racing.

Legislators complained loudly of a "swindle," and "windfall profits" for the three tracks' owners. Competing interests in the industry were each attacking the plan as a "bonanza" for everyone except themselves.

It seemed that the plan was dead, and that the industry would have to treat its own ills for at least another year.

Two weeks ago, it resurfaced, dramatically redrafted by Weisengoff, who chairs the House subcommittee on racing. "If I want it, it'll pass. If I don't, it's dead," boasted Weisengoff, who is legendary for his vote-brokering skills.

The revised proposal was vastly more ambitious than the first. It called for the state to become a track owner, by buying out and operating the Bowie track for at least two years through the auspices of a newborn Maryland Racing Authority. Only after that would consolidation take place. Moreover, the pricetag had doubled to $12 million -- again, a nonneogotiable figure set by Bowie's owners -- because the bill now proposed that the state buy out Bowie's land as well as its racing season.

Hughes announced his support for Weisengoff's extensive amendments, saying they overcame the political problems of buying something as intangible as a racing season. Also, Hughes long had advocated the establishment of a state-run authority to run all racetracks in the state.

Nonetheless, many members of the House Ways and Means Committee were wary. Voicing the same objections advanced at each later stage of the bill's movement through the legislature, they complained that the plan was too complex to accept on such short notice. The idea of a state-run racetrack had not even been aired at a public hearing, several of them pointed out. Others worried aloud that taxpayers want less government rather than more.

Weisengoff warned that the committee, in its skittishness, was about to sacrifice the future of a crucial industry. Finally, at a late-night meeting called hastily two weeks ago, he urged the committee to vote for his bill. "Let's do something -- even if it's wrong," he insisted. All but six of the 16 present committee members voted to send the bill to the House floor.

Weisengoff lobbied intensively for the measure, calling it the key to saving a major industry, but most votes turned on more narrow concerns. For example, the Prince George's County delegation refused to deliver its support until amendments were added guaanteeing that the state would pay the county for any economic losses -- direct or indirect -- caused by the closing of the Bowie track. This includes loss of sales tax revenues from nearby restaurants that serve track spectators.

The bill handily passed the House, enhancing Weisengoff's image as a champion vote-getter. But it seemed doomed in the Senate, because of stiff opposition in the Senate Finance Committee, where a majority of the members complained that they did not know enough about what they were voting for.

Hughes hastily called Steinberg and Helton to his office, and worked out a compromise saying that any contract for the buyout of Bowie would not take effect until approved by the legislature in a joint resolution next year.

That dispelled most of the Senate committee's fears, and the bill was sent to the Senate floor, where it was hit with 50 more proposed amendments intended either to limit the power of the racing authority or to sweeten the package for certain delegations.

Sen. Francis Kelly (D-Baltimore County) came up with the narrowest special-interest amendment of the night, when he asked the Senate to require Pimlico, as a condition of the consolidation bill, to build more women's rest rooms. Kelly said he proposed the amendment, which passed handily, because his wife had to wait in line for more than an hour before getting into the rest room at last year's Preakness, Pimlico's nationally famous event.

"I was just sitting there listening to all those amendments get proposed and I thought: 'What the hell? I'll stick it to 'em," Kelly said. I call it the Janet Kelly amendment."

The 10-hour attack by opponents of the bill came to an end when supporters agreed to weaken it even further, by stripping the proposed racing authority of its power to issue bonds.Thus, in order to buy out Bowie, the legislature would have to pass a $12 million bond issue next year -- an election year.

The bill comes up for a final Senate vote today, but even that will not determine its fate since the Senate's version is significantly different from the House's, and will have to go to a House-Senate conference committee for a final compromise.

There its fortunes will turn on yet another parochial battle. Weisengoff has let it be known that he believes the Senate version of the bill does too little for his favorite portion of the industry, the harness tracks. He says he will kill the whole bill if the harness tracks, where jockeys race in horse-drawn sulkies, do not get extra assistance. A testy Steinberg says he will resist any changes. "If Paul wants to kill the bill, that will be his decision," Steinberg vowed.

Meanwhile, the racetracks' highpaid lobbyists have become so frustrated by the continuing changes in the bill that many have stopped trying to follow it. Said lobbyist James Doyle, who represents Laurel and Pimlico: "If we were dealing with religion, I wouldn't mind talking about broad concepts. But this isn't religion, this is racetrack legislation. And every detail counts."