Twelve years after their antitrust battle began, International Business Machines Corp. and the Justice Department each rested its case in a New York City federal courtroom yesterday, ending the longest phase of an unprecedented legal war of attrition.

But with summations in the case still at least seven months away, IBM yesterday made a new bid for a settlement before a verdict, saying that recent appellate court decisions had knocked the foundation out from under the government's case.

Thomas D. Barr, IBM's lead attorney in the five-year-old trial, asked for a conference with William F. Baxter, head of the Justice Department's Antitrust Division and with U.S. District Court Judge David N. Edelstein, the 71-year-old trial judge.

Barr claimed in a memo to Baxter that two recent appellate decisions upholding two other industrial giants -- American Telephone & Telegraph Corp., and Eastman Kodak Co. against antitrust charges -- have crippled the government's case. Those decisions, "together with the vast changes in the industry since 1969, compel [us] to find a way to stop this unprecedented waste of public and private resources," the memo said.

Baxter, however, still is studying the case and will not discuss settlement possibilities until he is done, a spokesman said, offering no prediction on when Baxter can finish that task.

Millions of words and thousands of documents ago, the Justice Department began its case against IBM. In a complaint filed in the final working days of the Johnson administration, the department charged that IBM had monopolized the market for "general purpose" computer systems used in business operations and had used this alleged power to control its competitors during the 1960s and early 1970s. The government's case went to trial before Judge Edelstein nearly six years ago.

Today, IBM is no less massive: Its worldwide revenues last year exceeded $72 million a day and has remained the second-most-profitable corporation in the world during the 1970s, behind Exxon Corp.

Barr's contention yesterday was that even if Judge Edelstein rules that IBM had a monopoly over the market in question -- a point Barr doesn't concede, or course -- the government can no longer hope to prove that IBM behaved illegally, because of the recent appellate rulings.

One key part of the government's case is that IBM used its wealth to finance price wars against competitors who were trying to get footholds in various parts of the computer business, selling IBM products at low prices that denied the competing firms a sufficient profit. IBM, the government argues, was able to afford the temporary loss of revenues, particularly when competitors fell by the wayside.

The government has relied heavily on IBM memos which seem to show top company officials following a price-cutting strategy. One such document reported on a meeting of IBM top executives in 1965, when the company's competition with Control Data Corp. was discussed.The memo's author, IBM attorney H.B. Farr noted that Control Data had publicly blamed its declining earnings on IBM, "and its frequent model and price changs. There was some sentiment that the charges were true," Farr wrote.

Closing arguments in the trial are set for Jan. 6-9, and then Judge Edelstein would begin to write his opinion.