A restive House of Representatives yesterday approved an emergency farm bill with unexpected ease but killed a sweeping revision of immigration laws that has been years in the making.

The farm bill, which was sent to the Senate, would give Agriculture Secretary John R. Block the authority to compensate, with surplus government crops, farmers who agree to reduce their plantings. However, as Rep. Thomas A. Daschle (D-S.D.) noted, the so-called "payment-in-kind" (PIK) measure is "a rope that lasts about three weeks," since it would be subject to review by the new Congress early next year.

The Senate was expected to pass the bill this weekend.

The death of the Immigration Reform and Control Act, which would have imposed penalties on employers who hire illegal aliens, was an instance of majority will being thwarted by a minority. While the debate on all sides seemed to support the measure's ultimate goals of enforcing the nation's immigration laws and protecting U.S. jobs, Hispanic and other minority groups feared that punishing employers who hire illegal aliens would make them leery of hiring any Hispanics.

"We will not lie down," said Rep. Robert Garcia (D-N.Y.), who stood against the bill.

As the session concluded, the members gave Rep. Romano L. Mazzoli (D-Ky.), who shepherded the measure to the House floor, a standing ovation for his efforts.

The rare weekend session also approved a $7.5 billion Interior appropriations bill that would impose new constraints on Secretary James G. Watt. The measure, sent to the Senate, would bar offshore oil and natural gas leasing along the northern coast of California and would ban new oil and gas leasing in wilderness areas.

The peevish and exhausted members spent most of the afternoon bickering over the first of more than 350 proposed amendments to the immigration bill, then rejected it. Mainly, they were waiting impatiently for the Senate to pass a "continuing resolution" to keep the government from shutting down, so they could act on the funding bill, then go home for the holidays at last after a string of long days and late-night sessions that produced little.

The "barometric" frustration level in the House was "dry and windy," Majority Leader James C. Wright Jr. (D-Tex.) quipped at a news conference.

House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) seemed unusually ill-tempered, to the point that he started making up vote tallies. When the immigration bill came up and he perceived that Rep. Robert S. Walker (R-Pa.) was planning to "obstruct" the proceedings, O'Neill declared a quorum present when clearly there wasn't one, and then, after a pretense at counting, declared a 244-to-7 vote in favor of the procedural question at issue (for the House to meet as a committee of the whole).

House members hooted with laughter.

O'Neill said pointedly that the immigration bill was being considered only "as a courtesy to the administration and all those who have labored for years" for its passage.

Backers of the measure complained that the House had spent most of Friday on less important matters while debate on immigration reform was relegated to almost midnight Thursday and again a late hour on Friday.

The immigration bill would have granted permanent legal status to illegal aliens who were in the country before 1977, and temporary residence to those who came later, but prior to Jan. 1, 1980. The measure also would have provided civil and criminal penalties for employers who knowingly hire illegals, and set up a special program for employing immigrant "guest workers" in some agricultural jobs.

The number of illegal aliens in the United States is estimated at between 3.5 million and 10 million. The continuing flow of illegals into this country, exacerbated by Mexico's economic problems, is of intense concern to many.

Supporters have maintained that amnesty for illegals already in the country is the only way to enforce U.S. immigration laws and to avoid major disruption of current business and employment arrangements. They considered the four-tier penalty for employers who knowingly hire illegals the most important part of the bill because it would dry up the market for illegal workers.

Opponents argued that the measure would have placed onerous, "big-brotherish" administrative burdens on employers. And, to counterbalance the increased incentives for employers not to hire minorities in order to avoid the chance of being penalized, minority groups wanted a provision for legal redress for job applicants who could prove discrimination.

Garcia and other opponents yesterday urged their colleagues to put off action on the bill so that it could be considered at a less hectic time next year.

The "payment-in-kind" agriculture bill, which the House passed yesterday by unanimous consent, would use grain and other surplus commodities to compensate farmers who reduce surplus production.

Chairman Kika de la Garza (D-Tex.) of the House Agriculture Committee said: "The bill does not, as such, provide a specific new farm program. What it does is simply to clear up, at the secretary's urgent request, some gray areas in current law" so that Block can proceed to put the system into operation. The committee will review the program early next year, de la Garza said.

The bill would make clear that -- for the crop years 1983, 1984 and 1985 -- grain or other commodities given to farmers as payment for reducing crop production would not be subject to an existing restriction on resale prices for government-owned commodities.

It would also make it clear that payments-in-kind received by farmers would not be subject to an existing ceiling of $50,000 on farm support program payments to individual producers.