FOR more than eight years America has been debating the pros and cons of erecting a defense against enemy missiles. Since President Reagan presented the idea in the form of the Strategic Defense Initiative (SDI), Congress has been appropriating about $5 billion annually toward researching and testing components of such a defense.For the Soviets, SDI was anathema. But now President Gorbachev, though mindful of the restrictions written into the 1972 Antiballistic Missile Treaty, has signaled his approval of the SDI concept. In Gorbachev's Oct. 5 television address in which he proposed further cuts in strategic missiles, he made this unmistakable endorsement of SDI-type thinking: "We are prepared to consider proposals from the United States of America on non-nuclear antimissile defense systems." He added: "We also suggest that the US consider the possibility of setting up joint systems for warning against a nuclear missile attack by means of elements based in space as well as on the ground." Besides Gorbachev's remarks, Moscow has been showing other signs of a radically changed attitude toward mounting defenses against missiles. For several months various Soviet spokespersons have been showing an interest in both land-based and space-based missile defense systems. Soviet academician Genrikh Trofimenko, an army-trained military scientist, wrote recently in International Life journal that a Soviet SDI, like that of the US, could protect the USSR "against all sorts of terrorists - be they some organized international gang of blackmailers who have gotten hold of nuclear weapons or some new nuclear power with suicidal leaders." Another writer, a general staff military scientist, recently advocated in the pages of the monthly General Staff journal, Military Thought (Voyennaya Mysl'), that the Soviet Union should plan on deploying anti-missile defenses for all major industrial and urban centers. Other Soviet writers, civilian and military, have pointed to the danger of accidental launchings that could pose a serious threat to Soviet security. What has caused this change of heart? First, Soviet planners, like their counterparts in the US, have noted the worldwide spread of nuclear know-how. A significant number of countries, beyond the established Big Five members of the nuclear club, are rapidly developing A-bomb technology. They have also begun acquiring the means - whether missiles or aircraft - to deliver nuclear warheads at considerable ranges. Most of these states have highly centralized, autocratic regimes. The Gulf war and Iraq's nuclear weapons program clearly put a scare into the Soviets. Soviet military literature reflects this, as does Gorbachev's new nod to the SDI principle. Several top Soviet civilian and military writers have endorsed the principle of defending against intercontinental ballistic missiles (ICBMs) beyond the defense system already serving Moscow, as permitted under terms of the ABM Treaty. IN the US, some former opponents of SDI have recently changed their minds. Among them is Sen. Sam Nunn (D) of Georgia, chairman of the Senate Armed Services Committee. He presently qualifies his support of SDI by insisting that it be ground-based. But a growing number of other generally pro-SDI voices in Congress favor adding space-based components as well. For his part, Gorbachev seemed to suggest that the Soviets can envision at least a "passive SDI" in the form of space-based radar and other launch detectors. Such space-based components, say supporters of SDI, are integral parts of any effective SDI system and are stepping stones toward eventual deployment of non-nuclear armed satellites that could disable ICBMs. In short, Moscow may be slowly coming around to accepting the once-pilloried, many-tiered "star wars" defense. One Soviet writer even offered the view that "star peace" was on the side of deploying such defenses. Is, then, a US/Soviet antimissile defense system, in one form or another, just around the corner? SDI supporters in the US maintain that "off-the-shelf" technology for deploying a modest anti-missile system of a type acceptable to the Soviets is available now. The Soviets, too, could develop such technology in a reasonably short period. It seems likely that the next Bush-Gorbachev summit will bring a degree of mutual understanding on development of a SDI compatible with the security interests of both the United States and Russia, along with as many other republics as care to join the effort. Meanwhile, it is obvious why economically pinched Moscow, no more than the austerity-conscious Washington, would favor such defense: It is tens of billions of rubles cheaper than continuing to build and improve offensive ICBMs in order, as the Soviets used to say, to "obtain quantitative and qualitative assured retaliation against all possible threats." Spokespersons on both sides admit that any antimissile defense system is not going to be perfect. Nevertheless, they say, millions of lives and critical industrial assets could be saved through mounting even a modest defense. They also point out that if most enemy missiles can be disabled before reaching their targets, no third-world state or "rogue adventurer" would be so foolish as to attempt such an attack. As things stand now, some US and Soviet authorities urgently warn, no convincing anti-ICBM deterrence exists in either the US or USSR that would be sufficient to dissuade a potential aggressor from taking the risk.