KENNEBUNKPORT, MAINE, AUG. 18 -- President Bush signed two bills today: an $882 million AIDS emergency measure that for the first time will allow direct federal grants to 16 cities, including Washington, hit hardest by the deadly viral epidemic and a measure that sets tougher standards for ship construction and authorizes a $1 billion oil-spill cleanup fund.

Bush affixed his signature without public comment to the Ryan White Comprehensive AIDS Resources Emergency Act, named for the Indiana teenager who courageously faced the disease that led to his death in April.

Congress will still have to pass a separate appropriations bill before any of the funds are distributed to states and cities. But it is the first law ever enacted to provide health grants to states and localities to fight a specific disease.

AIDS is spread through the exchange of blood or body fluids or through contaminated needles. It has killed more than 83,000 Americans in the last decade, and an estimated 1.5 million Americans are believed to be carriers of the virus.

Many of the victims have been gay men or intravenous drug abusers. Children can contract the disease in the womb or through blood transfusions, as did Ryan White, a hemophiliac.

The measure authorizes $882 million for fiscal 1991 and a total of $4.5 billion over five years.

Before signing the bill prompted by the Alaska oil spill, Bush complained that the measure contained a "highly objectionable" moratorium on exploration for oil and natural gas off the coast of North Carolina's Outer Banks.

"Such a moratorium is ill-advised in view of recent events in the Persian Gulf where I have found it necessary to deploy American soldiers 7,000 miles from home to protect our vital national interests," the president said.

He said his administration would seek repeal of the ban.

Saying that gas exploration carries little environmental risk, Bush said, "It is shortsighted to restrict exploration for this relatively clean energy source."

The bill, spurred toward passage by last year's 11-million-gallon spill by the Exxon Valdez in Alaska, requires double-hull construction of oil tankers and sets new crew licensing and manning requirements for oil ships.

Bush said a $1 billion trust fund will be available to cover cleanup costs and damages not compensated by the spiller. However, he said the spiller's "financial responsibility requirements are greatly increased."