El Salvador's constituent assembly yesterday approved a law granting an amnesty to leftist guerrillas willing to lay down their arms, Reuter reported.

The bill was passed unanimously by 56 legislators and will go into effect May 12, an assembly spokesman said. Four legislators were absent when the vote was taken.

The amnesty excludes those guilty of murder, kidnaping or rape. About 700 Salvadorans now inprisoned on charges of guerrilla activity, having guerrilla sympathies or for possessing antigovernment propaganda could benefit from the amnesty law immediately, the spokesman said.

Political sources said up to 4,700 of El Salvador's estimated 5,000 leftist guerrillas could take advantage of the amnesty offer, which will be available for 30 days. But the rebels appeared unlikely to be swayed by the gesture.

Meanwhile, El Salvador's attorney general said he will appeal to the Supreme Court a lower court ruling Friday that dropped charges against an Army officer, a landowner and a businessman in the 1981 slaying of two U.S. labor advisers and a Salvadoran official, The Associated Press reported.

Attorney General Mario Adalberto Rivera filed a writ Monday saying he would appeal a mid-level court's ruling that said there was insufficient evidence to try the three in the deaths of labor advisers Mark D. Pearlman and Michael P. Hammer and agrarian reform official Rodolfo Viera. The court ordered two national guardsmen who have confessed to the killings to stand trial.