There may be some confusion in the Reagan administration about policy in the Middle East, but not on location for the filming of "Death Before Dishonor," Hollywood's latest Rambo-style boilerplate about how Arab terrorists should get it in the neck.

The bad guys wear Viet Cong-like black pajamas and the red-checkered kaffiyeh headdress usually associated with Palestinian nationalism. The good guys wear the camouflage jungle fatigues of the U.S. Marine Corps. It doesn't take long to figure out which side is going to win the shootout.

For six weeks, a picturesque 15th-century mosque and hospice 20 miles east of Jerusalem in the sun-bleached Judean Desert has reverberated with machine gun fire and M-79 rocket-propelled grenade explosions as Hollywood macho star Fred Dryer has tried to outmayhem Sylvester Stallone and at the same time apply a little revisionist history to the Marines' tragic encounters with Arab gunmen in Lebanon.

The prophet Moses is said to be buried in Nebi Mousa, and presumably with him the commandment "Thou Shalt Not Kill." Almost everybody dies in "Death Before Dishonor" -- either cut nearly in half by machine gun bullets, blown up by grenades or impaled by a high-speed drill bit.

"It's strictly in the American theme of things. The hero, Gunnery Sgt. Jack Burns, really does stand up for what the Marine Corps' 200-year tradition is about," said producer Lawrence Kubik, whose previous Hollywood experience includes managing the careers of Stallone and Arnold Schwarzenegger.

Dryer, a former professional football player who stars in the television action series "Hunter," said that if the American public's frustration over Libyan strong man Moammar Gadhafi and the Middle East's penchant for terror is eased even just a little, the film will have served a purpose other than entertainment.

"I've seen 'Rambo,' 'Commando,' 'Delta Force' and the rest. The truth of this film -- compared to the others -- is sticking to the American theme, which is the Marine Corps," Dryer added.

His director, Terry Leonard, a former Hollywood stunt man best known for his gripping action sequences in "Raiders of the Lost Ark," agreed.

"I think a lot of America's frustrations will come out in this film. Americans are really fed up with this terrorism business. The hostages in Lebanon drive me nuts. Every time I hear of somebody being held hostage, I go crazy," Leonard said.

While professing no intention to convey a political message -- "This is entertainment, just cowboys and Indians in the Middle East" -- Leonard said audiences can draw their own conclusions and "if the shoe fits, wear it."

The plot -- what there is of it -- unfolds in a fictitious Arab country in North Africa named Jemal, where a rebellious cabinet minister tries to destabilize his government by blowing up the U.S. Embassy and kidnaping a Marine colonel named Halloran, played by Brian Keith.

Halloran is taken to a terrorist camp in the desert where he encounters a Vanessa Redgrave-type Palestine Liberation Organization guerrilla-cum-news photographer (played by "Gorki Park's" talented costar, Joanna Pacula) and a few cretinlike Arabs who disfigure him with a high-speed drill bit before he manages to plunge the whirring drill into the heart of his torturer.

Who would guess that Pacula is really an agent of the Mossad, the Israeli spy shop, which is coordinating an attack on the terrorist camp with former Los Angeles Rams defensive end Dryer? How could anybody predict that Dryer, in a few short minutes, could blow away 46 Arabs with a few bursts from his Galil automatic rifle?

In the end, Dryer guns a Marine Corps jeep off the edge of a desert cliff, crushing to death the last two Arab terrorists, Maude and Gabril, played by Casey Walker and Muhammed Bakri.

Fade out and cut. The United States does have a Middle East policy.

Speaking with a reporter who in October 1983 watched the bodies of 241 Marines pulled from the rubble of their blown-up billet in Beirut, and a year later watched the frightened remnants of that force depart Lebanon ignominiously in amphibious landing craft, producer Leonard offered his view of the problem in the Middle East.

"The Middle East situation has been unjustly portrayed in the American press. They have exaggerated the danger way out of proportion. I feel safer here than I do in downtown Los Angeles," said Leonard, who arrived at Nebi Mousa in an air-conditioned stretch Mercedes limousine from Jerusalem's Hilton Hotel.

He added, "When I left L.A., people actually said, 'You don't want to go over there. It's really dangerous.' Where do people get these ideas? I feel really safe here. What's the problem?"

The problem may be Abu Jihad, a sinister Arab terrorist portrayed in the film by Rockne Tarkington, who, like almost everybody else in "Death Before Dishonor," dies in the last reel.

Kubik, who also wrote the screenplay, confessed that in the original script, Tarkington's character was named Abu Jihar -- a name that does not exist in Arabic. At the last moment, he said, it was changed to "Abu Jihad," not realizing that it is the same nom de guerre used by Khalil Wazir, PLO Chairman Yasser Arafat's second-in-command and head of the Fatah military wing.

When informed that one reporter visiting the "Death Before Dishonor" location planned to meet with Wazir the next week in Amman, Leonard replied, "The hell with him if he can't take a joke. That's what they're doing this terrorism for anyway -- to get publicity -- so he ought to be happy."

But an hour later, while visitors to Nebi Mousa were preparing to leave, Kubik drew them aside and asked that if they were planning to "talk with any Muslims," would they please not mention "Death Before Dishonor" until the cast and crew had left Israel.

"We'd like to get out of here before you talk to them about this," said Kubik, seemingly throwing the film's Arab-bashing machismo to the winds. "Some people around here aren't very happy about our shooting here."

Never mind. The Bible says that Moses never actually entered the Land of Canaan. He could never have been buried in Nebi Mousa.