The queen of England showed how royalty rolls out a red carpet, with a history-making banquet tonight for a former Hollywood actor who wound up playing the castle as president of the United States.

Those who had them wore their diamond tiaras and those who didn't just wore their diamonds. Most of the royal family, including the prince of Wales, Princess Margaret and Princess Alexandra, turned out to welcome the president, his wife Nancy and an entourage of White House officials whom British journalists here have dubbed "the Reagan Court."

When it came time for the traditional toasts, Queen Elizabeth II donned her horn-rimmed reading glasses and spoke solemnly about the crisis in the Falkland Islands being "thrust on us by naked aggression, and we are naturally proud of the way our fighting men are serving their country.

"But throughout the crisis we have drawn comfort from the understanding of our position shown by the American people," she said.

Reagan did not specifically refer to the Falklands in his toast, but he said "that the greatest glory of a free-born people is to transmit that freedom to their children. That is a responsibility our people share. Together, and eager for peace, we must face an unstable world where violence and terrorism, aggression and tyranny constantly encroach on human rights."

The white-tie dinner was given by Prince Philip and the queen--who wore a white silk gown with gold embroidery, a pearl-and-diamond tiara, necklace, earrings, and a blue sash, pinned with bejewelled decorations, diagonally across her chest--for the Reagans and 154 other guests. The 146-foot, 10-inch table ran the length of St. George's Hall.

Since the queen doesn't have enough pieces in any one set of royal china to feed 160 people off the same pattern, two patterns were used tonight. The Reagans, who found a similar problem in the White House, overcame it when a rich donor gave them money to buy a service for 220.

If they happened to notice the queen's china tonight, it was drawn from an 18th-century Tournai service, called De Buffon after the French naturalist, and a Royal Minton dessert service made for Queen Victoria. Even the flatware had some strays among it.

"A part of the tradition is to use a number of historic pieces," said John Haslem, assistant press secretary to the queen.

Each guest had five wine glasses, all emblazoned with the Garter star and royal emblems, for the selection that included a 1971 Chateau Langoa Barton, a 1976 Wallhauser Pfarrgaigen Spatlese and 1969 Polroger champagne, which was a favorite of Winston Churchill.

Setting the table took all day--and even required walking on it. One waiter with his feet wrapped in towels traversed the length of the table, positioning candelabra and other items from the queen's collection of gold and china.

Before dinner, the queen and Prince Philip and the Reagans posed for photographs. With eight photographers using high-intensity flashes, the light was overwhelming. When a palace spokesman told the photographers they had "30 more seconds," the queen exclaimed, "Oy!"

"All right," said the spokesman. "Ten more seconds."

The dinner guests, seated in gold chairs with red upholstered seats, were divided among 18 "serving stations" requiring more than 100 waiters. Everybody had a place card except the queen. As one palace official explained, "she knows where to sit. She's done it before."

On the queen's right sat the president, looking alert if humble after nearly a week of grueling travel and meetings. And on her left sat Secretary of State Alexander M. Haig Jr., looking alert.

Across the eight-foot-wide table sat Nancy Reagan, wearing a new long-sleeved white Galanos gown. Her jewelry consisted of a spectacular-looking necklace with matching earrings.

Sheila Tate, the first lady's press secretary, said tonight that the necklace, which looked like diamonds, was an "imitation." She was unable to confirm whether the earrings were those on loan to Mrs. Reagan from the New York firm of Harry Winston. Recently, however, Tate had said Mrs. Reagan would bring the borrowed diamond necklace and earrings that Winston made available for her use more than a year ago.

In the royal procession with the president, the queen, Prince Philip and Mrs. Reagan, as they filed into St. George's Hall, were Prime Minister Margaret Thatcher, the Archbishop of Canterbury, the Lord President of the Council and the Lord Privy Seal. Lady Diana, who is expecting a baby within the next few weeks, did not attend, nor did the queen mother.

