Misplaced Pages

Elk Cloner

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

Elk Cloner is one of the first known microcomputer viruses that spread "in the wild", i.e., outside the computer system or laboratory in which it was written. It attached itself to the Apple II operating system and spread by floppy disk. It was written around 1982 by programmer and entrepreneur Rich Skrenta as a 15-year-old high school student, originally as a joke, and put onto a game disk.

#810189

41-520: Elk Cloner spread by infecting the Apple DOS 3.3 operating system using a technique now known as a boot sector virus . It was attached to a program being shared on a disk (usually a game). At set numbers of times the disk's program had been run (all multiples of 5), it would cause various strange behaviors of the Apple II, many requiring a reboot to correct. Most noticeably, every 50th time the program

82-520: A disk controller and booted from it when the system was powered up—earning it the name "Autostart ROM ". DOS 3.2.1 was then released in July 1979 with some minor bug fixes. Apple DOS 3.3 was released in 1980. It improves various functions of release 3.2 including a rewrite of the RWTS to make it faster, while allowing for large gains in available floppy disk storage. The newer P5A/P6A PROMs in

123-445: A DOS, his co-founder Steve Jobs decided to outsource the task. The company considered using Digital Research 's CP/M , but Wozniak sought an operating system that was easier to use. On 10 April 1978 Apple signed a $ 13,000 contract with Shepardson Microsystems to write a DOS and deliver it within 35 days. Apple provided detailed specifications, and early Apple employee Randy Wigginton worked closely with Shepardson's Paul Laughton as

164-732: A difference that would be seen in their later languages for the Atari. On April 10, 1978, Shepardson Microsystems signed a contract with Apple . For $ 13,000 — $ 5,200 up front, and $ 7,800 on delivery, and no additional royalties — Shepardson Microsystems would build Apple DOS , Apple's first disk operating system — and hand it over just 35 days later. For its money, Apple would get a file manager , an interface for Integer BASIC and Applesoft BASIC , and utilities that would allow disk backup, disk recovery, and file copying. Apple provided detailed specifications, and early Apple employee Randy Wigginton worked closely with Shepardson's Paul Laughton as

205-529: A file one at a time between a disk buffer and main memory, requiring more time and resulting in DOS constantly blowing revs when reading or writing files. Programs became available early on to format disks with modified sector interleaves; these disks give DOS more time between sectors to copy the data, ameliorating the problem. Later, programmers outside Apple rewrote the File Manager routines to avoid making

246-475: A file's structural integrity. There is also a CATALOG function, for listing files on the diskette, and an INIT function, which formats a disk for use with DOS, storing a copy of DOS on the first three tracks, and storing a startup program (usually called HELLO) that is auto-started when this disk is booted from. On top of the File Manager API, the main DOS routines are implemented which hook into

287-502: A fresh copy of DOS to the infected disk. Furthermore, once Elk Cloner was removed, the previously infected disk would not be reinfected since it already contained the Elk Cloner "signature" in its directory. It was also possible to "inoculate" uninfected disks against Elk Cloner by writing the "signature" to the disk; the virus would then think the disk was already infected and refrain from writing itself. Apple DOS Apple DOS

328-720: A new high-level format that is suitable for devices of up to 32  MB ; this makes it suitable for hard disks from that era and 3.5-inch floppies . All the Apple computers from the II Plus onward can run both DOS 3.3 and ProDOS, the Plus requiring a "Language Card" memory expansion to use ProDOS; the e and later models have built-in Language Card hardware, and so can run ProDOS straight. ProDOS includes software to copy files from Apple DOS disks. However, many people who had no need for

369-403: A prank in 1982. Skrenta already had a reputation for pranks among his friends. In sharing computer games and software, he would often alter the floppy disks to shut down or display taunting on-screen messages. Due to this reputation, many of his friends simply stopped accepting floppy disks from him. Skrenta thought of methods to alter floppy disks without physically touching or harming them. During

