"Yellowbeard," at area theaters, wanders deep into the Torpid Zone. If there's ever been a more listless burlesque of pirate melodramas, its title has slipped into the fogs of forgetfulness. A similar, fitting oblivion should catch up with "Yellowbeard" in about, oh, 48 hours.

The idea is that Graham Chapman of the fading Monty Python troupe is supposed to be a scurvy, rapacious, foul-tempered pirate with a smoldering, frizzy profusion of yellowish beard and hair. However, you don't see this infamous brute doing much pirating. You don't even see much of him, period. One of the curious little ineptitudes of "Yellowbeard" is that the title character never gets firmly established in the scheme of things, such as it is.

Yellowbeard endures a 20-year prison sentence, protecting the secret of a treasure buried during his exploits on the Spanish Main. Confronted with an arbitrary extension of the sentence, he breaks out of jail and sneaks aboard a British man-of-war corruptly commanded by James Mason and bound for the Caribbean.

This vessel is also cluttered with several characters who think of themselves as Yellowbeard's confederates--Martin Hewitt as his son, Peter Cook as a dim-bulbed aristocrat who has raised the boy as his son, and Michael Hordern as a scientifically inquisitive physician--plus a set of old antagonists, Peter Boyle and the late Marty Feldman, who looks distressingly gaunt but contributes an expert knavish caricature in a thankless cause. The only other performer who distinguishes himself, John Cleese as a blind spy, is knocked off prematurely, further evidence of a severe shortage of smarts among the filmmakers.

This uninspired rogue's gallery is trailed by Eric Idle, an Admiralty sneak who arranged the extension of Yellowbeard's sentence in the first place as a means of provoking him to go after his treasure. Idle's baggage includes Madeline Kahn as Hewitt's mum and Yellowbeard's common-law wife, a bleary barmaid. The continuity consists of laborious updates on the principal factions on each ship, punctuated by an occasional guest appearance by Yellowbeard, who's hiding below deck with the livestock.

Ultimately, the voyagers anchor off an island ruled by Tommy Chong as a lisping despot called El Nebuloso. His chief flunky is played by Cheech Marin, who belabors an abasement shtick--banging his head on rocky surfaces--and sounds curiously Indian trying to affect a Spanish dialect.

It's difficult to believe that "Yellowbeard" was made because anyone seriously thought the material would suffice as even tepid amusement. The whole enterprise must have served larger purposes, like sheltering income for some needy group of investors.

I suppose one should be grateful that it provided so many familiar and often enjoyable actors with employment. Still, it compares so poorly with vintage entertainments like Burt Lancaster's "The Crimson Pirate" and Bob Hope's "The Princess and the Pirate" that you can't help thinking ungenerous thoughts of the "What a stupefying waste!" stripe.

Comedy hasn't been reliably funny in recent months, the Steve Martin comedy conspicuously included. "Yellowbeard" inters itself in the same graveyard cluttered with "The Survivors," "The Man With Two Brains," "Doctor Detroit," "Britannia Hospital," "Monty Python's Meaning of Life" and "Spring Break." After each of these groaners I've felt like making a beeline to Bill Forsyth's superlative "Local Hero" for a quick, reassuring pick-me-up. As far as I know, there's still no tax law that says you have to make only feeble, mirthless or swinish comedies. YELLOWBEARD

Directed by Mel Damski; screenplay by Graham Chapman, Peter Cook and Bernard McKenna; director of photography, Gerry Fisher; music by John Morris; production designer, Joseph R. Jennings; edited by William Reynolds; executive producer, John Daly; produced by Carter de Haven. An Orion Pictures release. Rated PG. THE CAST Yellowbeard . . . Graham Chapman Moon . . . Peter Boyle El Segundo . . . Richard "Cheech" Marin El Nebuloso . . . Tommy Chong Lord Lambourn . . . Peter Cook Gilbert . . . Marty Feldman