Let loose in the world's arms bazaar, Iran and Iraq have used their oil wealth to buy the best weapons the United States and the Soviet Union could supply. But they appear to be fighting pillow-weight battles in their 38-day-old war.

Even with this limited use of weapons, Iraq and Iran have managed to deliver body blows to their economic jugular, the oil industries that fuel their economies.

Iran seems to be much worse off than Iraq, suffering from real oil shortages that are not only hampering its war effort but curtailing civilian travel and raising the specter of a long cold winter. Iraq has succeeded in knocking out Iran's major oil refinery at Abadan and its largest port, Khorramshahr, as well as the pipelines at Ahwaz and Dezful that carry oil to the rest of the country.

While Iraq's big oil refinery at Basra is out of operation and the one at Kirkuk suffered some damage in early air raids, there seems to be no serious shortage here.

It appears clear to analysts here thant Iraq hoped for a quick strike at Iran's oil riches that would bring Tehran to the bargaining table. Iraq seemed to believe that capturing Abadan and Khorramshahr would give it negotiating chips to win its real aim, complete control fo the Shatt-al-Arab waterway, which leads to the Persian Gulf.

Yet it appears that Baghdad completely misjudged its Islamic neighbor, overlooking the strong strain of Shiite martyrdom that pervades the new revolutionary Iran. It is this streak of martyrdom, according to analysts, that is keeping Iran in the war.

"I don't see what Iran gains from prolonging this war," said one informed observer. "It has lost Khorramshahr. By next week it will probably lose Abadan. It is not as if Iran is retreating to better defensive grounds or waiting for new supplies or looking for the winter to help. I am unable to understand their logic."

But the prolongation of the war has forced Iraq to rethink both its battle strategy and its political aims. Now, according to diplomats, it needs some sort of guarantees that will protect it from an Iranian revenge attack in the future, when it may be weaker than Tehran.

Iraq no longer has a military, political or economic game plan for the war but is merely improvising, which could be dangerous, said one diplomat here.

Once it realized Iran would not give up, Baghdad picked a military strategy of surrounding key cities and using heavy artillery to wear down the Iranian forces while limiting casualties among its own troops. This policy results in what appears to be a stalemate and offers few decisive victories to both keep the Army happy and provide propaganda for the civilians at home, said a diplomat well-experienced in military affairs.

For weeks, Khorramshahr was besieged with no real attack on it but with the daily pounding by heavy Iraqi artillery. There were few casualties reported then.

But during the pitched battles to secure the port city late last week, Iraq reported its heaviest casualties of the war -- more than 30 men killed each day -- and these reports, according to observers here, probably understated the true figures. Analysts here estimate that Iraq has lost 1,000 to 1,500 killed and about three times that number wounded in five full weeks of fighting.

The drawn-out war that follows from a low-casualty plan appears likely to wear down Iran, which is already feeling the pinch economically and militarily, long before Iraq, which, has ample stockpiles of military equipment, consumer goods and fuel.

Iraq appears to have stockpiled plenty of Soviet-made weapons, according to observers here, and because it did not throw its full Army into the battle at first, it still has fresh, fully equipped troops. Baghdad looks like a city of plenty, with no shortages of food or fuel.

Iran, however, is suffering from the fighting. There are shortages of food in the cities and fuel is strictly rationed to the point where long-distance bus service has been curtailed.

Iran's Air Force has been unable to maintain even the low number of sorties it flew early in the war, when it astounded Western observers who believed it would be kept on the ground by a lack of spare parts and maintenance during the 22 months of Islamic revoluntionary rule and continual purges of pilots.

Iranian planes still fly, but less frequently, and raids are often carried out by a single U.S.-made F4 Phantom jet, a move that is considered tactically unwise.

Iran's turbulent internal politics kept it from properly preparing for this war, which was signaled two months before it actually started by an intensification of border raids on both sides. Iran, however, failed to arrange to get new supplies into the country, a task made even more difficult by an economic boycott imposed in an effort to force it to free 52 American hostages held for almost a year.

Furthermore, Iran's zealous brand of Islam and the hostage-taking left it largely isolated in the world. "This is the war Iran could have avoided if it had some friends," a doplomat well-experienced in Middle East affairs said.

Iraq, on the other hand was ready, spoiling for a fight. As Foreign Minister Saadoun Hammadi showed diplomats here at a meeting Saturday night, it had carefully prepared its legal case for control of the Shatt and to prove that the war was caused by Iranian aggression. Although Iraq appears stunned by recent international criticism that accuses it of starting the war and of wanting to dismember Iran, Baghdad at first captured the propaganda advantages as well as those of the battlefield.

The shots are being called by Iraqi President Saddam Hussein, who has made this his war. No military heroes have been allowed to emerge in the state-controlled media and it is only Saddam's picture that appears full face. s

There are some here, however, who question whether a long, drawn-out war can remain popular -- especially if there is an increase in the numbers of taxis with flag-draped coffins on top, carrying soldiers killed in action back to their home villages.