By means of a videotaped deposition taken from his deathbed, a Wheaton man who died of cancer three months ago was able to testify in Montgomery County Circuit Court yesterday against a 22-year-old Gaithersburg man accused of stabbing him during a Halloween street brawl in Rockville last year.

Michael Lawrence, 22, who made the videotape at the National Institute of Health where he was undergoing treatment for a type of bone cancer, identified Randall Paul Earp, 22, of Gaithersburg as the man who stabbed him several times during the incident last year. What began as a costume party erupted into a melee in which two other persons were struck by a pickup truck and 14 persons were arrested for disorderly conduct and public drunkenness.

Earp was indicted in February of attempted first-degree murder, attempted second-degree murder and assault with intent to maim in the stabbing of Lawrence, who had been a guest at the party in the 4900 block of Randolph Road.

During the party a person was struck by a pickup truck, prompting Lawrence to go outside to investigate. At that time he became involved in an argument with Earp and was stabbed, according to Lawrence's videotaped testimony.

"I tried to do a good deed and I almost got killed for it," Lawrence said in the deposition.

Earp has pleaded not guilty, according to public defender Paul DeWolfe, his attorney. At the time of the alleged assault Earp had been on parole on an earlier charge of robbery with a dangerous and deadly weapon, according the state's attorney's office.

A decision was made to videotape Lawrence's testimony after doctors notified the state attorney's office that Lawrence's condition was worsening, according to State Attorney John McCarthy, the prosecutor in the case. Lawrence, who had been undergoing chemotherapy and radiation treatments since being diagnosed in 1984 as having the disease, died several days after the videotape was made, McCarthy said.

In opening arguments, McCarthy told the jury that the stabbing incident was not directly linked to Lawrence's death.

"We're are just trying to prove attempted murder in this particular case, not that the ultimate death was caused by the assault," McCarthy said.

DeWolfe said that the videotape represents a formidable obstacle in his defense of Earp because it may elicit feelings of sympathy from the jury.

"It will be difficult for them to put aside any undue sympathy because he is testifying from his deathbed. Difficult, but I hope not impossible."