Dr. Jeffrey R. MacDonald, federal inmate 00131177, remembers much of his year in prison with startling clarity -- the fire next to his cell at Butner, N.C.; what the police informer said to him in El Paso; the fight he almost started his last month at Terminal Island.

But perhaps the clearest memory is of a guard at Atlanta's fortress-like penitentiary. The huge, slow-talking man pulled MacDonald out of the line and discussed the problems of celebrity prisoners, like a Green Beret doctor named MacDonald convicted of murdering his pregnant wife and two children. His case had been so widely reported that the first prisoner he met on his way to prison instantly recognized him and told him of the heavy jailhouse betting on his trial.

"We got a real bunch of assholes here, doc," the Atlanta guard said. "They'll cut your throat for a nickel, a guarter, or just a line in the newspaper. Now when you get in the clothing line, take an extra shirt and keep it wrapped around your left arm, get some extra newspaper and put them inside your shirt as protection, and when you walk down the hall always keep one shoulder near the wall so you only have to defend one side."

During a bizarre tour of prisons across the southern United States and a long spell at Terminal Island here, MacDonald said he was only once threatened by violence. Most prisoners solicited his medical advice and he won the grateful protection of a mafia chief and motorcycle gang leaders. But even now, eight months out of prison, he still has his shoulder along one wall.

"I feel terrible," he said, during a three-hour lunch and interview at a Los Angeles hotel where he was attending a medical convention. "It's an incredible weight to bear, facing the Supreme Court decision [on whether he must return to prison]. I've gotten less confident with every step."

Today MacDonald is 37, a slim, goodlooking man with tousled hair streaked with gray. His Long Island-accented voice is given to small, ironic asides as he describes his prison year.

From Aug. 29, 1979, when he was led from a Raleigh, N.C., courthouse with chains binding his wrists, waist and ankles, to Aug. 21, 1980, when he was released in the midst of a media circus at the Los Angeles federal building, he learned a great deal about life and himself.

During MacDonald's first night at the federal correctional institution at Butner, N.C., shortly after the guildy verdict, the guards maintained a suicide watch, shining a light in through the food slot of the cell's steel door every 15 minutes. The second night, an inmate in an adjoining cell set fire to a mattress and smoke billowed through the small cellblock. "Doc, we got a problem," said the guard. "We can't let you out."

"You're going to have eight guys dead of smoke inhalation before long," MacDonald said.

"You see, doc," the guard said, "according to the rules we have to have two guards for every inmate we let out, and there's only me here now." After a long wait, more guards appeared and MacDonald and the others, choking with the fumes, were moved.

For several weeks, MacDonald was taken from prison to prison, as authorities shuttled him toward the federal penitentiary at Terminal Island out in Los Angeles harbor.

MacDonald's background and lifestyle had always been part of his case. At his trial, the prosecutors demanded he discuss girlfriends he had had before and after his wife's death. Prosecutors betrayed resentment toward his boat, his condominium and other signs of his comfortable California life after his family was murdered.

In prison, he became special also, but there were some inmates on the rungs above him. "When we got to Atlanta, they were just bringing in a Mafia subchief from Lewisburg [federal prison]. When he walked in the door, a trusty gave him a Havana cigar and a box of special food. We got a piece of bread that was moldy green."

On his way west, MacDonald said, he stayed in at least six prisons, each with its own special charms.

At Atlanta, shortly after being placed in solitary "for your own safety," he nearly strangled a trusty who blithely unlocked his cell door and entered in the middle of the night. "Hey, doc, we'll take care of you. Be cool," the man said.

In Jackson, Miss., inmates fearing Southern justice found to their shock "a clean little jail, spic and span, with good food cooked by the wife of one of the guards."

In Texarkana, Tex., he watched a paramedic team wait 45 minutes outside the prison gates before officials received permission to let them inside to treat a prisoner who had been stabbed. When young prisoners rattled their cell bars, guards pulled a few out of cells one at a time and beat them while MacDonald listened to the screams.

In El Reno, Okla., MacDonald spent five days in a former reform school turned into a penitentiary with a high percentage of young convicts, what prisoners call a "gladiator school." It was known for its high rate of prison yard violence.

In El Paso, MacDonald said, the border authority who usually turned illegal immigrants immediately back to Mexico always detained about 300 for a longer period each fall and put them in the lcoal prison so they could harvest the prison crops.

At the same prison, after requesting as usual a single cell, MacDonald was given a cellmate, a "tall, good-looking white guy" who he thought was a plan to get information for the government prosecutors. "He told me all about how he was a big dealer in Miami," a departure from the usual inmate reticent to admit guilt. He began to pepper MacDonald about questions about his case, but MacDonald cut him off.

At Terminal Island, MacDonald was made a clerk in the office handling training of guards. The federal prison rules prohibit doctor and dentist inmates from formally practicing medicine, even though MacDonald got out of prison before the official effort to lift his license had finished. "So I ended up being the unofficial doctor, in the yard, which worked fine," he said. "I would tell them what would be the right antibiotic to have smuggled into the prison for the diseases the real doctors wouldn't treat."

MacDonald coached one prisoner with a pacemaker to fake severe symptoms so the prison doctors would remove him to an outside hospital for a bad infection casued by the device, instead of continuing what MacDonald considered half-hearted efforts to treat it with antibiotics.

His appeals were in the courts, and when he was called to take a phone call at 6 a.m. July 21, he knew it was his lawyer, Bernard L. Segal, telling him the Fourth Circuit Court of Appeals had ruled in his favor. "It's over," Segal said.

MacDonald had heard that before -- in 1970, 1974, 1975, 1976, and 1978. Each time his attorneys used the same words when some legal victory in his tortured case seemed to put him out of danger. He could not summon the "joy and tears" anymore, especially when he discovered he would have to wait four more weeks while $100,000 bail was arranged.

A few prision friends visited him, saying "It's nice to have known you. We didn't think you belonged here, but be careful in the next few days."

Soon MacDonald realized what they meant. The trick in prison, he said, was to convince yourself that nothing mattered, to ignore thoughts of friends, family and Christmases so that each day seemed like the next and all could pass without heartache, without sanity slipping away. But now he had hope, and that meant trouble. When a motorcycle gang leader at the prison accused a friend of MacDonald's of being an informer, MacDonald became enraged and only avoided a fight at the last minute.

He had much he wanted to get out for. Two long relationships with women had collapsed in succession under the pressures of his case, but there was a third woman whom he very much wanted to see. Friends like his co-director at the emergency department at the St. Mary Medical Center in Long Beach, Dr. Stephen Shea, deparmtent head nurse Lois D'adario and insurance executive Dudley Warner had visited him in prison or put up their houses for his bail.

When he finally got home, his friends "all stood around, some turned away, not knowing what to say. I just walked around the place a bit and said, 'It's nice to be home.'"

After some reluctance, his hospital allowed him back at his job in the emergency room. His relationship with his woman friend broke off, and then began to heal again. "It was really hard; there was a lot of anger at all that wasted time," he said.

People who believe he is guilty, of whom there are many, do not confront him, he said. He has received 5,000 letters, only about 15 against him. "I don't feel any need to change people's minds about me," he said. "I don't have to explain myself to anyone anymore."