David Lloyd, the great TV comedy writer whose scripts included “Chuckles Bites the Dust,” has passed away. According to the Internet Movie Data Base, Lloyd worked on 33 episodes of “The Mary Tyler Moore Show” as either the sole writer or executive story editor. His many solo installments included one of my favorites, in which Mary tries to throw a surprise birthday party for Lou Grant in her apartment.

Some of his other “MTM” classics included the shows with Eileen Heckart as Mary’s Aunt Flo, a career journalist who was Lou Grant’s match, and ones in which Lou helps Mary overcome sleeping pills to get some rest, Lou’s affair with Sue Anne Nivens and one in which Murray thinks he’s in love with Mary. I can remember as a teenager always waiting to see David Lloyd’s name on the MTM show credit because you knew it would be a good one.

Altogether, Lloyd seemed to carry the MTM stable of shows. He wrote for all of them: “Lou Grant,” “Rhoda” and “Phyllis.” He also wrote for “The Betty White Show.” He also wrote for “Cheers,” “Taxi” and “Frasier,” the latter where his son Christopher Lloyd was bylined. The result was 3 Emmy Awards. He also wrote one of the best “Cheers” episodes, in which the bar gang has to cater Woody’s wedding.

James L. Brooks, the co-creator of “The Mary Tyler Moore Show” and “Taxi” told me on Wednesday: “David was the perfect TV comedy writer. He wrote so much. You knew if he agreed to do your show, you had half the season.” Brooks said Lloyd especially liked writing for Betty White, who played Sue Anne, the nymphomaniac precursor to Rachel Ray. “He had a great laugh,” Brooks recalled. “But he also didn’t use an agent. He did his own negotiating, which unnerved everyone.” Lloyd, he said, often also did warm-ups for the shows.

Before he got into sitcoms Lloyd wrote hundreds of shows for Jack Paar, Johnny Carson and Dick Cavett, honing his comedy talents. By far, though, Chuckles Bites the Dust is Lloyd’s most famous TV episode, and is still considered the benchmark for writing of any kind. Lloyd won many awards for the script which included two recitations of Chuckles’ signature line: “A little song, a little dance, a little seltzer down your pants.”

Brooks says that when the episode was played at Cannes at a TV convention, no one — especially the French — understood it. “We were all there. No one laughed. The only people laughing were us. We were on the floor laughing.”

For more on David Lloyd, see his friend and colleague Ken Levine’s posting.