Seeking to halt the spread of X-rated peep shows into city neighborhoods, the D.C. Zoning Commission voted yesterday to outlaw the coin-operated devices in the future except in downtown.

The commission voted also to put strict limits on the number of pinball machines and other games that can occupy space in bars, restaurants and other business establishments throughout the city.

Most small businesses, such as convenience groceries and taverns, will be limited to three machines, although if they now have more, they will be able to keep as many as five.

Yesterday's unanimous action by the commission followed months of consideration that was touched off by neighborhood complaints about peep show devices in two adult book stores near 18th Street and Columbia Road NW, in the Adams-Morgan neighborhood. For legal reasons, the rule was broadened to cover all types of amusement devices.

A year ago, the same commission adopted zoning rules that virtually froze the number of adult book stores operating in the city.

Under yesterday's action, the two Adams-Morgan stores and an uncertain number of other similar establishments around the city would be able to keep existing peep shows running. But if the store operators stop offering sex films, they cannot resume such showings at a future date, according to Ben W. Gilbert, director of municipal planning.

However, another recent, previously unpublicized action by the Board of Zoning Adjustment may force the Adams-Morgan stores to shut totally.

The board, which is separate from the Zoning Commission, decided that the R&M Book Store, 1812 Adams Mill Rd. NW, and Riggins Adult Book Store, 1792 Columbia Rd NW, violate zoning rules. The board's formal order will be issued soon, Steven E. Sher, executive director, said.

Yesterday's action was preliminary and also must be followed by a formal order. It applies to all coin-operated amusement devices in establishments that have other primary business activity, and is intended to keep the devices from dominating the business. It does not apply to so-called penny arcades where the machines are the main business.

The bumber of pinball machines a business place could have depends on size. A place with up to 2,000 square feet could have three, up to 4,000 square feet five and larger places could have 10.

The board accepted a compromise suggested by the D.C. Association of Amusement and Music Operators, permitting places that already have more than those numbers of devices to keep some of them permanently. Those up to 2,000 square feet could keep five, those up to 4,000 square feet could keep eight and larger places could keep 15.

That would permit Columbus Mitchell, who owns a small variety store at 2112 14th st. NW, to keep the four machines now there. He estimated they earn $2,000 a year.

"I am working so close in my business now that if I am forced to take out one machine, I will have to close my doors and go out of business," he told the zoning commission.

Likewise, Hungry's Food and Drink at 2000 M St. NW, which has 3,100 square feet, can legally keep its nine pinball and TV screen games.

John Cokinos, manager of D.C. Vending Co., which rents amusement devices to hotels and stores, said the rule should have little impact on his business. "Maybe 25 places in the city have more than three ss. "Maybe 25 places in the city have more than three pinball machines anyhow," he said.