For Richard I. Queen, despair has special meaning.

"You sort of lost track of the days," the 28-year-old diplomat said today of his more than eight months' captivity in Iran, nearly four months of it spent in the basement of a little-used building in the U.S. Embassy compound in Tehran.

"Not only couldn't you see the sun, but you couldn't hear anything . . . You couldn't hear the traffic. You couldn't hear the birds. Once in a while you might hear an airplane -- that was it."

Queen said that as the weeks wore on, he wondered whether his ordeal, which began last Nov. 4, would ever end. "How come it hasn't ended? When is it going to end?" he said he repeatedly asked himself. He said he was forbidden to speak with the other American hostages in the basement: "Oh boy, that was depressing."

Occasionally he overheard his Iranian captors suggesting that the Americans would soon be released. "I would always raise my hopes up so high by saying it will end in two days," he said, "and then two days would arrive and they would be dashed."

Joy also has special meaning for the embassy vice consul, who was freed by his captors July 11 for treatment of multiple sclerosis.

When he was transfereed in mid-March from the basement room to quarters in the embassy's chancellery, Queen said he was overcome with delight.

In his new surroundings, Queen was able to talk with fellow hostage Joseph M. Hall, an Army warrant officer who had been moved from the basement with him, and they could look outside through a window for the first time.

"We were ecstatic -- we could talk," Queen recalled. "We just talked and talked and talked."

In their basement room, Queen and Hall had managed to exchange only infrequent, guarded whispers.

After they were moved, they talked incessantly -- about their families, their homes and other matters.

"We could look outdoors and see the mountains in the distance," Queen said.

"It was beautiful, it was fantastic. I can't even begin to describe how great the change was -- how elated we were, how high our spirits were."

Queen, wearing dungarees and a T-shirt and appearing relaxed despite his illness, recounted his ordeal as a hostage in a nearly two-hour interview -- the most extensive he has given since his return -- at his parents' home here.

He said he will recuperate here and plans to return to the State Department in September.

In the interview, Queen provided new insight and details of his eight-month captivity, frequently enlarging on an account he gave during a televised news conference last week.

While refusing to comment on a Washington Post report last week of a mock execution staged by Iranian militants, Queen disclosed that one of his captors placed a double-barreled shotgun to his head once after he responded bitterly to questions by an Iranian television interviewer. The gun was not fired, Queen said.

He said that the initially had refused to sign a petition calling for the return of the desposed shah Mohammed Reza Pahlavi (who died Sunday) to Iran, but that after prodding by the militants, he signed it because other hostages had done so and because he believed the petition would be recognized by the American people as "nonsense."

Queen said he was denied mail until Jan. 11, more than two months after his capture, and was not told until then that he could send letters to the United States. "They forgot about me," he said.

Queen underscored U.S. concern about several hostages thought likely to have received harsh treatment from their captors by saying he had not seen those hostages since soon after the Nov. 4 embassy takeover.

Among those hostages are William J. Daughtery and Malcolm K. Kalp, who have been denounced by the militants as CIA agents, and Michael J. Metinko, a political officer who has rarely been seen or heard from by outsiders.

But Queen cut short questioning about this issue, saying, "I don't know if I should be really going into this."

Queen said his captors initially stressed that the hostages would be released only after the return of the shah, but that eventually "you stopped hearing about the shah." He said the militants' aims grew increasingly less clear.

"There were no, it seemed, real objectives," Queen said. "You didn't know what they wanted -- How would this end?"

For this reason, he said, he has only guarded hopes that the shah's death will lead to the release of the 52 remaining hostages.

In his account of captivity, Queen described several phases: a comparatively light-hearted initial phase when release seemed likely within a few days, a long period of despair and increasing hopelessness, a time of adjustment to life as a hostage, and, for him, the weeks of illness that led to his release.

Queen arrived in Tehran, his first overseas diplomatic post, on July 11, 1979 -- exactly one year before he was flown out of Iran for medical reasons.

He said he had seen little of Iran before his capture. Nor was it where he had asked to be stationed, he said, his first two choices having been Beirut or Isfahan, Iran.

The embassy takeover was only partly foreshadowed by turmoil, he said. The staff had had a security briefing. Street demonstrations had occurred. But "we thought that things had been calming down -- that maybe this would blow over," he said.

Queen was among those diplomats and others who initially escaped during the embassy takeover after hiding for several hours in a consular building. Queen confirmed previous accounts of this episode and provided new details about his capture.

"It was scary, but it was also very exciting." Queen said in recalling U.S. officials' initial optimism when taken hostage.

Queen was with three other consular officials, a Marine sergeant and a general services officer, he said, when they were captured about three blocks from the embassy compound. They had turned down a ride from an Iranian civilian who was driving a small car. "I could have kicked myself later," Queen said.

Militants chased them on foot, he recalled, and one Iranian fired a shot in the air to stop them. "They escorted us back, calling us CIA," Queen said.

Queen said he was taken to a bedroom in the ambassador's residence. "We were bound at that time with nylon ropes. It hurt. It was cutting off the circulation. Plus, they had our hands behind our backs, which made it very difficult to sit," he said.

A tight blindfold hurt his eyes, Queen added.

He was given a date to eat, and he slept on the floor, his hands bound with torn sheets. Nevertheless, he said, the hostages -- several others were with him -- remained relatively cheerful, expecting to be freed soon.

The next day, Queen said, he was moved to a nearby room and tied to a chair. He spent about four days facing a wall and sleeping on the floor. It was during this time, he said, that the incident occurred in which the shotgun was placed to his head.

One night he was moved, with a blanket over his head, to the consular building, he said. More than 20 hostages slept there on the floor.

A guard nicknamed "the Weasel" purposely poured tea on his mattress, Queen recalled. The same guard, he said, gave this unusual order: "You may either read or otherwise you must sleep; but you may not do nothing."

After another move, Queen said, he was taken to the basement of the building nicknamed the "Mushroom," where he remained from late November to mid-March.

"I was there about the longest of anybody," he said.

Queen described the building as largely abandoned and used chiefly as a warehouse.

He was forbidden to speak to the other hostages there. The door to his room was kept open, he said, so that guards could make sure he was not talking. His hands were bound by sheets, he said. He was allowed to read Shakespeare and study French.

In the "Mushroom," Queen said, the hostages were given three American-style meals daily -- bread, butter, jam and tea for breakfast; spaghetti, steak or hamburger for dinner, and soup and bread for supper.

Hall, his roommate, exercised in the room, Queen said.

Queen eventually was given a board game to play in silence.

They were taken outdoors about once a week for 15 to 20 minutes of exercise, he said. A doctor nicknamed "the Quack" gave Queen vitamins when he became ill in December, Queen recalled.

At times, he said, the hostages got scraps of news by overhearing a radio broadcast or a telephone conversation. For example, Queen said he know of the Soviet invasion of Afghanistan.

He also overheard conversations suggesting the hostages would be freed soon, but when nothing changed, he became depressed.

By early January, Queen said, his despondency faded. He said he "psyched" himself into believing he was still a university student with considerable reading to do. He was put in charge of a library for the hostages.

Then in March he and Hall were moved to several rooms in the chancellery, where they were allowed to talk and had windows to peer out of. They were given paint for the walls of their quarters, he said.

In April, a third hostage, Charles Jones Jr., joined them. Poker games ensued, Queen said.

Later, he had two other roommates. When his illness became severe in early July, Queen said, he was hospitalized in Tehran. One month later, he was home.