Polish Premier Wojciech Jarulzelski today promised firm action to prevent anti-Soviet incidents but maintained a generally conciliatory line toward the independent Solidarity trade union organization.

Addressing the Polish legislature, Jaruzelski announced the removal of five Cabinet members, in what appeared to be an effort to halt a skidding economy as well as to ease Solidarity criticism, but he also complained of what he saw as a lack of support for his own efforts.

Calling for greater social discipline, Jaruzelski compared Poland's situation to a ship foundering on the high seas.

Jaruzelski outlined a long-delayed program for economic reform and an overhaul of the country's top-heavy planning structure.

He attempted to allay Moscow's concern about developments in Poland while simultaneously emphasizing the need for gradual economic reform.

The parliamentary session had been postponed from Tuesday because of fan emergency meeting of the Communist Party's Central Committee that was called to consider a harsh Soviet letter demanding a halt to Poland's liberalization. In his speech, Jaruzelski concentrated on Poland's dire economic plight, which he said had been complicated by delays in negotiating a moratorium on repayment of a huge hard currency debt with Western banks.

The Cabinet shakeup included replacing five ministers, among them the deputy prime minister in charge of planning, Henry Kisiel. A former finance minister, Kisiel is well known in Western banking circles but has been criticized recently by the Polish news media and Polish officials.

Also replaced was Justice Minister Jerzy Bafia, who was the object of considerable public criticism for the way he handled investigations into alleged police violence against Solidarity workers in the northern town of Bydgoszcz in March. His report on the incident was "corrected," after Solidarity complained that it was one-sided.

The new minister of justice is an experienced legal expert, Sylwester Zawadzki, who was responsible for drafting a new trade union bill that was submitted to parliament today. The bill would formally recognize the right to strike for the first time ever in a Communist-ruled country.

Referring to anti-Soviet incidents in Poland, including the defacing of several Soviet war memorials, Jaruzelski, who is also a general, said no toleration could be shown "for madmen who want to set our home on fire."

"Every anti-Soviet attack on Polish territory is a scar on our honor. It is an insult to our ally, liberator and defender, an insult to the guest in the host's home," he said.

Jaruzelski echoed a passage in the Kremlin letter to the Polish Central Committee that pointedly stressed the Soviet Union's financial assistance to Poland and its supply of essential raw materials such as oil, gas and iron ore. Some Polish analysts think the Kremlin might consider limiting these supplies to pressure the Warsaw leadership to follow a more acceptable policy. s

Jaruzelski called on factory managers to clamp down on the printing of Solidarity pamphlets containing criticism of the Soviet Union or of Polish authorities.

Jaruzelski said Poland faces an acute shortage of hard currency to buy essential raw materials and spare parts to keep industry running. This, he said, was due partly to drawn-out negotiations with private foreign banks to reschedule debt payments and partly to a sharp drop in traditional Polish exports such as coal.

Polish newspapers today reported Solidarity leader Lech Walesa's call for reason and common sense in dealings with the government. Addressing workers, Walesa said Solidarity should concentrate on looking after its members' welfare rather than getting too involved in politics.

The picture of the economy painted by Gen. Jaruzelski was even bleaker than when he was appointed premier in February. He said Poland stands "on the brink of a great catastrophe."

Industrial production in May, he disclosed, was 18 percent down compared with the same period last year. Coal production dropped 20 percent and absenteeism was up 90 percent, he said. At the same time, incomes rose, creating an excess of $16 billion of demand over supply.

"Polish workers work shorter hours, produce less, but earn more. This is the paradox of the situation," Jarulzelski said. "The mountain of money is sucking almost every product out of the market. Lines are getting longer, chaos on the market deepens, and speculation grows."

Long lines formed in Warsaw and other Polish cities today for gasoline, the latest item in short supply.

Jaruzelski said the empty shops proved it was impossible for the government to continue to meet trade union demands for pay increases.