D.C. officials have cracked the case of the altered computer code -- with the help of a computer firm, and maybe with a hint or two from the Declaration of Independence.

For the last few days, officials in the D.C. controller's office have been unable to retrieve the city's computerized financial records after Alvin C. Frost, a financial employe who has been highly critical of the Barry administration, changed the password, then refused to tell his superiors the new code.

"We didn't do anything fancy, we just worked with the people we bought it the computers from," said Fred Williams, assistant city treasurer, "It took a while but not much longer than it normally takes to enter a password."

Frost, a senior cash management analyst with the D.C. controller's office who had been responsible for millions of dollars in city funds in various banks and investments, said last week that he altered the code to prevent documents from being destroyed or tampered with, and to deny his superiors access to his personal files, which he said had been violated in the past.

Early this morning, Frost said he was not surprised that officials were able to discover his password so quickly, but warned there may be another round of computer warfare ahead.

"There is information inserted into the operating system and if they [city officials] try to get it out, the computer will malfunction," said Frost.

He also said he would be putting clues to the password into the classified sections of The Washington Post during the weekend and, offering free trips to the Washington Monument for youths who write him with the correct answer.

Williams said the code was discovered sometime on Monday, but refused to give details.

Frost had admitted changing the code, and said he replaced the old password with a new seven-character code that was somehow derived from the words in the Declaration of Independence.

Neither Williams nor Alphonse G. Hill, the city's deputy mayor for finance, would say last night if the broken code had any relation to the Declaration.

"It's getting humorous, I have no comment on anything Mr. Frost does," said Hill in an interview last night.

Earlier this week, Frost, 38, said he changed the code after someone allegedly entered the computer system and made two printouts of his letter to Mayor Marion Barry in which he denounced the Barry administration as corrupt, and accused city financial officials of wrongdoing in awarding financial service contracts.

In the letter, Frost said the city's senior financial mangagement is "rife with incompetence, mismanagement, negligence, political favoritism, intimidation [and] indifference," and urged Barry to initiate an investigation.

In December 1984, Hill and assistant Williams ignored a warning by Frost against investing $10 million in a New Jersey-based government securities firm of Bevill, Bresler & Schulman, which subsequently went bankrupt. Those investments later were recovered but there were disclosures that officials backdated a memo to justify their decision to invest in the firm.

Hill described Frost last week as "a nerd and an imbecile," and Frost's superiors have criticized him as a disruptive and insubordinate employe.

After changing the code, Frost was locked out of his office during the weekend and assigned other duties. He has said he may run for mayor or the D.C. City Council.

Williams said Frost's fate as a city employe was a "personnel matter," and refused to discuss any further disciplinary actions that may be taken against him.