A paper titled State of Confusion explains the history of software patents in the United States. The presentation mentions the 1968 of the US Patent Office examination guidelines:
PTO’s 1968 Guidelines
Instructed all patent examiners to reject all computer program-related inventions as unpatentable subject matter.
If all computer program-related inventions were unpatentable subject matter at that time, and considering that the law did not change, why does the USPTO is granting zillions of software patents right now? Answer: the CAFC decisions that made all computer program-related inventions as patentable subject matter.