Judge Bruce Beaudin checked the clock: Ten minutes past 9. He would have to hurry. "What's Bill Erhardt's number?" he asked his law clerk as he reached for the phone to call the court's top legal assistant.

On the judge's morning schedule was the sentencing of Donald Kenner, a 24-year-old cook at a fried chicken outlet convicted of selling $20 worth of cocaine to an undercover police officer on Aug. 30, 1985. Beaudin, 46, a plain-talking former public defender who built a national reputation modernizing bail laws as director of the D.C. Pretrial Services Agency, had decided Kenner should not receive a mandatory prison sentence of 20 months for the cocaine conviction because Kenner used drugs.

In his hand, though, the judge held a letter from federal prison authorities with disturbing news. They had examined Kenner and concluded that he was not an addict, and therefore didn't qualify for the treatment alternative Beaudin planned.

When he reached Erhardt, Beaudin asked whether he could sentence Kenner to a federal treatment facility anyway, no matter what federal officials thought. The judge beamed as he hung up the phone and walked toward his courtroom.

"Just what I thought," Beaudin said. "It doesn't matter what they say." He sent Kenner to the federal treatment center in Danbury, Conn., where Kenner would be eligible for parole at any time.

The sentence was just another small victory for Beaudin in his battle with what he sees as an intrinsically bad piece of legislation, Washington's mandatory sentencing statute that requires automatic prison terms for drug dealers.

Not all judges are as determined as Beaudin. But collectively they have defused the legislation's intent, aided by seasoned court employes such as Erhardt who in the past three years have combed the law books looking for every possible way around the sentencing law.

"I don't think that people who vote in a referendum on a mandatory minimum understand what they're doing when they vote," Beaudin said. "Nobody can foresee the circumstances of an individual case which will require, almost cry out for, the rejection of a mandatory minimum."

In Beaudin's view, the law robs him of his role as a judge who fits punishment to the crime, and he considers it his duty to fight back, sentencing people the way he sees fit and not according to the blanket call for prison that underlies the sentencing statute.

The judge said he chafes at anything "that is going to tie my hands on something where I can't make an exception in an individual case."

In the four months he has been hearing felony drug cases, Beaudin said he has found that the law is "like the tax code" because of the loopholes it contains. He said he feels perfectly justified working around it, because "if they voters wanted everybody, there'd be no exceptions in the statute."

Most of the defendants who come through his courtroom, Beaudin said, don't deserve lengthy mandatory terms. Of 114 drug cases filed with Beaudin since January, 52 defendants have entered guilty pleas to reduced misdemeanor drug possession charges and 26 have been convicted of felony distribution counts while the 36 others are still awaiting trial. Most of the felony offenders are awaiting sentencing. Beaudin so far has exempted two as addicts and given seven others mandatory terms, in four cases suspending all but the minimum sentences required.

"Half of these kids who are selling this PCP don't know, don't appreciate what they're doing," he said. "They figure it's a quick way to make bucks to bring to their families or to buy their clothes." What's more, he is convinced that drafters of the law knew from the start that his method of sentencing would prevail.

"It's false advertising by the people who want the law passed," he said. "Because that's not the way it works. And everybody that passes it and writes it knows that's not going to be the way it works."

Under his arm as he walks into court is a worn, brown file folder containing what he calls "my little cheat sheet," a single page from a legal pad listing the many tips he has picked up from Erhardt and more experienced judges for handing out sentences other than those prescribed in the mandatory sentencing law.

For instance, he accepts the claim by prosecutors in the U.S. attorney's office that previously convicted addicts -- whom the law targets for an automatic prison term -- don't have to receive a mandatory term if the government files no official notice of the prior conviction. Prosecutors, he said, should be able to "sweeten the pot" when they make a plea bargain with defendants.

"We've got a lot of cases. And there's always that subtle pressure to dispose of as many cases as you can because it's like a hole in the dike," he said.

He also uses a less restrictive test than some other judges when deciding who is an addict and potentially exempt from the mandatory terms. In one recent case, he placed a 31-year-old woman convicted of peddling heroin on probation to enter a drug treatment program after examining her arms for needle or "track" marks. But he later said, "Those weren't recent tracks. They were scars."

Like Beaudin, many judges contend that community residents who approve laws like the mandatory sentencing measure simply don't understand what a judge does or what the track record for Superior Court judges has been.