One conservative member of Parliament told some American reporters covering Reagan's speech earlier today that the queen was known to be "a bit unhappy" about all the White House aides, including a presidential food taster, invading the scene at Windsor.

Asked later if the president's menu tonight would be the same as the queen's, Haslem said curtly, "Absolutely--there is one menu."

Tonight, the queen's chef Peter Page began with smoked Scottish salmon. There was roast lamb and typical British vegetables--beans, cauliflower and potato croquets--a mixed salad and a raspberry dessert called "Framboise St. George."

As candles flickered from golden candelabra set among arrangements of roses, sweet peas, peonies and other English summer flowers, the president noted that it was from Windsor, west of London, that Richard the Lionhearted departed for the Crusades and also from Windsor that his brother King John went to nearby Runnymede to sign the Magna Carta.

"It is a rare privilege to be a momentary part of the rich history of Windsor Castle," the president said.

In fact, Ronald Reagan had spent a day making history, starting with a horseback ride through Windsor Great Park with the queen and continuing with a midday speech before a meeting of both houses of Parliament at Westminster Palace.

A spokesman for the queen set the record straight during a press preview in the hall, where the dinner was held, when he said that an American president had never before been entertained at Windsor.

"Woodrow Wilson did not stay at Windsor Castle. Woodrow Wilson stayed at Buckingham Palace," said Haslem.

"This is the only banquet ever given for an American president at Windsor Castle."

Haslem also called tonight's dinner a "banquet" and not a "state banquet" because the Reagan visit is not a state visit.

To a bunch of just folks, though, it was hard to tell the difference. There were footmen wearing scarlet livery decorated with gold braid, scarlet plush knee breeches, pink stockings and shoes with black buckles. The senior staff wore black and gold braid livery with white wool cloth breeches, stockings and black pumps with buckles.

The Yeomen of the Guard in their red uniforms were stationed on the Grand Staircases when guests arrived and then moved into St. George's Hall to stand at intervals behind the guests.

"Please don't use the word beefeaters," one of them told reporters during the preview. "They're paid employes of the government and we don't get paid. We do it purely for the love of our dear Majesty."

Then he added, laughing, "We hope your president isn't going to do too long a talk--would you mind dropping a hint? We were awfully busy this morning at Westminister Palace ." The Yeomen, who come from throughout England, are ex-warrant officers with at least 20 years of military experience, and are selected by the queen.

In her toast at the banquet, the queen remarked that she had been impressed with the president's professional handling of a strange horse--"and a saddle that must have seemed even stranger." He had requested and ridden English saddle, as opposed to Western, which he usually rides.

When the ride began in the morning the queen displayed some impatience when Reagan paused to joke with reporters. She slowly rode off, leaving him to deal with the reporters' questions.

Before the trip, the queen was reportedly upset that some White House aides suggested how and where she might ride to give photographers their best shot--a suggestion politely but firmly rejected. One palace official was quoted as saying the queen "does not intend to ride in a posse."

Bringing up the rear was Prince Philip, at the reins of a carriage, with Nancy Reagan, who was wearing a gray pantsuit, at his side. One report in the London paper, The Standard, described them as "two people well known for their playing of second leads."

And tonight, the queen and the president were still on center stage. The queen took note in her toast of her visit to the United States on the occasion of the Bicentennial and said that "200 years before that visit one of my ancestors had played a seemingly disastrous role in your affairs. Yet had George III been able to foresee the long-term consequences of his actions, he might not have felt so aggrieved about the loss of his colonies."

King George III had been on Reagan's mind earlier when he addressed Parliament. He told about his first visit on British soil, a diplomatic dinner at the British Embassy in Washington last year, given by Prime Minister Thatcher.

There was a portrait of King George III staring down at him from the staircase and Thatcher said then she hoped he wasn't distressed to find it there.

"She suggested it was best to let bygones be bygone and--in view of our country's remarkable friendship in succeeding years, she added that most Englishmen today would agree with Thomas Jefferson that 'a little rebellion now and then is a very good thing.' "