The typically cited first microcomputer virus in the wild was for the Apple II in 1982.
https://en.wikipedia.org/wiki/Elk_Cloner