BURBANK, Calif. (AP) _ Johnny Carson ushered in his 25th anniversary as host of ''The Tonight Show'' by joking that Southern California's jolting earthquake was a salute to his long reign as king of the talk shows.

Carson, 61, in black tie for the occasion, received a standing ovation as he walked on stage Thursday, and devoted his monologue Thursday to gags about the strong temblor that rattled Los Angeles and its suburbs.

''I especially want to thank the state of California for the special salute this morning,'' he said. ''A little overly dramatic, but nice.''

He even got in a dig at the Los Angeles Raiders football team's proposed move to the distant suburbs:

''This is a strange state,'' Carson said. ''The Raiders move to Irwindale and Irwindale moved to Pacoima.''

He also joked about the way broadcasters at KNBC-TV's Channel 4 reacted to Thursday morning's quake.

Referring to one newscaster's attempt to help his viewing audience, Carson observed: ''He dived under the desk and came up and said 'Don't panic 3/8'''

Carson made it clear that he owed his success to his fans, and the two men who bask in his limelight, sidekick Ed McMahon and orchestra leader Doc Severinsen.

''It has been a fabulous journey for me personally,'' Carson said. ''I was going to hang it up. But I found I was having so much fun, I wanted to stick around a while. So if you want to stick around, we'll stick around.''

The 90-minute prime time special on NBC had no guest stars, just Carson, McMahon and Severinsen, who also wore black tuxedos for the occassion.

The show was simple, featuring clips of guests who have appeared on the ''Tonight Show,'' including national leaders such as President Reagan and former President Nixon and entertainers such as Jack Benny, Judy Garland, and former guest hosts David Letterman and Steve Martin.

There was no mention of Joan Rivers, Carson's permanent guest host until their falling out last year when she joined the Fox network as star of a competing show, from which she was later dropped.

There were jokes about McMahon's drinking, but Carson called him his ''rock'' and told him, ''I wouldn't do it without you.''

Also on hand to celebrate were Carson's wife, Alexis Maas, and his brother, producer Dick Carson, who were seated in the audience.

''The Tonight Show'' debuted in New York on Oct. 1, 1962 and moved to Burbank in 1972, but the format stayed the same throughout the years, with Carson sitting behind a desk, chatting with guests.

The show not only made Carson a multimillionaire, but has become an institution and a late-night viewing tradition.

''It is hard to believe I've been with NBC for 25 long years,'' Carson said. ''You can't buy loyalty like that, but they did.''