My opinion is that patents technically apply to tangible inventions--those things one can see and feel. Copyrights technically apply to intangible inventions--those things one cannot see or feel.
A frombus made of aluminanium with a trans-attached widget allowing one to daisy-chain a set of frombi would be patentable.
A software algorithm is intangible; it is entirely virtual. It takes no tangible form in the universe. It is comprised solely of bits and bytes which are, themselves, intangible. Software is an idea and can only be copyrighted. One may be able to touch the paper source code is printed on. One may be able to read the source code or even a printable representation of the compiled software. But these forms are not the form software takes when it is executed. What about firmware? you ask. The object containing the firmware can be patented, but firmware itself remains an idea.