They are brought to the fields in buses and trailers to work usally by 8 a.m. Clad in white cotton uniforms, they advance in long, silent rows picking cotton or corn, or hoeing wees from east Texas pastureland. As they work, guards armed with 38 revolvers slowly follow.

For most of the 24,500 inmates of the Texas Department of Corrections, the largest state prison system in the country, working on "the line" is what prison is all about.

At any time, half the state's prison population is doing this regimented agricultural work. All able-bodied male inmates in the TDC spend at least the first few months of incarceration on "the line." Some never do anything else.

The hard work and discipline of "the line" are basic to the TDC's operating philosophy.

"There is a law on the books that says that people commited to the TDC will work," said state prison system director W. J. Estelle. "And, whether some of our inmates or some of our observes like it or not, the expectation of the community, at least in Texas, is that these people will work while they are here."

According to its many admirers, the TDC is the best prison system in the United States. "They do well all the things prisons are supposed to do," said C. Paul Phelps, director of the Louisana Department of Corrections. "They keep you in, they keep you busy and they keep you from getting killed.

But last week, the first wave of what is expected to be 80 TDC inmates testified in federal court in Houston about overcrowding, inadequate medical care, unsafe working conditions and brutality toward inmates by guards in a civil rights suit brought by seven prisoners.

The U.S. Justice Department, which was ordered to join the suit by U.S. District Court Judge William Wayne Justice, will also present expert testimony on conditions in the TDC by corrections experts such as Arnold Pontesso, former director of the Oklahoma prison system, who in a written deposition called the TDC "probably the best example of slavery remaining in the nation."

The Texas attorney general's office, which is defending the prison system, plans to answer with about 200 witnesses in a trial expected to last more than three months.

The suits, called Ruiz vs. Estelle, is the largest federal civil rights action brought against a state prison system. David Ruiz, a 37-year-old "jail-house lawyer" who is serving a 25-year sentence for an armed robbery conviction, is one of the inmates who brought the suit.

Ruiz and his fellow "writ writers" claim prison officials have harassed them with threats, punitive work assignments, and long periods of solitary confinement because of their attacks on the TDC.

Another "writ writer," Allen Lamar, testified last Thursday he was charged with "inciting mutiny" by a prison captain in October - 1977 - when he attempted to have about 100 prisoner affidavits notarized as evidence for the Ruiz case.

The affidavits concerned the use of inmates by prison officials as defacto guards and informants. Such inmates are known as "building tenders," "porters" and "floor boys" inside the TDC, said Lamar, a Fort Worth native serving 25 years for a robbery-by assault conviction.

Allegations about "building tenders" will be an issue in the trial. Historically, inmates "building tenders" were used in many understaffed southern prisons to control locks, award comforts and administer punishment to fellow prisoners.

Federal court orders in other states have outlawed the "building tender" system, and in 1973 the Texas legislature passed a law prohibiting TDC inmates from acting in any supervisory or administrative capacity.

However, inmates testimony in the Ruiz case is expected to include allegations that "building tenders" still administer beatings and enjoy such privileges as lending money to other inmates at usurious rates and selling beverages from their private refrigerators.

Ed Idar Jr., the assistant attorney general who is lead defense counsel, conceded some of these allegations may be true, but said he will seek to prove they are rare and isolated.

Idar admitted that many of the state's 15 prison units are overcrowded. A recent national study found the TDC prison population to be at 240 percent of capacity. In the last three years, the number of TDC inmates has increased by more than 40 percent.

"Prison construction is about five years behind what is needed," Idar said. "But no one could have predicted that the public attitude would harden as it has. Juries in this state, and in the nation, are coming back with more convictions and longer sentences."

Idar estimated that if the court orders the TDC to follow Justice Department guidelines on prison construction, all 15 units of the state prison system would have to be replaced. The cost of building new prisons might run as high as $1 billion, he said.

The possibility that the TDC may face some expensive federally ordered changes as a result of the Ruiz case is strengthened by the fact the case is in Judge Justice's court.

During 10 years on the federal bench is east Texas, Justice, a former U.S. attorney who describes himself politically as a "populist," has displayed a willingness to issue unpopular rulings, ranging from school desegregation orders to an injunction against clear-cutting in the state's national forest.

In 1974, in a case similar to the Ruiz suit in some respects, Justice ordered the dismantling of the state's system of reform schools for juvenile offenders.

Justice and Idar have already clashed over the defense attorney's lengthy cross examination of inmate witnesses. At one point Thursday, Justice asked Idar if he was "filibustering" and told Idar he had "had his fill of" Idar's seemingly meandering questioning.