It depends on what you mean by "software". For example, the well-known RSA algorithm patent was filed in 1977.
What most people are calling "software patents" are actually business method patents, which do not necessarily involve software at all (though many of the infamous ones do). Business method patents are relatively new and largely unique to the US.