Congress never passed a law allowing software patents, though. It was the courts (but only the lower courts, never the Supreme Court) which historically interpreted the old patent laws (written before the age of computers) to apply to software -- I don't know of any parts of Title 35 which cover software specifically. Congress could modify the law to explicitly allow software patents, but they haven't.