Billy Bob Crim was four years old when they struck oil in this dirt-poor cotton-farming town, and his father had to make a decision. Should he dig an oil well in the front yard, or out back?

"Daddy didn't drill in either place," Crim, 58, tells the story with relish, "because if he did, me and John T. [his brother] wouldn't have had any place to play."

Such decisions were easy in the Texas of 1930, awash in newly found oil.

But today, still in Crim's lifetime, the gusher is in decline.

Texas is going dry.

The state that made oil famous has been forced to search for new riches, and that search has produced an unlikely partnership of microchips and moguls, of college presidents and politicians, as Lone Star institutions struggle toward a high-tech future.

Half a century ago, Kilgore sat atop the biggest oil strike in history.

In the boom set off by wildcatter C.M. (Dad) Joiner's 1930 discovery, they dug up cemeteries here to drill for oil, they ripped a Presbyterian Church in half, they erected a forest of 24 derricks toe-to-toe along a single block of Main Street, tearing down all the stores in the way.

They drilled with such frenzy that, until the Texas Rangers were sent in to enforce production limits in 1931 under martial law, they had driven the world price of oil down from $1.10 a barrel to 10 cents a barrel.

Even with the limits, tiny Kilgore (population 800 before the discovery, 8,000 after) had 1,200 oil wells pumping away throughout the 1930s and '40s, some capable of producing a fantastic 10,000 barrels a day.

That was then.

Now, there are fewer than 100 producing wells in Kilgore, and they cough up but a pittance -- an average of fewer than 10 barrels a day of oil, mixed with a couple hundred barrels of the salt water that each year encroaches a few feet further into the legendary East Texas oilfield.

Kilgore, in short, is running out of oil, as is the entire state.

It won't happen next month or next year; it won't happen for 20 or 30 years. If price and technology make the state's sizable reserves of hard-to-get oil worth extracting, it won't happen even then.

But it has begun to happen. Oil production and oil reserves in Texas have declined by more than a third since the peak production year of 1972, and there have been no major new finds in a quarter of a century.

And so Texas -- whose name is virtually synonymous with oil; whose political power, economic clout and fabulous private wealth are drawn from oil; whose low taxes, high-risk entrepreneurial zeal, braggadocio, broadness of character, coarseness of manner, grittiness of determination all have been fueled by oil; and whose made-in-Hollywood grip on the imagination of cultures all over the world has been preserved by oil -- is weaning itself from oil.

It is a remarkable transformation. The state's economy, once built on cattle and cotton, then suddenly flush with oil, is barely a decade into the business of building a diverse manufacturing base. In that sense, it is a century behind the East Coast.

But now, even as that catch-up industrialization process is proceeding in fits and starts, the energy-based manufacturing sectors -- oil and gas extraction, oil refining, the petrochemical industry -- already are in long-term decline. So Texas is trying to leapfrog into another economic revolution, into frontiers of knowledge and high technology.

"High Tex," they call it here.

"Knowledge is the oil and gas of our future," said Jon Newton, departing chairman of the board of regents of the oil-rich University of Texas system.

In the Texas of 1985, a broad consensus of academicians, politicians and, especially, business leaders share that view. They believe that wherever the state's economy is headed, it is the university system that will take it there.

As a result, the 14-school university system is beginning to play a role roughly akin to what an aggressive Chamber of Commerce might do in a small city, or what a "national industrial policy" might do for the whole country.

That is, as they decide what research to pursue in which areas of the state, the universities are self-consciously placing themselves in the economic-development business as well as the knowledge business.

"The universities aren't merely an ornament anymore," said Walt W. Rostow, former national security affairs adviser for President Lyndon B. Johnson, now professor of political economy at the University of Texas, who served on a gubernatorial commission that projected the needs of the state through the year 2000. "They are now seen here as a part of the bottom line." 'High-Tech Highways'

Just in the past year, a broad range of new links has begun to be forged all over Texas between university research programs and high-tech companies, or basic industries looking to retool, or small entrepreneurs looking to start out, or real estate interests looking for general economic expansion.

This is by no means a novel formula. In the 1960s and 1970s, Stanford/Silicon Valley in California and MIT/Route 128 in Massachusetts got a jump on the rest of the country in the commercialization of knowledge. Today, in all but a handful of the 50 states, mad scrambles are under way to create "high-tech highways" that marry university research with economic development.

