U.N. Secretary General Kurt Waldheim today appointed one of his top aides as a special representative in an effort to get negotiations started that could lead to an end of the 13-month Soviet occupation of Afghanistan.

The appointment of Javier Perez de Cuellar came after Waldheim conferred separately with the foreign ministers of Afghanistan and Pakistan, who are attending a meeting of the nonaligned movement here.

It appears, however, that there is a long way to go before talks actually start because of what Pakistani Foreign Minister Agha Shahi called "procedural blocks." He blamed this "setback" on the Soviet Union, which he said had stated one position to him in Islamabad, Pakistan, in December -- leading him to believe talks would be possible -- and another to Waldheim at the United Nations.

Waldheim was vague as to what Perez, 61, would do and U.N. officials traveling with him refused to elaborate. But Shahi suggested that Perez's first task would be to visit "concerned capitals" to iron out procedural issues blocking the talks.

It remains unclear what talks involving Pakistan, Afghanistan and other states could achieve since they are not expected to include rebel bands who are fighting the 85,000 Soviet troops in Afghanistan and who are believed unlikely to accept any settlement imposed from outside.

The Pakistani foreign minister, who declined to suggest what capitals Perez would visit, said in a press conference that talks were held up because: p

Afghanistan and the Soviet Union remained insistent that the U.N. representative be nothing more than an onlooker at the talks, while Pakistan wants Waldheim or his representative to play an active role.

Pakistan wants talks with Iran and representatives of the ruling Afghan People's Democratic Party. While Shahi said the Afghans have agreed to participate as the ruling party instead of the government -- a concession from its previous position -- they want separate negotiations with Pakistan and Iran.

This may be a moot point since the revoluntionary government in Tehran, in a change of position since the summer, now refuses to talk to the Afghan leadership under any conditions. It insists that it will only speak to the people of Afghanistan, defined as rebel groups fighting the authorities.

Waldheim conferred tonight with Behzad Nabavi, Iran's minister of state for executive affairs who is heading his nation's delegation here. Nabavi last month negotiated for Iran in the release of the U.S. hostages.

Shahi indicated he was pleased with Waldheim's appointment of Peruvian diplomat Perez. There was no comment from Afghan Foreign Minister Shah Mohammed Dost.

The Afghans have said they will not ask the Soviet troops to withdraw until they call outside military interference by Pakistan, China, the United States and Egypt ends. Once that happens, President Babrak Karmal said in an interview published in today's Times of India, Afghanistan will hold free elections.

At the press conference, Shahi again denied that Pakistan is arming or training rebel groups.

He said Pakistan wants unconditional withdrawal of the Soviet troops from Afghanistan, restoration of its nonaligned, independent status, a guarantee that the Afghan refugees -- about 1.5 million in Pakistan and another million in Iran -- can return home, and reciprocal guarantees of noninterference.

Shahi said he is insisting on the Pakistani-Iranian-Afghan talks with the active participation of the United Nations to make sure that Pakistan has world support in what he called "a global issue."

Moreover, he said, talks solely between the governments of Pakistan and Afghanistan would legitimize both the Babrak government and the presence of foreign troops and leave no basis for negotiating a troop withdrawal, he said.

When an Indian correspondent suggested Pakistan should go ahead with talks with Afghanistan, a position favored by the Indian government as well as the Soviet Union, Shahi asked angrily, "Why are you emphasizing bilateral and trying to force it on Pakistan? This is a global issue which has destablized the region and we are told to go bilateral. I think that India should take a more understanding view of the situation and you should not advocate the position of the Soviet Union."