NEW YORK (AP) _ Some of the stocks that are moving substantially or trading heavily today on the New York Stock Exchange, Nasdaq Stock Market, and American Stock Exchange.

NYSE

BankAmerica, up 3/4 at 124

The San Francisco-based bank agreed to acquire the investment banking firm of Robertson Stephens & Co. for $540 million. Separately, BankAmerica agreed to sell a consumer lending operation, Security Pacific Financial Services, for $1.6 billion to Commercial Credit Co., a unit of Travelers Group.

American States Financial, up 7 1/4 at 45 3/8

Safeco, a Seattle-based property-casualty insurer, has agreed to pay $2.82 billion, or $47 per share, for the Indianapolis-based insurance firm. Lincoln National Corp., which owns 83.3 percent of American States, has agreed to support the transaction.

Prime Service, up 6 7/8 at 31 3/4

Sweden-based Atlas Copco agreed to acquire Prime, a Houston-based industrial equipment rental company, for $900 million, or $32 a share. The price excludes $260 million in assumed debt.

Westinghouse Electric, up 1 7/8 at 21 3/4

Alex. Brown & Sons started coverage of Westinghouse with a ``strong buy'' rating, the Dow Jones News Service reported, citing a contact at the investment firm.

NASDAQ

Comcast special shares, up 2 15/16 at 21 3/8

Comcast class A, up 3 3/16 at 21 7/16

Microsoft agreed to invest $1 billion in Comcast, the nation's fourth-largest cable company, in an effort to push forward the marriage of the Internet and television. The deal will give Microsoft an 11.5 percent stake in Philadelphia-based Comcast.

Abacan Resources, down 3 9/16 at 2 1/4

The Canadian energy company warned that it expects lower production in June and said its cash flows for the remainder of the year and 1998 will be below expectations.

AMEX

Cablevision Systems, up 9 1/2 at 44 1/8

Tele-Communications Inc. Class A (Nasdaq), up 1 at 16 1/16

TCI, the nation's biggest cable company, agreed to sell New York-area cable systems with 820,000 customers to Cablevision. In return, TCI will get a 33 percent stake in the company. Cablevision, based in Woodbury, N.Y., will assume about $669 million of TCI debt with the 10 systems.