Texans, with characteristic can-do spirit, believe that they are poised to break out of the pack, perhaps far enough to be on a par with the granddaddy centers in Palo Alto and Boston, although the emergence of high tech here won't take such a geographically concentrated form.

There are good reasons for this bravado. For starters, the UT system has a financial base that is the envy of the academic world. Its $2.1 billion endowment -- which has been massing since oil was discovered 62 years ago under the "worthless" 2.1 million acres of state lands set aside for higher education in the constitution of 1876 -- is unmatched by any public system in the country and topped only by Harvard's $2.4 billion. University Coffers Brim

Moreover, Texas chauvinism is being put to productive work. Private donations to the UT system have topped $100 million for each of the past two years; among public institutions, only the University of California system raises more.

And the best, they'll guarantee you down here, is yet to come. "We're about 50 first-class funerals away from having a private foundation base in Texas that can top anything in the East," said Jack Rains, chairman of the board of 3D/I, a Houston-based engineering company. "You can bet that the bulk of that money is going to go straight into education."

Private donations already have enabled the flagship school of the state system -- the University of Texas at Austin -- to raise its endowed faculty positions from 112 to 802 in four years. No institution of higher education, public or private, has ever undergone such a bold, compressed reach for faculty excellence.

They're reaching for student excellence, as well. Texas A&M and UT-Austin rank nationally in the top five in the number of National Merit Scholars; both schools woo high school whiz kids with the ardor, and full scholarships, usually reserved for 260-pound linemen.

In the 1960s, politicians often treated the university system as a plaything. In the 1980s, the politicians have become cheerleaders for education and research.

Despite a projected state budget shortfall of $1.1 billion in the next two years, Gov. Mark White's proposed budget calls for a quadrupling -- to $80.7 million -- of state spending on pure research. Last year White pushed through the largest tax increase in state history to improve the state's underfunded and low-achieving elementary and secondary schools.

His strongest allies for higher taxes for education, importantly, were in the business community.

"We in this state have been lucky enough to sit on top of a whole bunch of oil and gas, but when we're in rocking chairs and that's all played out, we better make damn sure our kids have something upstairs to keep the state going," computer magnate H. Ross Perot told Texans in a call-to-books speech he delivered across the state last year.

Texas, to be sure, has a long way to go. Even with the new taxes, funding for public schools here still is well below national norms, and student test results still are near the bottom. High school students here rank 17th of the 22 states that collect Scholastic Aptitude Test data. The low-tax mentality will die slowly in the state legislature.

Still, it's the private sector-university connection that's driving most of the effort to diversify.

Some examples, in the last year alone:

* A real estate developer in Fort Worth gives the University of Texas at Arlington $5 million to set up a robotics institute that, he hopes, will attract new industry and keep the existing aerospace and automobile plants in the area competitive.

* A developer in San Antonio donates money and land to launch one of Mayor Henry Cisneros' pet projects, an Institute of Biotechnology at the University of Texas Health Sciences Center that will, he hopes, spur the development of a biomedical industry in San Antonio.

* An independent oilman in Houston gives $10 million in seed money to a new consortium of four universities -- UT, Texas A&M, Rice University and the University of Houston -- so it can compete to build a federally sponsored $2 billion atom smasher, and conduct research in laser applications in cancer treatment.

Given the zeal with which the state is bounding down the high-tech highway, cool heads cry out to be heeded.

"These are all experiments," said Victor L. Arnold, director of UT's Bureau of Business Research. "They are all worth pursuing. But we just don't have any track record yet.

"If you're looking at high tech to be a panacea for unemployment problems, you're making a big mistake. We do econometric projections here, and even under the most liberal assumptions, we can't get high tech to provide more than 10 percent of our jobs by the year 2000."

Still, conquering new frontiers is near the very core of what makes Texas Texas. The state has the gusto to build a new economy, it has the money, it's working on the smarts, and, all of a sudden, it sees the need. 'The Clock Is Ticking'

"The clock is ticking," said George Christain, former press secretary to President Johnson and now a political consultant and business lobbyist in Austin. "We better damn well get ourselves a new base before the oil runs out."

Why will that be?

Texans have pumped 47 billion barrels of oil out of the ground since the Spindletop discovery started it all at the turn of the century. Geologists say there are another 8 billion barrels of proven reserves in the state.