"I think the judges on this bench care enough about the community and the defendants to be able to make those judgments. And I think they make them in a way that is consistent with the community's wishes," said Superior Court Judge Nan R. Huhn, who directed the city's prosecution of juvenile offenders for the D.C. corporation counsel's office before she was appointed to the bench in 1983.

"I don't think the community would be terribly upset if they looked at our regular sentencing practices," said Huhn, who contends that judges are locking up those people who deserve to be in prison.

Behind the voter initiative that placed the sentencing statute in the D.C. criminal code was a sense in the community that drug dealers weren't being punished. Police and neighborhood residents frequently complained that pushers who were arrested seemed to be released right back onto the streets.

Most of the dealers whom police arrest still remain free pending trial -- as required by the city's bail law -- and typically it takes months before the charges against them are finally resolved in court. In the meantime, some are arrested repeatedly.

Sentencing is a different matter. Convicted drug sellers now face longer prison terms.

Before the sentencing measure was enacted, the Post sample showed, the majority of convicted drug sellers went to prison -- usually for at least a year before they were eligible for parole and often for several years.

Among offenders convicted of distributing heroin and other narcotics in a 1981 sample, the average minimum sentence was one year and 11 months, compared with four years required by the mandatory sentencing initiative. In a sample chosen in 1983 after the new law went into effect, the average minimum prison term for selling narcotics had grown seven months -- or 31.6 percent -- to two years and six months.

Judges worry that the chances for unfairness increase when they must hand out sentences regardless of what they see in an offender's background.

Judge Steffen W. Graae recalled two defendants who had minimal criminal records and sold small amounts of drugs but received long prison terms because "I had no discretion whatsoever." He said, "It was quite a shock."

While the options available to judges under mandatory sentencing are few, they are broad enough that exceptions can be made in a majority of cases.

For instance, the law permits judges to waive prescribed sentences for narcotic addicts, and they wield vast discretion in deciding who was selling drugs to support a habit.

The other two most widely used alternatives were not spelled out in the legislation and had to be drawn from provisions elsewhere in the criminal code.

Under the youth offender sentencing law, judges can bypass the mandatory prison term if the defendant is convicted before his 22nd birthday for any crime but murder.

The federal Narcotic Addict Rehabilitation Act recognizes cocaine as an addictive narcotic. The statute enables judges to seek drug treatment for cocaine addicts caught selling drugs. Under D.C. law, which does not recognize cocaine as a narcotic, prison is the only option. NARA is expected to be eliminated sometime in the next year when new federal sentencing guidelines are approved.

It took many months before judges fully understood their options. The court had no systematic approach for applying the new law. The late H. Carl Moultrie I, in his years as chief judge of Superior Court, prohibited court employes who specialize in sentencing from sending judges unsolicited literature on how to use the law and its alternatives.

A few of the judges recognized as more knowledgeable in Superior Court conduct brief seminars on how to apply the many complex sentencing laws, but not all judges attend the seminars or follow the same procedures. Nor do they share sentencing philosophies.

As a result, although one of the goals of the law was to make drug sentences more evenhanded, sentencing practices remain widely varied.

Superior Court Judge Ronald P. Wertheim, for example, believes that prison often is the best place for drug peddlers, even though in many cases they are people "born and growing up in circumstances in which they feel absolutely hopeless and helpless."

"We can't undo the past for them and there they are," Wertheim said. "They're dangerous and the rest of the community is entitled to be protected from them. And they voters don't seem to have been able to find any better way to protect themselves than to put them behind bars."

The Post's 1983 sample of 100 defendants indicted for drug distribution involved too many different judges to draw definite conclusions about overall sentencing practices of individuals. In the sample, though, Wertheim gave prison sentences in every case, compared with Judge Graae and Judge Nicholas Nunzio, who placed more offenders on probation than they did behind bars.

Wertheim and Senior Judge Joseph M.F. Ryan imposed more mandatory minimum sentences than any of the other judges in the sample, while Judge Warren R. King's sentences were about equally divided between incarceration and probation.

For Beaudin, the issue entails more than weighing guilt and punishment.

"I'm more at the level of, it costs me X amount of dollars as a citizen, as a member of this community, to put this guy in a cage and feed him and maintain an existence which is dehumanizing," he said.

"And I suspect that we do a lot of wheel spinning, blowing our money the wrong way. Caging human beings can only reduce them to the lowest level of the animal structure. Aren't we better off if we can keep him in the community and get him to make a positive contribution?"