410-697: A series of very tiny programs, each of which carries the loading process forward a few steps before passing control to the next program in the chain. The original Apple II included BASIC interpreter in ROM known originally as Apple BASIC and later as Integer BASIC . Variables in this language can only handle integer numbers ranging from −32,768 to +32,767 ( 16-bit binary values); floating point numbers are not supported. Apple commissioned Microsoft to develop Applesoft BASIC , capable of handling floating-point numbers. Applesoft BASIC cannot run Integer BASIC programs, causing some users to resist upgrading to it. DOS 3.3

451-471: A track in two revolutions with proper interleaving . A sector of the spinning disk passes under the read/write head while the RWTS routine is decoding the just-read sector (or encoding the next one to be written), and if this missed sector is the next one needed, DOS needs to wait nearly an entire revolution of the disk for the sector to come around again. This is called "blowing a rev" and is a well-understood performance bottleneck in disk systems. To avoid this,

SECTION 10

#1732779740811

492-463: A utility to migrate Apple DOS 3.2 files and programs to version 3.3 disks. Apple never offered a utility to copy in the other direction. To migrate Apple DOS 3.3 files back to version 3.2 disks, someone wrote a "NIFFUM" utility. There are also commercial utilities (such as Copy II Plus ) that can copy files between either format (and eventually ProDOS as well). Release 3.3 also improves the ability to switch between Integer BASIC and Applesoft BASIC, if

533-485: A winter break from Mt. Lebanon High School in Mt. Lebanon, Pennsylvania , Skrenta discovered how to launch the messages automatically on his Apple II computer. He developed what is now known as a boot sector virus, and began circulating it in early 1982 among high school friends and a local computer club. Twenty-five years later, in 2007, Skrenta called it "some dumb little practical joke." According to contemporary reports,

574-595: Is Apple DOS 3.3 in the 1980 and 1983 releases. Prior to the release of Apple DOS 3.1, Apple users had to rely on audio cassette tapes for data storage and retrieval. When Apple Computer introduced the Apple II in April 1977, the new computer had no disk drive or disk operating system (DOS). Although Apple co-founder Steve Wozniak designed the Disk II controller late that year, and believed that he could have written

615-432: Is the disk operating system for the Apple II computers from late 1978 through early 1983. It was superseded by ProDOS in 1983. Apple DOS has three major releases: DOS 3.1, DOS 3.2, and DOS 3.3; each one of these three releases was followed by a second, minor "bug-fix" release, but only in the case of Apple DOS 3.2 did that minor release receive its own version number, Apple DOS 3.2.1. The best-known and most-used version

656-533: The Apple II debuted, the original Apple DOS source code was released by the Computer History Museum on its website. It was donated by the original author, Paul Laughton. Shepardson Microsystems Shepardson Microsystems, Inc. (SMI) was a small company producing operating systems and programming languages for CP/M , the Atari 8-bit computers and Apple II . SMI is most noted for

697-572: The "S" type as data files. A call vector table in the region of $ 03D0–03FF 16 allows programs to find DOS wherever it is loaded in the system memory. For example, if the DOS hooked into the BASIC CLI stops functioning, it can be reinitialized by calling location $ 03D0 16 (976 10 ) – hence the traditional 3D0G ("3D0 go") command to return to BASIC from the System Monitor . The process of loading Apple DOS involves

738-409: The DOS from being continually rewritten each time the disk was accessed, Elk Cloner also wrote a signature byte to the disk's directory, indicating that it had already been infected. The poem that Elk Cloner would display was as follows: Elk Cloner did not cause deliberate harm, but Apple DOS disks without a standard image had their reserved tracks overwritten. Elk Cloner was created by Skrenta as

779-410: The computer has a language card ( RAM expansion) or firmware card. Apple DOS 3.1 disks use 13 sectors of data per track, each sector being 256 bytes . It uses 35 tracks per disk side, and can access only one side of the floppy disk, unless the user flipped the disk over . This gives the user a total storage capacity of 113.75 KB per side, of which about 10 KB are used to store DOS itself and

820-523: The disk controller enable the reading and writing of data at a higher density, so 16 sectors (4 KiB) can be stored per track instead of 13 sectors (3.25  KiB ), increasing capacity from 113.75 KB to 140 KB per side – 16 KB of which is used by filesystem overhead and a copy of DOS, leaving 124 KB for user programs and data. DOS 3.3 is, however, not backward compatible ; it cannot read or write DOS 3.2 disks. To address this problem, Apple Computer released "MUFFIN",

