This seems to be widespread, but everyone has a different idea of the narrative. It was a joke performed on a calculator. The narrative I first heard went as follows:
“Dolly Parton wears bra size 69 (type 69 into the calculator). That’s too, too, too big. (type 2 2 2). The doctor gives her fifty-one pills (type 51) to take for 8 days (type x 8). And she ends up….”
The answer is 55378008. Turn it upside-down and it says “BOOBLESS.”
The narrative varied even in my school. The kid who taught me the Diarrhea song opened it with “Dolly Parton’s boobs weigh 59 pounds…” The girls in my 6th grade had a version where the multiplication key stood for “Dr. X.”
From what I can tell on Google, it looks like this was going around by 1984. Not sure how much further back it could go – it probably started among engineering students in college who had calculators before other people did.