CSX Corp. of Richmond yesterday reported record earnings for 1984, helped by $2.5 billion in revenue from its Texas Gas Resources Corp. subsidiary.

CSX, which has interests in rail and truck transportation, oil and gas transmission and exploration, and real estate and hotels, earned $465 million ($3.15 a share) for 1984, compared with $272 million ($2.07) in 1983, a 71 percent increase.

CSX attributed the record profits to the contribution from Texas Gas and to heavy stockpiling of coal by utility companies in anticipation of a strike that never occurred.

But profits for the fourth quarter were $78 million (52 cents), down from $104 million (76 cents) in 1983. The drop was attributed to a lag in coal shipments that followed the stockpiling effort.

A company spokesman said CSX expected 1985 coal shipments to exceed those in 1984 but that shipments would be "soft" in early 1985, as utilities continued to work off their stockpiles.

1984 was the first year in which Texas Gas contributed a full 12 months' revenue to the parent company. Acquired in mid-1983, Texas Gas contributed only five months' revenue to CSX last year. In 1984, Texas Gas oil sales were up 29 percent over 1983, while gas sales were up 23 percent. CSX domestic coal shipments were up 15 percent, and coal exports, 11 percent.

The previous CSX earnings record was $461 million ($3.73) in 1981. Although 1984 earnings were higher, per-share earnings ($3.15) were lower than in 1981 because a stock split and a new stock offering raised the number of outstanding shares.CSX's total 1984 revenue was $7.9 billion, up 35 percent from 1983.