Apple Worm

From Wikipedia, the free encyclopedia
Jump to: navigation, search

The Apple Worm is a computer program written for the Apple computer, and especially for the 6502 microprocessor, which performs dynamic self-relocation. The source code of the Apple Worm is the first program printed in its entirety in Scientific American.[1] The Apple Worm was designed and developed by James R. Hauser and William R. Buckley.

Because the Apple Worm performs dynamic self-relocation within the one main memory of one computer, it does not constitute a computer virus, an apt if somewhat inaccurate description. Though the analogous behavior of copying code between memories is exactly the act performed by a computer virus, the virus has other characters not present in the worm. Such programs do not necessarily cause collateral damage to the computing systems upon which their instructions execute; there is no reliance upon a vector to ensure subsequent execution. This extends to the computer virus; it need not be destructive in order to effect its communication between computational environments.


A typical computer program manipulates data which is external to the corporeal representation of the computer program. In programmer-ese, this means the code and data spaces are kept separate. Programs which manipulate data which is internal to its corporeal representation, such as that held in the code space, are self-relational; in part at least, its function is to maintain its function. In this sense, a dynamic self-relocator is a self-referential system, as defined by Douglas R. Hofstadter.[2]

Other examples[edit]

The instruction set of the PDP-11 computer includes an instruction for moving data, which when constructed in a particular form causes itself to be moved from higher addresses to lower addresses; the form includes an automatic decrement of the instruction pointer register. Hence, when this instruction includes autodecrement of the instruction pointer, it behaves as a dynamic self-relocator.

A more current example of a self-relocating program is an adaptation of the Apple Worm for the Intel 80x86 microprocessor and its derivatives, such as the Pentium, and corresponding AMD microprocessors.[3]

External links[edit]


  1. ^ Dewdney, Alexander Keewatin (March 1985). "Computer Recreations - A Core War bestiary of viruses, worms and other threats to computer memories". Scientific American. 285: 38–39. Archived from the original on 2017-07-04. Retrieved 2017-07-04. 
  2. ^ Hofstadter, Douglas R. (1979). Gödel, Escher, Bach - An Eternal Golden Braid (1st ed.). 
  3. ^ Buckley, William R. (March 1988). "Hobnobbing with the Hyper Hacker, about Worms". ASCII Magazine. 13: 265–271.