PHILADELPHIA (AP) _ Cardinal John Krol, recovering from a 7 1/2 -hour operation to stop bleeding in his abdomen, believes the surgery was a way to prepare for death, his personal physician says.

The cardinal believes ''the end will come and this was kind of a dry run,'' said Dr. Joseph M. Gambescia, Krol's doctor for more than 20 years.

Krol, 76, was in satisfactory condition today in the intensive care unit following surgery Tuesday at St. Agnes Medical Center, said nursing supervisor Camilla Lubking.

''The cardinal is fine. His vital signs are all good,'' said Bob Gallagher, a spokesman for the hospital, late Tuesday night. ''He is talking and is in good spirits.''

Krol, spiritual leader to Philadelphia's 1.3 million Roman Catholics, will remain at the hospital for at least seven to 10 days, said Dr. John Cossa, one of three surgeons who performed the operation.

Doctors operated to relieve pressure in Krol's veins causing internal bleeding near his stomach, Cossa said, adding that the origin of the problem was unknown.

The intermittent bleeding caused Krol's dizzy spells May 10 following a Mass at Xavier University in New Orleans, Cossa said. Krol was hospitalized in New Orleans for three days before being transferred to St. Agnes.

Krol, who also suffers from hypertension and diabetes, celebrated his 50th year in the priesthood this year. He was named cardinal in 1967, six years after being appointed archbishop of Philadelphia, the nation's fourth-largest Catholic diocese.