The A. H. Robins Co. "has done something wrong and something has to be done about it," a federal judge said tonight after three days of hearings on charges that Robins spent millions of dollars in violation of court orders.

Judge Robert J. Merhige Jr. said he will decide after another round of arguments next Saturday whether to grant a government request to name a trustee to run Robins and to hold the company in contempt of court for violating court orders issued after it filed for protection from creditors entered Chapter 11 last Aug. 21.

After hearing hours of testimony about how Robins came to spend millions of dollars without court permission, the judge told lawyers, "I want you to be thinking about it [what should be done]. That's all I can say for the moment."

Today's nine-hour session was marked by sometimes irreconciliable testimony by witnesses from Robins and the law firm that formerly represented it and by apparent management efforts to distance the family-controlled corporation from former executives William A. (Skip) Forrest Jr. and William L. Zimmer III.

A committee representing women who claim they were harmed by the Dalkon Shield birth-control device manufactured by Robins endorses the appointment of a trustee. Robins executives, claiming they have rooted out bad practices, argued that they should be left at the helm, and were backed by a committee representing stockholders.

One example of irreconciliable testimony originated on Thursday, when lawyers from Murphy, Weir & Butler of San Francisco -- Robins' original bankruptcy counsel -- testified that Robins general counsel Forrest told them "not to put anything in writing" lest it be found by attorneys suing the company in behalf of injured Dalkon Shield users.

The charge was first made by Murphy, Weir partner Margaret Sheneman and was repeated today by another partner in the firm, Penn Ayers Butler.

When Forrest took the stand, however, he testified that the charge is "an absolute lie. It's a ridiculous lie."

Other Robins officers -- Executive Vice President Robert G. Watts, Chief Financial Officer G. E. R. Stiles and Vice President H. Carlton Townes -- blamed Forrest for the decision to make payments that the court now says were illegal.

They charged that Forrest gave little attention to the court order that banned payments without court permission and led them with bad advice to innocently, but improperly, pay out millions of dollars.

Watts testified that he saw the court order for the first time on Feb. 27 and promptly recommended Forrest's replacement as general counsel. Forrest resigned the post on March 21.

Watts' version of events, however, was attacked by Murray Drabkin, lawyer for the Dalkon Shield victims, who cited voluminous evidence that the prohibition on unapproved payments was known to and even promulgated by Robins officers.

The government alleges Robins made deferred bonus payments to executives and ordered subsidiaries that were not involved in the bankruptcy case to make transactions that Robins was barred from making.

Robins lawyer Dennis Drebsky has acknowledged that payments were made without court approval, but said poor communications between company officials and a private law firm hired by Robins were responsible.

Forrest and Stiles testified they were told by a lawyer for the San Francisco firm of Murphy, Weir & Butler that the deferred bonus payments could be made to Robins executives.

However, Butler, the attorney they identified as giving that advice, denied saying that.

Butler testified that he told Forrest that deferred payments could be made only with court approval and that he did not think such approvals would be granted.

When the apparent misunderstanding came to light in March at a meeting of Robins' creditors, both Stiles and Butler said, they got mad. "I was extremely angry," Butler said.