At current drilling rates, that will be long gone by the year 2000. Moreover, prospects for major new finds in Texas -- surely the most pawed-over land on the continent -- are considered remote.

That's a bleak picture, but it is not quite the whole picture. Texas also has some 110 billion of barrels of oil that has been classified as "unrecoverable" -- too deep or locked too tightly in rock formations to be worth the cost of extraction. Supply and Demand

Dr. William L. Fisher, chairman of UT's Department of Geology, believes that new technologies have made 35 billion of those 110 billion barrels recoverable. Assuming that oil prices hold and energy demand grows, he believes that half of the 35 billion will be drilled by the year 2000.

"What created a market for these technologies was the explosion in price that began in 1973," Fisher said. "It prolonged the life of thousands of wells that would have been capped years ago. It could well extend the oil-extraction business in this state well into the 21st Century."

The irony of the oil price explosion is that it occurred just as production in this state was peaking. In 1972 -- the peak year of oil production here -- a barrel of crude sold for $3.48. In 1982, the peak year for price, it had shot up more than ninefold, to $32.48.

Small wonder, then, that the realization that Texas has built its economic and tax base on a declining natural resource has been slow to sink in here. Look what oil and natural gas, which has undergone similar production declines and price increases, did for the state through that 10-year stretch:

* Oil and gas employment tripled, to 311,000.

* State revenues from the oil severance tax grew sixfold, from $210 million in fiscal year 1973 to $1.3 billion in fiscal year 1982, despite a 30 percent decline in oil production during that period.

* Sales and severance taxes on the energy industry came to account for 40 percent of all state revenues by 1982.

"We have been taxing the hell out of a declining resource base," said Bernard Weinstein, an economist at the John Gray Institute in Beaumont. With the energy bust of the past three years, that figure now is down to 30 percent and dropping. "I'm afraid this state has 10 years of hard slogging ahead in the area of taxes," he said.

What has awakened Texans to the drying up of its chief natural resource is not so much the long-term production decline, but the short-term price softening.

The effects of the price bust have been dramatic.

Houston, the red-hot energy capital of the Southwest through the 1970s, is sitting on 30 million square feet of unleased office space -- roughly enough to house all of downtown Denver. Business foreclosures in Houston ran at an all-time high in 1984, double the 1983 rate.

Statewide, 16 oil refineries have shut their doors since 1981, and 123,000 manufacturing jobs have been lost. Most of the losses come from industries that supply the energy business, such as fabricated metal and machinery, and industries that processs energy as a raw material, such as refineries and petrochemical plants.

"We were on a drunken stupor of prosperity," said Kenneth Schnitzer, a Houston developer heading a hurry-up effort by a business panel to expand Houston's economic base. "We're just now sobering up."

"We had a decade of hyperprosperity," said Jared Hazelton, president of the Texas Research League, a business-funded research group. "There wasn't anything you could do but make money."

"For a while here, people who used to sell typewriters got into the oil business and people who used to cut hair got into the real estate business," said 3D/I's Rains, "Now they're back to selling typewriters and cutting hair. It's what you call a market correction."

Houston is widely perceived as the chief victim of the energy bust, long- and short-term, but that's probably a misreading of its future. Other Irons in the Fire

The energy business in Houston is tied more to servicing than to extraction; and it is tied more to the worldwide oil industry than to the Texas industry. In short, when the wells go dry in Texas, Houston still will be one of the world's energy capitals.

Moreover, despite its domination by the energy industry, Houston has other irons in the fire. For example, the Texas Medical Center, one of the largest medical complexes in the world, has more employes -- 56,000 -- than the city's 10 largest oil companies combined.

"We have a port, we have NASA, we have medicine," said J.L. Taylor of the Houston Chamber of Commerce. "We probably should have started to diversify 15 years ago, but when you have 1,000 new people moving into your city every week, who worries about broadening your base?"

In the 1970s, the Houston area grew by 970,000 residents and jumped from 76th to 11th place among metropolitan areas in per capita income.

"We have achieved a certain critical mass," Taylor said. "The irony is that we are much better poised to diversify now than we were 15 years ago, when I first started beating the drums for diversification."

There are other corners of the state whose long-term prospects seem dimmer -- and they tell another side of oil's decline in Texas.

Take Kilgore and Billy Bob Crim.

