In 1977, Gary L. Gallo was fresh out of Georgetown University Law School, secure in his own general practice in Wheaton and earning $20,000 annually. A year later, however, when business fell off and his income dipped to $14,000, Gallo figured something was wrong.

So, after splitting from his partner, Gallo, a bricklayer's son who grew up in Greenbelt, did the obvious: He advertised himself on television.

"The age of hanging out a shingle and starting a practice is gone," said Gallo, who now runs three legal "clinics" in Maryland and Virginia. The tiny Wheaton practice has given way to a $500,000-a-year business with six attorneys. He says he owes it all to his ads, which pop up regularly on soap opera afternoons and rerun evenings.

"Our whole thing is based on the advertising," he said in a recent interview. "It works for us. And doesn't for a lot of other people."

Indeed, five years after the Supreme Court allowed lawyers to advertise their services, only a tiny fraction of Maryland's 13,000 lawyers have taken to selling themselves in newspaper pages and prime-time commercials. Many older, more established lawyers say the ads demean what was once a gentlemanly vocation and question whether some ads violate the profession's code of ethics.

"I think it boils down to a matter of taste," said Thomas Murphy, a Rockville lawyer who heads the legal ethics committee of the Bar Association of Montgomery County. "It has to do with the image you want to project, the client you want to attract.

"I don't think you're going to attract the high-quality client" with advertising, Murphy said.

But in the age of direct mail and target audiences, lawyers don't have to. Those who advertise on television (Gallo is easily the most familiar around Washington; Baltimore has several on the airwaves) tailor their ads to attract the "routine" cases involving divorce, bankruptcy, or drunken driving arrests.

Gallo, 31, knows his audience: His ads invariably draw clients aged from about 25 to 35 who have a $30,000 family income. His Montgomery office in Silver Spring usually attracts white clients, while the Prince George's office in Camp Springs draws a 50-50 ratio of blacks and whites, he said.

"Few lawyers have the courage to put their money into advertising," said Gallo, who spends more than $3,000 a week on ads produced by a brother's agency. Since 1980, 20 different ads have been prepared; two new ones, which Gallo refused to discuss, are slated to appear at the end of this month.

Gallo said his ads have drawn few complaints, but have sparked three official investigations--two by Montgomery's bar association and one by Prince George's. The bar associations have no policing power but may recommend that the state's Attorneys' Grievance Commission discipline individual bar members.

One investigation last summer centered on Gallo's use of the phrase "affordable fees" in one ad, which some thought was misleading, Gallo said. Another came after he placed fliers on car windshields--which some regarded as bordering on solicitation, he said. (Soliciting legal work is prohibited, but legal experts disagree on just what "soliciting" means.) All three investigations were closed with no action taken against him, Gallo said.

Officials in Montgomery's bar group would not comment about their private inquiry; Prince George's bar officials could not be reached for comment.

"Most lawyers who advertise will be pretty careful when they do it," said Melvin Hirshman, the counsel to the grievance commission in Annapolis. "All of them are not intentionally going to violate the rules."

In the nearly five years since the Maryland Court of Appeals issued rules against misleading or fraudulent ads, the commission has disciplined only one lawyer, an attorney who advertised that he had won the largest judgment in state history.

When Hirshman presented facts that disproved this, the ad was withdrawn and the lawyer privately reprimanded, Hirshman said. Another time, a bankruptcy lawyer advertised that he could discharge a client of all debts.

"That, of course, is impossible," Hirshman said. "The client would still have U.S. taxes, or alimony or state taxes to pay. The lawyer pulled the ad immediately." Hirshman said his office is currently investigating several other advertisements.

"I'm an old-timer. When I came in you couldn't even hand your card to anyone without being asked for it first," Hirshman said. "But now the lid is off." With law schools churning out lawyers by the thousands every year--and economic hard times in the foreseeable future--many believe that the ads will proliferate.

Other lawyers say the ads may be ethical, but are in bad taste. Said Hirshman: "This is really upsetting to a lot of lawyers, like the divorce ad here recently that had two parents pulling a child apart."

Another ad showed a chain saw whirring above the family dog; ads for lawyers who handle personal injury cases have included mock auto accidents, complete with the sound of breaking windshields.

"We try to stay away from ambulance chasing," said Gallo, who observed that his most effective ad on television is a 10-second spot that flashes his name, telephone number and types of cases he handles.

Other attorneys cringe at the very thought of broadcasting their practice on television.

Barnard T. Welsh, 70, the dean of Montgomery's divorce lawyers--who started his Rockville practice in 1940--said: "The best way to advertise is through a large circle of friends, through civic associations, or community groups, or your church.

"One used to hestitate to give your card out indiscriminately. Now I see ads now quoting a flat price for an uncontested divorce," Welsh said. "Those ads are less than candid. For one thing, there's no such thing as an 'uncontested' divorce. There's always friction.

"And I think it's misleading for a lawyer to put a ceiling on price for a case like that. That's misleading. If the costs run up, as they usually do, that's baiting-and-switching on the client."

But Welsh added that he enjoyed a bit of self-advertising in the 15 years he wrote a legal advice column for the weekly Montgomery County Sentinel. When the column's first title, "County Law," drew complaints from his colleagues, Welsh dropped the name.

"You can hang out the conventional shingle or go the more flamboyant route with newspaper and TV ads," Welsh said. "All I know is that we've come a long damn way since 1940."