President Reagan blamed "discredited" federal programs for the economic hardships of American farmers and warned today that he expects Congress to stick to its budget goals in writing a new farm bill.

Reagan used his weekly Saturday radio address to express sympathy for financially pressed farmers, but also to counter pressures for more spending as Congress writes a new four-year farm program.

White House officials said earlier that a budget-busting farm bill would be a likely Reagan veto target.

The president's warning came on the heels of government projections of a record 8.27 billion-bushel corn harvest and a near-record 1.96 billion-bushel soybean harvest this year. The abundance of crops could add billions to the federal deficit.

"Our administration has spent more on the farm program than any other administration in history," Reagan said today. "If spending more money on agriculture would solve the problem, we already would have solved it by now."

"Now, not all farmers are in trouble," he said. "Many are not. And it's important to note that those whose crops are the beneficiaries of government programs are worse off than those who operate without such assistance."

"For years now, federal farm programs have distorted the market and sent confusing signals to farmers," he said.

"Interventionist commodity programs have encouraged farmers to produce more than the market will bear while attempting to prop up prices," he added. "Today, we find ourselves with farmers who grow more than they can sell. And the result is low commodity prices and a depressed rural economy. And this in spite of how much we've spent.

"In 1979, for instance, the federal government was purchasing less than 1 percent of all dairy products at a cost of $250 million. Just four years later, in 1983, it was purchasing 12 percent of those products at a cost to the taxpayer of well over $2.5 billion a year.

"And its not just in the dairy program. From 1981 through this year, we will have spent just under $59 billion on farm price supports," Reagan added, or 3 1/2 times more than the previous administration spent.

Reagan blamed the economic "shocks" of the 1970s for current farm problems -- "grain embargoes, double-digit inflation and record interest rates at 21 percent." Many farmers were hurt when inflation slowed because their land values tumbled and they could not cover their loans, Reagan said.

He said the administration has made progress in helping farmers control costs with lower inflation and interest rates, but "the other half of the job is to free ourselves from the quagmire created by federal farm programs."

"Much of the problem stems from the past practice of lurching from one emergency program to another -- coming up with solutions that never solve anything," he added. The president did not mention his own administration's first-term emergency farm program, known as PIK, or payment-in-kind, which proved costly.

"The answer to our farm problems cannot be found in sticking with discredited programs and increasing government controls. The answer can only be found in our ability to help our entire agriculture industry stand on its own feet again," Reagan said.

The final budget compromise that Congress voted Aug. 1 assumes that $12.6 billion must be cut from current agriculture programs over the next three fiscal years. The House and Senate Agriculture Committees are working on different tracks to achieve those cuts.

White House officials say they are concerned that Congress will not be able to meet those targets. A task force of administration budget and farm specialists is studying ways to hold the line on costs in the new legislation.

In the Democratic response to Reagan's radio address, Rep. Mary Rose Oakar (D-Ohio) caustically recalled the president's supposedly off-the-record joke at the Gridiron Dinner last March, which was picked up in the media, that "I think we should keep the grain and export the farmers."

Oakar also accused Reagan and Vice President Bush of "callous disregard and contempt for civil rights" here and in South Africa. Oakar, who is secretary of the House Democratic caucus, said, "We Democrats are deeply concerned about the attack on civil rights by this administration . . . . Unfortunately, the Reagan-Bush team does not share our party's commitment to these values. They have demeaned civil rights with such terms as 'loony,' 'crazy,' 'cockamamie' and pernicious."