Ayatollah Ruhollah Khomeini's appeal for a massive demonstration of Islamic solidarity turned out an impressive crowd today but fell short of the show of unity that the hard-pressed revolutionary leader's followers had predicted.

There was seant evidence of disaffected middle class Tranians or the rebellious Leftists that have been the source of much of the opposition to Khomeini. Most of the demonstrators who marched peacefully to Iran's parliament were working class, fervently religious residents of central and southern Tehran.

Khomeini's appeal for an outpouring of solidarity was his most recent attempt to rally support in the face of increasing difficulties for his rule. He has repeatedly turned to polemic recently to divert Iran's drift toward anarchy and civil war, which many of his critics say is inevitable.

The 79-year-old revolutionary leader has been issuing three or four statements a say from his headquarters in the holy city of Qom, many of them brooding and rambling tracts whose beseeching tone bears little resemblance to the strident, visionary speeches he made when he returned triumphantly in February from 14 years in exile.

Those confident - even boastful -attacks on Wesfern imperialism and the predictions of an invincible nation of Islam have given way to plaintive attempts to incite his followers against "satanic" counterrevolutionaries.

Now, his messages hark back almost nostalgically to the overthrow of Shah Mohammad Reza Pahlavi and "the walls of strangulation and colonialism," as if designed to divert attention from the chaos in his hand-picked provisional government.

In an extraordinary admission of the extent of disaffection in Iran, Khomeini in a speech Friday candidly referred to the "attacks on me, contempt for me," which, he said, were intended to "scatter the still-unopened bossoms" of the revolution.

Then, openly acknowledging a phenomenon that five months ago was unthinkable, Khomeini noted that critics have been burning posters bearing his image and chanting abuse, including a cry hauntingly reminiscent of the shah's final days-"Death to Khomeini!"

But what is viewed by some disillusioned followers as the most telltate sign of weakness in Khomeini's insistance that the challenges to his authority are simple diversions that should not attract unnecessary attention.

Calling for calmness in dealing with "these conspiracies and these devilries," Khomeini warned, "if you pay attention to little problems. . . you will be left with the main problems unsolved."

An Islamic republic official, once an ardent supporter of Khomeini and a revolutionary street fighter who has concluded the ayatollah should step down, shook his head wearily and said in an interview, "People are burning pictures and he gives a speech saying not to react. He hasn't the slightest idea what is going on."

Another early supporter, an Iranian journalist, said, "Khomeini is not a politician. He doesn't know what to do and the same is true of his advisers."

Today, crowds estimated by observers at about half a million in southern Tehran and taken together, several times that number elsewhere in Iran turned out to affirm their support for Khomeini.

The crowds created a hopeless tangle of traffic in this capital city of 12 million, and filled many narrow streets in a sprawling and densely populated area, making it impossible to accurately gauge the size of the demonstration.

Pars, the official government news agency, declared that 2 million participated.

But to impartial observers, the turnout never approached those of mid-November when Khomeini, from his exile in France, effortlessly produced antishah marches of 1.5 million or more, and in February, when more than a million greeted his arrival here.

There was no violence during today's march to the parliament, where a generally youthful crowd of men and large numbers of women clad in black full-length veils chanted revolutionary slogans.

The organizing committee had broadcast orders to marchers not to carry arms and to avoid slogans or placards that could incite opponents to violence.

"Neither West nor East, we are united in Islam," went a repeated refrain, referring to the revolutionary government's intention to be nonaligned.

In an obvious attempt to shore up the image of the almost disintegrated army of the Islamic republic six F4 Phantoms repeatedly streaked over the demonstration at rooftop level, to the cheers of the Khomeini supporters. Most of the heavily equipped air force has been idle since the shah fled