In the wake of the Depression of 1929, Congress told commercial and investment bankers to go their separate ways. The idea was to undo a mixture that lawmakers believed had triggered thousands of bank failures and, ultimately, the Depression.

Fifty-four years later, banking and investment giants are fighting to get back into each other's business. The tug-of-war is forcing Congress to decide if laws keeping commercial banks out of investment banking and most other commerce are out-of-date, anticompetitive and -- given changes in the marketplace -- perhaps even unenforceable.

"Today there is no significant financial service provided by a bank or thrift that is not also offered by less regulated competition," a government study of federal deposit insurance concluded in January 1985.

In the late 1970s and early 1980s, computer technology and soaring interest rates combined to break down many barriers separating financial services from other industries. Consumers became more sophisticated, forcing many companies to become more innovative to meet the demand.

The changes spurred a revolution in financial services, as banks and nonbanks alike hired armies of attorneys to scour existing law for loopholes into each other's markets.

Said Dennis Gingold, lead banking partner for the law firm of Squire, Sanders & Dempsey: "Before 1978 the only thing a banking lawyer had to do was know how to sit at a bar and play golf at a country club. Banking law had stayed pretty much the same since the Depression."

In recent weeks Senate and House conferees have hammered out a compromise bill that the two chambers of Congress expect to vote on in early September. The Reagan administration said it will veto the bill.

The main provisions of the proposed bill would:

Ban any nonbank bank created after March 5. It would limit the 168 nonbank banks created before that date to 7 percent growth a year, beginning one year after the law takes effect. Nonbank banks offer checking or commercial loans, but not both, and thus bypass federal restrictions on who can own a bank and what products it can sell.

Impose a moratorium on new bank powers until March 1, 1988. This would prevent regulators from allowing banks to engage in limited securities underwriting, among other activities.

Pump $8.5 billion into the Federal Savings and Loan Insurance Corp., the insolvent federal fund that insures deposits at S&Ls up to $100,000. Federal officials estimate the FSLIC needs at least twice that sum to close hundreds of dead S&Ls across the nation and pay off depositors.

The key existing laws that the proposed bill would change -- and that lawyers and regulators have been busily reinterpreting -- are:

The National Bank Act of 1864, and amendments: Created the Office of the Comptroller of the Currency, establishing nationally chartered banks and the national banking system.

It limits banks to activities such as deposit-taking and loan-making, and related activities, and by extension, limits the activities of a bank subsidiary to those the parent bank may perform.

In effect, the law prohibits national banks from acquiring nonbanking companies such as a Sears Roebuck or General Electric.

In theory, a state-chartered bank that is not a member of the Federal Reserve System could buy a company not related to banking, but no state has yet permitted such an acquisition, banking regulators said. The possibility is being discussed, however, as a way to permit banks to invest in real estate. Such investments are now prohibited to national banks.

The law limits the amount of money that a bank can lend to any one borrower or group of borrowers. It also limits a banks' transactions with insiders and with affiliates.

McFadden Act of 1927, as amended: Allows national banks to branch within a state to the same degree that a state-chartered bank may branch. It forbids national banks from branching outside state boundaries, and thus established states as the geographic boundary for banks.

The act originally gave national banks the right to engage in investment banking, a privilege taken away in 1933.

At the turn of the century, state banks were free to underwrite securities, but federal regulators forbid national banks to do the same. Then -- as now -- national banks complained that they "were placed at an increasing disadvantage in competing ... {for} corporate clients" who wanted both investment and commercial banking services, according to a 1975 report of the Treasury Department.

So national banks started setting up state-chartered security underwriters as affiliates that were owned by the same group or individuals that owned the bank. Then in the early 1920s the growth of assets at national banks began to stagnate while the assets of state-chartered banks continued to grow.

Congress responded with the McFadden Act, which put national banks on an equal footing with state institutions by permitting equal branching power and the ability to underwrite securities.

The Bank Act of 1933, better known as Glass-Steagall: Generally separates investment banking from commercial banking. There are some exceptions. It permits national banks to underwrite certain government securities, and permits state-chartered banks that are not members of the Federal Reserve System to engage in a wide array of underwriting if state law permits.

The law was Congress' response the widespread perception that a key cause of the Depression was the abuse by banks of securities powers. Such abuses did occur, but few said they were the prime cause of the stock market crash.

During 1931 and 1932, when Congress conducted hearings into the matter, more than 4,000 banks failed, the report said. Officials in the comptroller's office now say that most of the failures involved rural institutions that were not combining investment and commercial banking activities.

Federal Deposit Insurance Law: In 1933 the Federal Deposit Insurance Corp. was established to insure deposits at commercial banks. The idea was to stop runs by assuring the public that repayment of all deposits was guaranteed by the federal government even if a bank failed.

The Bank Holding Company Act of 1956, as amended: Separates commerce from banking and gives states the right to authorize acquisitions of banks by out-of-state bank holding companies.

The act puts regulation of bank holding companies under the Federal Reserve Board, which has strictly maintained the separation of commerce and banking.

The act's definition of a bank has created the loophole for so-called nonbank banks, or limited-service banks, however. The act says a bank holding company is any company that owns a bank, which in turn is defined as an institution that offers checking and commercial loans.