When Dad Joiner struck oil here, on Dec. 28, 1930, it was in a well he had spudded on a 900-acre farm owned by Lu Della Crim, Billy Bob's grandmother. The Crims became millionaires overnight.

So did lots of folks in East Texas. Joiner's pool of oil turned out to be an astounding 42 miles long and an average of five miles wide. It put all previous oil discoveries to shame.

A handful of subsequent strikes in the Middle East and Alaska have turned up even larger fields, but no single field has ever been more intensely drilled than East Texas.

In the oil industry, a field containing 100 million barrels is considered a major find. The East Texas field has produced 5 billion barrels, and it is still going -- albeit at a drastically reduced rate.

Some 31,500 wells have been drilled into the field over the past 54 years. Fewer than 650 have been dry holes. More than 19,000 of the wells have been plugged and abandoned, and most of those that remain are stripper wells, producing 10 barrels a day or less. Geologists predict that the field will play out within the next 15 years.

For the local tax base, the impact will be devastating. Oil accounts for $3.3 billion of the $6 billion tax base of Gregg County, where the East Texas field sits.

The local tax consequences of declining oil production don't belong to East Texas alone -- although the problem is more advanced here. More than one-fourth of the counties in Texas -- 69 of 254 -- are in a similar position: More than half of their tax base comes from a dwindling natural resource.

For some cities, the situation is even more dire. Clarksville City, located a few miles north of here where the East Texas field still is productive, draws $358 million of its $368 million tax base from oil.

"It's going to be terrible when the oil runs out," said Buddy Potter, who owns an oil production company in Kilgore. "We keep on having tax consultants come in to tell us how to expand our base. But I just don't think folks are really ready for it."

Loss of tax base hits hard. Loss of royalty income hits harder still.

Oil has brought the landowners of East Texas what they like to call "cash-flow." In great abundance. Royalties Running Dry

An owner of an oil property -- or of the mineral rights to the property -- typically receives a bonus for allowing a production company to drill on the land, plus royalties worth a one-eighth share of whatever the company pulls out of the ground.

In the past three decades, the royalty owners of Texas -- most of them small landowners whose shares have been sold, inherited and otherwise split into millions of pieces -- have been paid an estimated $41 billion in oil royalties.

Back in 1931, the Crims leased the rights to drill on their property to Humble Oil, now Exxon, for $2.1 million. Family members have been drawing royalty checks every month since then.

"The royalty income has got to be well into the millions, though I don't think anyone in the family has ever totaled it up," said Trey Crim, 31, Billy Bob's nephew. "But one thing's for damn sure -- it's running out now."

Trey said his share of the royalties dropped to $5,000 last year. It prompted him to do something that no one in his family had ever done before. He got into the oil business.

Crim's company, Long-Tex Exploration Inc., raised money from small investors to drill five wells last year -- not at the 3,600 foot depth of the Dad Joiner discovery, but at 8,000 to 10,000 feet. He was looking for the hard-to-get oil.

"We hit three of five," Crim said. "We paid off our investors in four months. Those wells ought to produce for another year."

As for the rest of the Crim family -- well, over the years it has dabbled in the tobacco business, the laundry business, the timber business. But mostly it has chosen to stay in Kilgore, live simple, decent lives and cash in royalty checks. The Crims' hometown has the sleepy, serene, small-town look of a place whose future came and went long ago.

There is a commemorative derrick on Main Street, marking what was once the "world's richest acre." There are three more in Lu Della Crim's front yard.

Joiner, who had made and lost two oil fortunes in his prime, was old and broke when he hit the East Texas field. Worse, he'd sold off more than 100 percent of his interest in the land leases to raise the money he needed to keep drilling. Along came a shrewd young man, H.L. Hunt, who bought up all of Joiner's leases, paid off his creditors -- and the rest, as they say, is history.

There are 12,000 people in Kilgore. Some folks here say that the town could have grown bigger, the way Longview did, up the road a stretch -- but that old, conservative families like the Crims just didn't want it to. The go-getters of Kilgore, well, they took their cash-flow and moved to Houston or Dallas.

The future seems uncertain here, even to the Crims. When they struck oil in Kilgore in 1930, it was at the depth of the Depression, "and it seemed like the whole world was pouring out its goodies at your feet," says the narrator of the film at the local museum.

Now, said Billy Bob Crim, "it seems like all good things must come to an end.