Agriculture Secretary Bob Bergland was hissed by protesting farmers when he told the Senate Agriculture Committee yesterday that the government's new farm program will raise farm prices if farmers cooperate and "give it a chance."

Bergland said he could "absolutely guarantee" higher grain prices if farmers participate in a strong program whose goal is to take 900 million bushels of wheat off the market until demand forces a price rise.

The secretary also rejected a proposal by Sen. Herman Talmadge (D-Ga.), the committee chairman, that would pump about $8 million into the depressed agriculture economy this year.

The Talmadge plan calls for the federal government to pay farmers $3.5 billion for taking crop land out of production, while also guaranteeing sharply higher support prices for corn, other feed grains, soybeans and peanuts.

The committee hearing was called in response to the now week-old protest by members of the American Agriculture Movement who have been lobbying here for a law that would require all farm commodities to be sold at 100 percent of parity, or higher.

More than 200 farmers, wearing red, orange and blue work caps with "farm strike" sewed on them, and some wearing sunglasses to shield against bright television lights, listened for nearly four hours as Bergland and committee members traded ideas on how to bail out the sagging farm economy. Early-rising farmers had filled the committee room by 7:30 a.m. for the 9 a.m. hearing. Nearly 1,500 ateempted to jam into the room, and those who couldn't get in milled around the halls of the Dirksen Senate Office Building.

Bergland promised that leaders of various farm meetings would get to meet with president Carter soon to discuss their proposals.

After Bergland said that farm prices would go up if farmers cooperated with the new agriculture program, Sen. John Melcher (D-Mont.) told Bergland, "I don't believe it."

As the cheers for Melcher subsided, Bergland added, "I absolutely guarantee it."

The cornerstone to the program calls for farmers to agree to store wheat (at last 800 million bushels) until the market price reaches 3.15 a bushel, which is 140 percent of the current loan rate (support price) of $2.25 a bushel. For farmers who do that, government will pay the 20 cents a bushel annual storage charge.

Farmers who want to hold onto their wheat (or corn of other feed grain in similar programs) may do so beyond the $3.15 price if they begin to pay the storage fee.

When the market price reaches 175 percent of the loan price, or $3.95 a bushel, the farmer then would have to sell his wheat or pay back all storage expenses.

Vocal opposition at the hearing to Bergland's praise of the program indicates "the need for a major selling effort to farmers," and Agriculture Department spokesman said.

Other major ingredients of the farm policy make it easy for farmers to get low-cost loans to build their own storage facilities, effort to expand overseas markets for American farm products, and seek an international agreement to raise the world price of grain.

Bergland said he prefers the storage program over talmadge's proposal to take great amounts of land out of production because "we can control the supply but we can't control the weather." He said a major food shortage could result from combining bad weather with reductions in planting.

Sen. Bob Dole (R-Kan.), the ranking minority member, and Sen. Henry Bellmon (R-Okla.) both complained that federal spending for agriculture would be reduced in the budget proposed by President Carter this week. Dole said a $3 billion reduction for agriculture was "somewhat disquieting," and Bellmon said it was "the only function where a significant cut was proposed."

Bergland mentioned, and USDA officials later further explained, that the President's budget merely reflects an estimate of weather conditions, which control federal spending for agricultural programs. The 1979 budget proposal includes more, not less, money for specific farm subsidies, the USDA said.

There was little discussion of the threatened strike by farmers, although Sen. Melcher said "it might make sense for some individual farmers." But he agreed with Bergland that a better plan is to store surpluses, which Melcher said was "money in the bank" for farmers.