For the past 18 months, Pedro Savadovsky has closeted himself in an old, two-story house here, faced the video screen of a Brazilian-built computer and wrestled with one small slice of his country's dreams of development.

Savadovsky is one of Brazil's brightest young computer wizards. His task is to create a package of computer programming--or software--so skilled and needed that it matches the best efforts of the best laboratories in the multibillion-dollar international industry.

It is not an idle ambition. Savadovsky's software will be bought by a Brazilian company that is supplying one of the developing world's fastest growing computer markets. And it will be protected by a government that has bet a good part of Brazil's economic future on the conviction that a coming technological revolution should be controlled inside national borders by Brazilian capital and products.

"This is the challenge of the Third World," Savadovsky said with a wry grin. And yet, all around this high-tech creator are symbols of the odds mounting against him. His office is small and sparsely equipped. As he continues advanced studies at the University of Sao Paulo, his textbooks and his lectures have switched to English and his software professor is a visiting American.

With the pressures of the marketplace building, meanwhile, the company Savadovsky works for, SID, already is moving toward the abandonment of authentic Brazilian technology.

"We are building new machines that are compatible with international software," says Eric Jan Roorda, the director of research at SID. "It is prohibited to have these programs in Brazil, but a lot of our customers have them. They just get them. We just don't have the possibilities to compete with it."

Savadovsky disagrees, and he's still working. But his boss' pessimsim indicates the obstacles Brazil faces in its aggressive effort to carve out its own turf in the computer age--and thus change the nature of its economic development.

Since 1978, when its computer market first began to swell, the government has reserved large parts of the industry strictly for Brazilian computers built by Brazilian national companies.

First advocated by leaders of the Navy, the policy is based in part on concerns about national security. More significantly, however, the Brazilians have decided that the development of computers--with all that implies for the future of economic activity--need not and should not be dominated solely by the United States, Japan and other industrialized countries.

"We know that computerization is a new form of life for the developed countries of the world," says Helio Azevedo, the president of an association of businesses using computers. "Brazil has to have a mastery of the technology, using the resources that we have. In a few years the whole world is going to be linked by networks of communication. It's important that all countries--including developing countries--participate."

With some parts of the market for computers now doubling in size annually, the Brazilian strategy has created an expansive domestic industry that includes at least 60 national companies and directly employs more than 20,000 workers. Brazilian economic planners are beginning to envision an era when national computer companies could take the role played by multinational auto makers a generation ago as locomotives in a boon of industrial development.

Both the costs and the risks of this large ambition, however, are growing rapidly. Brazilian computers cost several times more than foreign models, straining the budgets of national industries that need to computerize to compete abroad. A black market in imported software, components and whole computers is flourishing in Sao Paulo and other cities.

Multinational computer producers from the United States are pressuring for an opening to the rich Brazilian market, and their campaign has been joined by the Reagan administation. Meanwhile, the fledgling Brazilian computer companies are finding it increasingly difficult to keep up with the rapid technological advances in computers on the international level.

The result has been a dilemma that many Brazilians believe will soon be shared by developing countries around the world. Unless it closes its markets to build its own computer industry, Brazil will never have a mastery of a vital wave of technology. It will become more dependent on the companies and governments of the industrialized countries for the modernization of its economy, economists and government officials say.

And yet, by sealing its market from the world's leading computer builders, Brazil runs the risk of falling critically behind other countries in the computer age.

"If you are going to demand that industries compete in the foreign market, you have to give them the same means," said one worried editor of a Brazilian technology publication. "You are going to take the risk that the whole country is left behind, and once you create a gap like that the question is whether you will ever be able to catch up. If your children don't get the benefit of computer education, they are always going to be Third World."

In other industries where technology is advancing rapidly, Brazil's economic crisis and its desperate need to increase exports already have overwhelmed efforts to compete.

"Brazilian economic authorities have to worry about exports," said Simon Schwartzman, a scholar who studies technology issues at Rio de Janeiro's prestigious Iuperj institute. "They don't want to give money to a laboratory to create an industry and then later export. They would rather make a deal now with a company that already has the know-how and the resources."

In the computer field, however, the drive for self-sufficiency has been given special impetus by the national security worries of Brazil's military rulers.

The government first began to move toward the development of Brazilian technology on a large scale in 1972, when the Navy bought six Vosper attack boats from Britain, only to discover that Brazilian technicians were unable to repair--much less duplicate--the ships' complex microelectronics.

The military's security concerns grew in the mid-1970s during Brazil's disputes with the United States over Brazil's refusal to accept international controls over its nuclear development program. Officials worried that the United States would cut off sales of computer technology to Brazil, thus leaving the country almost helpless.

The Navy founded and supported Brazil's first programs in the computer field, and a strong nationalist current pervades Brazilian thinking on computer development.

