With the Philippines' first presidential election in a dozen years scheduled for Tuesday, the government of President Ferdinand Marcos is showing signs of worry about a boycott movement by the political opposition.

Although the reelection of Marcos is widely regarded here as a foregone conclusion, his government apparently fears that a light turnout on election day would tarnish the mandate he seeks to extend his 16 years in power.

Consequently, the government not only has been bombarding Filipinos with appeals to participate in Tuesday's election, but it has threatened to prosecute those who stay away. A 1978 law makes it a crime not to vote.

In pressing for a big turnout, the president has invoked religion in this predominantly Roman Catholic country, quoting the late Pope Piux XII as saying citizens have a "moral obligation" to vote. However, church leaders here charged that Marcos quoted the pope out of context, and Cardinal Jaime Sin declared yesterday that the decision on whether to vote was a matter of individual conscience.

Sin said a citizen could conscientiously decide not to vote if "he is convinced that the election process is manipulated to produce a predetermined result."

Taking a different tack in the campaign to get out the vote, the president's wife, Imelda, who is mayor of Manila and a Cabinet minister, urged an amnesty for those who failed to vote in an earlier plebiscite, provided that they vote in Tuesday's election.

Nevertheless, opposition leaders insist they will go ahead with the boycott, and about 5,000 supporters of the movement gathered in central Manila yesterday to protest what they called the "fake election." The opposition charges that Marcos has rigged voting in the past and that this election will be no different.

"Most of these people are tired of Mr. Marcos tampering with the vote," said a 25-year-old university student attending the rally. "We're in favor of of the boycott because we believe peaceful means of change have been exhausted."

One of the leading groups in the boycott movement is an umbrella organization called the United Democratic Opposition, composed of eight moderate political factions. A number of leftist groups also are backing the boycott, and the rally featured an unusual number of members of, or sympathizers with, the outlawed Communist Party, including some that a local photographer recognized as guerrillas in the Maoist New People's Army.

He said this was the first time he had known the groups's fighters to come to a public gathering in Manila from their mountain stronghold in the provinces, where they have been waging a guerrilla war against the Marcos government.

In a sign that the opposition is becoming increasingly polarized, one labor leader at the rally issued a thinly veiled call for the protesters to "go to the hills" and join the fighters. Other speeches were punctuated with calls from the crowd for "revolution."

Forthe most part, however, the peaceful five-hour demonstration took place in an almost festive atmosphere. Ice cream and fruit vendors did a brisk business, and one youth drew laughs with a poster portraying Marcos as Hitler.

The mood was summed up by a banner in the local dialect that needed no translation: Eleksong Presidensal Hokus Pokus."

Earlier in the day, Marcos had addressed a vastly larger crowd that gathered in another part of the city to watch parades and ceremonies marking the Philippines' independence day. The gathering at times indistinguishable from a political campaign rally, heard Marcos harangue his opponents as purveyors of a "colonial mentality" and accuse them of "mendicancy toward the foreigner, especially the Americans."

It was unclear exactly to whom Marcos was referring. One of the candidates running against him is campaigning on a platform of American statehood for the Philippines. Only slightly less pro-American is the other leading opposition candidate in the race, a 69-year-old retired general.

Although the boycott advocates regard these candidates as no more than token opposition encouraged by the government to give the election a semblance of authenticity, the candidates have been publicly attacking Marcos lately with increasing vehemence.

In separate interviews, both accused Marcos of campaign irregularities and said they doubted the election would be fair. Voicing complaints similar to those of the boycot advocates, the candidates also accused Marcos and his wife of corruption and abuse of power.

"We call them the conjugal dictators," said Gen. Alego Santois, the candidate of the Nationalist Party who is considered Marcos' leading opponent in the contest. Santos and the statehood candidate, Bartolome Cabangbang, insist they could win a fair election and bristle at the charge that they are not serious candidates.

"If I can prevent the fraud of Marcos, I'll beat the hell out of him," the feisty Cabangbang said. "The people are very angry at Marcos. My main problem is how to keep him from cheating."

Despite this aggressive rhetoric, the government clearly is more concerned with the boycott movement. Backing up the government's threat to prosecute nonvoters, a court earlier this week sentenced two Manila residents to 30 days in jail for failing to participate in an April 7 plebiscite. The plebiscite was organized by Marcos to ratify a constitutional amendment providing for a six-year presidential term with no limit on reelection.

Previously, the Philippines' constitution limited a president to two four-year terms like the U.S. Constitution. Marcos was serving the third year of his second term in 1972 when he declared martial law in a move that opponents charge was basically intended to keep him in office. Marcos ended more than eight years of martial law on Jan. 17 and soon afterward called for the constitutional amendment and a new presidential election.

After considering whether to field a candidate to challenge the 63-year-old Marcos, the United Democratic Opposition decided in April to boycott the election, a strategy that leaders say is having the desired effect.

"Marcos has never been so rattled as today," said the group's co-chairman, former senator Gerardo Roxas. "He's worried the bycott movement will really show him up."

Earlier this week, the elections commission recommended charging Roxas and 21 others with failing to vote in the April 7 plebiscite. If convicted, Roxas could face up to six months in prison and disqualification from running for public office in the future. Nevertheless, Roxas says he is sticking to his position to boycott the election.

I suppose I'll be charged again after June 16," he said in an interview. "But I do not believe it is possible to hold a free and fair election under Marcos."