861-481: The disk directory, leaving about 100 KB for user programs. The first layer of the operating system is called RWTS, which stands for "read/write track sector". This layer consists of subroutines for track seeking, sector reading and writing, and disk formatting. An API called the File Manager was built on top of this, and implements functions to open, close, read, write, delete, lock (i.e. write-protect ), unlock (i.e. write-enable), and rename files, and to verify

SECTION 20

#1732779740811

902-607: The extra copy for most sectors of a file; RWTS was instructed to read or write sectors directly to or from main memory rather than from a disk buffer whenever a full sector was to be transferred. An early patch to provide this functionality was published in Call-A.P.P.L.E. . Speedups in the LOAD command of three to five times were typical. This functionality soon appeared in commercial products, such as Pronto-DOS, Diversi-DOS, Hyper-DOS, and David-DOS, along with additional features, but it

943-442: The free sector map, which was restricted to part of a single sector) is such that it is not possible to have more than 400 KB available at a time per drive without a major rewrite of almost all sections of the code; this is the main reason Apple abandoned this iteration of DOS in 1983, when Apple DOS was entirely replaced by ProDOS . ProDOS retains the 16-sector low-level format of DOS 3.3 for 5.25 inch disks, but introduces

984-506: The ill-fated Apple III computer and its SOS operating system. Two more versions of Apple DOS, both still called DOS 3.3 but with some bug fixes and better support for the new Apple IIe model, were released in early and mid-1983. Without third-party patches , Apple DOS can only read floppy disks running in a 5.25-inch Disk II drive and cannot access any other media, such as hard disk drives, virtual RAM drives, or 3.5-inch floppy disk drives. The structure of Apple DOS disks (particularly

1025-430: The improvements of ProDOS (and who did not like its much higher memory footprint ) continued using Apple DOS or one of its clones long after 1983. The Apple convention of storing a bootable OS on every single floppy disk means that commercial software can be used no matter what OS the user owns. A program called DOS.MASTER enables users to have multiple virtual DOS 3.3 partitions on a larger ProDOS volume, which allows

1066-424: The latter wrote the operating system with punched cards and a minicomputer . There was no Apple DOS 1 or 2. Versions 0.1 through 2.8 were serially enumerated revisions during development, which might as well have been called builds 1 through 28. Apple DOS 3.0, a renamed issue of version 2.8, was never publicly released due to bugs. Apple published no official documentation until release 3.2. Apple DOS 3.1

1107-530: The latter wrote the operating system with punched cards and a minicomputer . That deal enabled release and sales of Apple's Disk II drive. Atari, Inc. planned to follow up its successful Video Compuer System console with more powerful home computers (the Atari 400 and 800 ), to be introduced at the January 1979 Consumer Electronics Show . A version of Microsoft BASIC for the MOS 6502 had been licensed for

1148-740: The machine's BASIC interpreter and intercept all disk commands. It provides BLOAD , BSAVE , and BRUN for storing, loading, and running binary executables . LOAD , RUN , and SAVE are provided for BASIC programs, and an EXEC was provided for running text-based batch files consisting of BASIC and DOS commands. Finally, four types of files exist, identified by letters in a catalog listing: There are four additional file types; "R", "S", and an additional "A" and "B", none of which are fully supported. DOS recognizes these types for catalog listings only, and there are no direct ways to manipulate these types of files. The "R" type found some use for relocatable binary executable files. A few programs support

1189-414: The name implies, was intended to run on Cromemco Z-series Z80 -based computers with 16 kB of RAM . As machines shipped with ever-increasing amounts of RAM, due largely to the replacement of SRAM with the much denser DRAM in the mid-1970s, SMI further expanded their version as the 26 kB Cromemco Structured BASIC, while a cut-down 12 kB version was released as CP/A Business BASIC. At

1230-476: The original Apple II disk operating system, Atari BASIC , and Atari's disk operating system . Shepardson Microsystems was founded by Robert Shepardson in Saratoga Springs, New York . The company got its start in the microcomputer arena by producing a series of BASIC programming language interpreters for the burgeoning S-100 bus computer market. Their first product was Cromemco 16k BASIC, which, as

1271-464: The same amount of memory as the one that had created them. MASTER CREATE includes a self-relocating version of DOS that boots on Apples with any memory configuration. Apple DOS 3.2 was released in 1979 to reflect changes in computer booting methods that were built into the successor of the Apple II, the Apple II Plus. New firmware included an auto-start feature which automatically found

Elk Cloner - Misplaced Pages Continue

1312-426: The same track. However, the sector 0 actually needed in most cases will be on the next-higher track, and that track can be arranged relative to the last one to allow the needed time to decode the just-read sector and move the head before sector 0 comes around. On average, a full track can be read in two revolutions of the disk. The early DOS File Manager subverted this efficiency by copying bytes read from or written to

1353-461: The sectors on a DOS disk are arranged in an interleaved order: Later, ProDOS arranged the sectors in this order: When reading and decoding sector 0, then sector 8 passes by, so that sector 1, the next sector likely to be needed, will be available without waiting. When reading sector 7, two unneeded sectors, f and 0, pass by before sector 8 is available, and when reading sector 15, the drive will always have to wait an extra revolution for sector 0 on

1394-489: The systems, but the task of retrofitting the code into an 8k cartridge proved too difficult. Atari turned to Shepardson Microsystems to help with the port, but after struggling with it themselves, they proposed developing a new BASIC instead of using Microsoft BASIC. Atari contracted with SMI not only for Atari BASIC , but the Atari Disk Operating System as well. SMI had their BASIC finished before

1435-418: The time they were written, Microsoft BASIC was widespread but not as universal as it would be by the early 1980s. SMI's BASICs were based on the concepts and syntax of Data General Business Basic (which was very similar to HP Time-Shared BASIC ), as opposed to Digital 's BASIC-PLUS that formed the basis for MS BASIC. As a result, SMI's BASICs incorporated a different way to handle strings and input/output,

1476-433: The use of many floppy-based DOS programs with a hard disk. Shortly after ProDOS came out, Apple withdrew permission from third parties to redistribute DOS 3.3, but granted one company, Syndicomm, an exclusive license to resell DOS 3.3. Commercial games usually did not use Apple DOS, instead having their own custom disk routines for copy protection purposes as well as for performance. DOS's RWTS routine can read or write

1517-479: The virus was quite contagious, successfully infecting the floppies of most people Skrenta knew, and upsetting many of them. Skrenta's high school math teacher, on encountering the program on his computer, accused Skrenta of breaking into his office. Part of the "success" was that people were not at all wary of the potential problem, nor were virus scanners or cleaners available. The virus could be removed using Apple's MASTER CREATE utility or other utilities to rewrite

1558-416: Was never used in an official Apple DOS release. Similar functionality was, however, employed by Apple's successor operating system, ProDOS. The Apple IIGS -specific operating system GS/OS would eventually employ an even more efficient "scatter read" technique that would read any sector that happened to be passing under the read head if it was needed for the file being read. In 2013, more than 35 years after

1599-520: Was publicly released in June 1978, slightly more than one year after the Apple II was introduced, becoming the first disk-based operating system for any Apple computer. A bug-fix release came later, addressing a problem by means of its MASTER CREATE utility, which was used to create Apple DOS master (bootable) disks: The built-in INIT command created disks that could be booted only on machines with at least

1640-432: Was released when Applesoft BASIC was standard in ROM on the Apple II Plus, so Apple designed it to support switching back and forth between the two BASIC interpreters. Integer BASIC is loaded into RAM on the language card of Apple IIs (if present) and by typing FP or INT from BASIC, the user can switch between either version. After 1980, Apple DOS entered into a state of stagnation as Apple concentrated its efforts on

1681-412: Was run, instead of executing normally, it would change to a blank screen that displayed a poem about the virus. If a computer booted from an infected floppy disk , a copy of the virus was placed in the computer's memory . When an uninfected disk was inserted into the computer, a modified version of DOS including Elk Cloner would be copied to the disk, allowing it to spread from disk to disk. To prevent

Elk Cloner - Misplaced Pages Continue

#810189