"This is not a question of cost. It is a question of survival," said Antonio Didier Vianna, a retired naval officer who now heads a small computer firm and a national association of Brazilian computer companies. "Today if there were a nuclear attack on the United States, our financial system would have 90 days of life. The country would collapse for a conflict that wasn't ours.

"What we want is a certain autonomy. Foreign companies will give us technology but they don't want to have technology development here. We become totally dependent on the foreign supply of new technology. That leaves us very vulnerable."

Many Brazilian leaders also support the computer development program on strictly economic grounds. Brazil now has the 12th-largest market for computers in the world, totalling $1.3 billion in 1982, and most analysts believe the real boom in computers has yet to reach the country.

Foreign companies, they concede, would be more than happy to match the Brazilian firm's investments in new plants and employment in the country while supplying cheaper products. But uncountable millions of dollars would flow out of the country in profit remittances to home offices.

Most of all, Brazilian businessmen say, the development of a national computer industry will provide them with an economic control over the size and style of the country's growth that they have not had in the past.

"Here, you can guarantee the compatibility of systems and have activities that are oriented to Brazil's situation and the needs of the internal market," said Azevedo, whose users' organization formed in 1964 after a series of price increases by the local subsidiary of IBM.

"We have instruments of pressure over the Brazilian manufacturer. But it is very difficult to pressure a multinational company."

So far, the government has limited two major parts of the national market to domestic companies. The restrictions cover production of "minicomputers," or medium-sized business systems, and personal computers ranging from calculators to products similar to the Apple and IBM personal computers in the United States.

Multinational companies still are permitted to produce and sell large computers and their software and such sophisticated components as microprocessing chips. Because these sales are large and expensive, foreign producers--led by IBM and Burroughs--still accounted for 80 percent of the value of computer sales in Brazil last year.

Brazilian companies have about 60 percent of the market by volume, however, and all the companies agree that the biggest future growth will be in the medium and small computers. The demand for personal computers doubled last year, and experts predict that the number of small computers in Brazil will grow from 30,000 this year to 150,000 by 1985.

Government officials and industry spokesmen say they are happy with the growth of the national companies, and they argue that in medium and small computers, Brazilian products are no less sophisticated than those sold elsewhere.

"What is the best microcomputer in the United States?" demanded Didier Vianna. "The Apple II? It is here. And ours are just as good."

Indeed, a Brazilian computer company, Unicomp, produces a computer that resembles the Apple II down to its multicolored logo, and calls it the APII. It is in fact a nearly perfect, pirated copy. The only difference is cost--a complete APII system sells for $8,000, at least twice the price of a similar Apple II system in the United States.

For critics of the computer policy, that kind of product defeats all of the higher justifications advanced for a national computer industry. Most Brazilian companies are not really developing a national technology, these critics say, they are simply copying foreign products, making them less efficiently and selling them at a higher price.

The weakness of the industry also is evident in the thriving black market for computers and parts. Industry experts estimate that there are 10,000 contraband Apple and Radio Shack computers installed in Brazil, and the government has been forced to tolerate a thriving underground trade in chips, other components and software programs.

In the Sao Paulo neighborhood of Santa Iphigenia, an area of six city blocks is filled with hundreds of small electronics shops and a thriving market in components, many of them contraband. In an atmosphere that approaches that of an open-air bazaar, customers--who include engineers from Brazil's own computer companies--crowd around display windows and bins of parts and haggle over the prices of contraband chips and terminals on view.

While industry officials dismiss this activity as a relatively minor nuisance, many Brazilian computer experts concede that Brazil has neither the capital nor the research infrastructure to keep pace with the technology of such a highly sophisticated field.

Representatives of U.S. computer firms campaigning for a change in government policy are quick to agree.

"If you look at the total picture, look at the capitalization of the companies; it would take a miracle for them to develop advanced technology in that kind of setup," said Henry Victor Eicher, the local president of Burroughs, which still supplies 20 percent of computer sales in the country from its factory in Sao Paulo.

"Anybody in this industry has to run like hell just to stand still, and here you're talking about people who aren't even on the track yet."

The Reagan administration is supporting the U.S. companies' stance and is pressuring for a change in the restricted market policy through one of the trade working groups established during President Reagan's visit to Brazil in December.

Ultimately, many in and outside the Brazilian industry expect the government's bold policy to be compromised, perhaps through allowing joint ventures between Brazilian and multinational companies.

"Here in the Third World, we know we can't compete in some areas with the U.S., Germany and Japan," said Savadovsky. "We would have to work for a hundred years to build up the base to develop what you have."

But for Savadovsky, there are still broad opportunities.

"In software you can do everything with a paper and pencil," he said. "We still have that chance. In the U.S. they can open a great firm with a huge investment to develop software, but here one kid in his home can still come up with a better idea."

On that long chance, Savadovsky is still at it, shutting himself up each day in the old converted house, and writing. "In Portuguese," he said, and grinned. Next: Agricultural decline