TV's situation comedies have suffered from a major problem in recent years: too much situation, not enough comedy. They have lacked warmth on the one hand and an abiding sense of silliness on the other.

It may have nothing in the warmth department, but ABC's new limited-run comedy "Police Squad!" could hardly be sillier. Silly doesn't always translate into funny, but in this case, the playfulness is infectious, and the premiere of the show, at 8 tonight on Channel 7, is a cheerful, refreshingly ridiculous affair.

The problem for ABC is that American viewers only seem to like comedies that can be taken seriously, that have characters with at least vaguely realistic roots, like on "One Day at a Time" or "Barney Miller." The new "Police Squad!" is total farce, a satirical burlesque of cop show cliche's from the three madcaps who tossed together the slapdash movie riot "Airplane!," one of the top money-making films of 1980.

In a way, "Police Squad!" represented more of a challenge for Jim Abrahams, David Zucker and Jerry Zucker, who wrote "Airplane!" and "created," as the credits put it, "Police Squad!," than the film did. In the movie, writers could always fall back on risque' or scatalogical material to get a quick laugh--the most flagrant example probably being a literal case of the manure hitting the fan, as it were.

But you can't be dirty on TV, only suggestive, so other sources of comedy have to be tapped. What "Police Squad!" offers is a me'lange of wordplay, visual puns, and spoofy jests--and, for good measure, jokes so terrible that you groan merrily at the thought of laughing at them, and at the writers' gall in putting them in. It's all a surprisingly happy mess.

"Cigarette?" asks the cop, holding one out to a murder suspect. "Yes, I know," she says, looking at it knowingly.

As totally facetious as it is, it's all played very straight, particularly by Leslie Nielsen, who was on board "Airplane!" as the slap-happy doctor and here plays doggedly dimwitted detective Frank Drebin. As the show opens, he's tooling around in his squad car and offering an appropriately devious scene-setter: "There'd been a recent wave of gorgeous fashion models found naked and unconscious in laundromats on the West Side. Unfortunately, I was assigned to investigate holdups at neighborhood credit unions." Nielsen's best scene is a rambling monologue about roommates he has known and loved, a soliloquy other characters have the good sense to ignore.

The half hour is peppered, salted, and occasionally buttered, with appealing low comedy (a daffy variation on Abbott and Costello's classic "Who's on First?") and wacky pranks; when the cops visit "Little Italy," the Leaning Tower of Pisa looms outside the window of the victim's wife's home. Nielsen consoles her, "We would have come earlier, but your husband wasn't dead then."

The Coliseum mysteriously appears out the rear window of the squad car, and through a window at the police department one can see none other than the dome of the U.S. Capitol. For years, movies have played loose if not fast with Washington geography by having the Capitol dome pop up outside windows where it never could be; the offices in question would have to be situated in the middle of the Mall, or atop the Taft Memorial. Of course, the sublime thing about the "Police Squad!" gag is that the show isn't even set in Washington.

Ballistics tests are conducted by shooting a gun through videotapes of old Barbara Walters specials. When Nielsen credits the solution of the crime to "a little hunch back at the office," it turns out to have been a little hunchback at the office, who shows up for a dutiful cameo. One cop is so tall, his head is cut off by the top of the frame. Nielsen and costar Alan North, as his boss, have to maintain a manual freeze-frame at the conclusion, their mouths wide open in mid-laugh, as the credits flicker by.

Funny, yes, but will it work? NBC apparently thinks it might. The network had planned to move its low-rated but highly praised "Fame" to a later time slot and put "Diff'rent Strokes" in its place, but then it was feared "Police Squad!" would be potent enough to bump off the faltering "Strokes," so the move was hastily called off.

"Eight o'clock shows," those that lead off each night's prime-time schedule, traditionally must appeal to kids, and "Police Squad!," like "Airplane!," does. But satirical spoofs traditionally do poorly on TV. ABC just learned that lesson with "Best of the West," which started strong and now is a dead horse. Audiences seem to want a central core of sanity even in farce; thus Mel Brooks failed a few years ago with his Robin Hood romp, "When Things Were Rotten."

Whether "Police Squad!" stays around or not, it does promise at least a few weeks of comedy in a different tone than the TV standard; some of it is in what might be called bad taste--and not felicitous bad taste either--but at least nothing hangs around very long, and much of the material seems to have wafted in from good old left field. For this variation from the dull norm, those of us who watch a lot of television may feel more gratitude for "Police Squad!" than the show deserves.