IN THE OPENING days of 1985, two men have died whose exploits tell us something about two very different kinds of hero in modern warfare.

Charles E. (Commando) Kelly, who died Friday at the age of 64, was a young Army sergeant when he killed 40 enemy soldiers while singlehandedly fighting off a German platoon and allowing his unit to withdraw safely from action at Altavilla, Italy, in September 1943. For that feat, he became the first enlisted man to win the Medal of Honor in World War II and was given a parade in his home town of Pittsburgh. Mr. Kelly, an authentic hero at a time when the country was much in need of them, was paid $40,000 for a book that was serialized in a magazine and then made into a movie. But the country does not guarantee its heroes happiness forever. (It doesn't even do that for its athletes and rock stars.) Mr. Kelly, according to an obituary in The New York Times, ran a filling station and then became a house painter, living for a time in public housing in Louisville, before friends made a collection to bring him home to Pittsburgh in the early 1970s. He was still working as a house painter when he died.

On Jan. 5, Thomas H. Dyer, described in the headline in this paper as an "Unsung Hero of World War II" died at age 82 in Baltimore. He was not only unsung but practically unheard of during the war. His most important work, as described in The Post in an obituary by Bart Barnes, was done in a basement room of a windowless building at Pearl Harbor, where he was in charge of the Navy's cryptanalytic unit. His pioneering work in the field helped break the Japanese Naval codes.

Captain Dyer "saved hundreds and maybe thousands of lives by accelerating the war," according to David Kahn, author of a history of allied code- breaking during the war. The breaking of the Japanesecodes led, among other things, to U.S. victory in the pivotal Battle of Midway and enabled Allied forces to inflict ruinous losses on Japanese merchant shipping.

The acts of Sgt. Kelly were not too different from those performed at Thermopylae and Agincourt and were as easily understood by his countrymen as those had been.

The acts of a Capt. Dyer were something different: harbingers of the new order of all-out war in which men and women working quietly in windowless rooms unleashed immense new forces. It's worth thinking about.