David C. Anderson is a member of the editorial board of The New York Times. THE DEVIL'S BUTCHER SHOP

The New Mexico Prison Uprising. By Roger Morris. 260 pp. New York: Franklin Watts. $17.95.

It was possibly the deadliest and clearly the goriest collapse of order in the history of American prisons. Over 30 hours of a February weekend in 1980 at the New Mexico State Penitentiary at Santa Fe, prisoners crushed other prisoners' skulls with lengths of heavy pipe or hacked them to death with knives. With acetylene torches they tortured the living and mutilated the dead. The strong banded together and roamed through the cellblocks, pillaging, raping and murdering the weak like an occupying army.

Despite (or perhaps because of) its gruesomeness, the story survived on the front pages of the nation's newspapers for no more than a day or two, and it might be remembered now only in the nightmares of the survivors had not Roger Morris undertaken this riveting, upsetting and ultimately enraging investigation.

Mr. Morris reconstructs the riot itself in rawest detail, from the moment a group of inmates jumped a guard on early morning patrol to the release of the last hostage a day and a half later. At that point a reporter asked the hostage: '' 'What's it like in there?' The guard starts to answer, cannot speak, and breaks into tears.''