Apple DOS
   HOME

TheInfoList



OR:

Apple DOS is the family of disk operating systems for the Apple II series of
microcomputers A microcomputer is a small, relatively inexpensive computer having a central processing unit (CPU) made out of a microprocessor. The computer also includes memory and input/output (I/O) circuitry together mounted on a printed circuit board (PC ...
from late 1978 through early 1983. It was superseded by
ProDOS ProDOS is the name of two similar operating systems for the Apple II series of personal computers. The original ProDOS, renamed ProDOS 8 in version 1.2, is the last official operating system usable by all 8-bit Apple II series computers, and w ...
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 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.


Version history

When
Apple Computer Apple Inc. is an American multinational technology company headquartered in Cupertino, California, United States. Apple is the largest technology company by revenue (totaling in 2021) and, as of June 2022, is the world's biggest company b ...
introduced the
Apple II The Apple II (stylized as ) is an 8-bit home computer and one of the world's first highly successful mass-produced microcomputer products. It was designed primarily by Steve Wozniak; Jerry Manock developed the design of Apple II's foam-m ...
in April 1977, the new computer had no disk drive or disk operating system (DOS). Although Apple co-founder
Steve Wozniak Stephen Gary Wozniak (; born August 11, 1950), also known by his nickname "Woz", is an American electronics engineer, computer programmer, philanthropist, inventor, and technology entrepreneur. In 1976, with business partner Steve Jobs, he c ...
designed the
Disk II The Disk II Floppy Disk Subsystem, often rendered as Disk ] '', is a -inch floppy disk drive designed by Apple Computer, Inc. It went on sale in June 1978 at a retail price of US$495 for pre-order; it was later sold for $595 () including the Di ...
controller late that year, and believed that he could have written a DOS, his co-founder
Steve Jobs Steven Paul Jobs (February 24, 1955 – October 5, 2011) was an American entrepreneur, industrial designer, media proprietor, and investor. He was the co-founder, chairman, and CEO of Apple; the chairman and majority shareholder of Pixar; a ...
decided to outsource the task. The company considered using
Digital Research Digital Research, Inc. (DR or DRI) was a company created by Gary Kildall to market and develop his CP/M operating system and related 8-bit, 16-bit and 32-bit systems like MP/M, Concurrent DOS, FlexOS, Multiuser DOS, DOS Plus, DR DOS and ...
's
CP/M CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/ 85-based microcomputers by Gary Kildall of Digital Research, Inc. Initial ...
, but Wozniak sought an operating system that was easier to use. On 10 April 1978 Apple signed a $13,000 contract with
Shepardson Microsystems Shepardson Microsystems, Inc. (SMI) was a small company producing operating systems and programming languages for CP/M, the Atari 8-bit family and Apple II computers. SMI is most noted for the original Apple II disk operating system, Atari BASI ...
to write a DOS and deliver it within 35 days. Apple provided detailed specifications, and early Apple employee
Randy Wigginton Randy Wigginton was one of Apple Computer's first employees (#6), creator of MacWrite, Full Impact, and numerous other Mac applications. He used to work in development at eBay, Quigo, Inc and Move.com. In November 2010, he left his position as ...
worked closely with Shepardson's
Paul Laughton Paul may refer to: *Paul (given name), a given name (includes a list of people with that name) *Paul (surname), a list of people People Christianity * Paul the Apostle (AD c.5–c.64/65), also known as Saul of Tarsus or Saint Paul, early Chri ...
as the latter wrote the operating system with
punched card A punched card (also punch card or punched-card) is a piece of stiff paper that holds digital data represented by the presence or absence of holes in predefined positions. Punched cards were once common in data processing applications or to di ...
s and a
minicomputer A minicomputer, or colloquially mini, is a class of smaller general purpose computers that developed in the mid-1960s and sold at a much lower price than mainframe and mid-size computers from IBM and its direct competitors. In a 1970 survey, ...
. 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 was publicly released in June 1978, slightly more than one year after the Apple II was introduced, becoming the first disk-based
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
for any Apple computer. A bug-fix release came later, addressing a problem by means of its utility, which was used to create Apple DOS master (bootable) disks: The built-in command created disks that could be booted only on machines with at least the same amount of memory as the one that had created them. 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 a disk controller and booted from it when the system was powered up—earning it the name "Autostart
ROM Rom, or ROM may refer to: Biomechanics and medicine * Risk of mortality, a medical classification to estimate the likelihood of death for a patient * Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac * ...
". 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, while also allowing for large gains in available
floppy disk A floppy disk or floppy diskette (casually referred to as a floppy, or a diskette) is an obsolescent type of disk storage composed of a thin and flexible disk of a magnetic storage medium in a square or nearly square plastic enclosure lined w ...
storage; the newer P5A/P6A
PROMs The BBC Proms or Proms, formally named the Henry Wood Promenade Concerts Presented by the BBC, is an eight-week summer season of daily orchestral classical music concerts and other events held annually, predominantly in the Royal Albert Hal ...
in the disk controller enabled the reading and writing of data at a higher density, so instead of 13 sectors (3.25 
KiB The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit ...
), 16 sectors (4 KiB) of data can be stored per disk track, increasing the capacity from 113.75 KB to 140 KB per disk side 16 KB of which is used by
filesystem In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
overhead and a copy of DOS, on a DOS 3.3-formatted disk, leaving 124 KB for user programs and data. DOS 3.3 is, however, not
backward compatible Backward compatibility (sometimes known as backwards compatibility) is a property of an operating system, product, or technology that allows for interoperability with an older legacy system, or with input designed for such a system, especially in ...
; it cannot read or write DOS 3.2 disks. To address this problem, Apple Computer released a utility called "MUFFIN" 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 from and to either format (and eventually
ProDOS ProDOS is the name of two similar operating systems for the Apple II series of personal computers. The original ProDOS, renamed ProDOS 8 in version 1.2, is the last official operating system usable by all 8-bit Apple II series computers, and w ...
as well). Release 3.3 also improves the ability to switch between Integer BASIC and Applesoft BASIC, if the computer has a language card (
RAM Ram, ram, or RAM may refer to: Animals * A male sheep * Ram cichlid, a freshwater tropical fish People * Ram (given name) * Ram (surname) * Ram (director) (Ramsubramaniam), an Indian Tamil film director * RAM (musician) (born 1974), Dutch * ...
expansion) or firmware card.


Technical details

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 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
subroutine In computer programming, a function or subroutine is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed. Functions may ...
s for track seeking, sector reading and writing, and disk formatting. An
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
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 a file's structural integrity. There is also a function, for listing files on the diskette, and an 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 the machine's BASIC interpreter and intercept all disk commands. It provides
BLOAD BSAVE and BLOAD are commands in many varieties of the BASIC programming language. BSAVE copies RAM to a binary file, and BLOAD copies the contents of the file to RAM. The term "BSAVE image" could mean any of various raw image formats of video di ...
,
BSAVE BSAVE and BLOAD are commands in many varieties of the BASIC programming language. BSAVE copies RAM to a binary file, and BLOAD copies the contents of the file to RAM. The term "BSAVE image" could mean any of various raw image formats of video di ...
, and
BRUN Brun may refer to: People * Brun (surname) * Brun (given name) * Brun I of Saxony (c. 830/840–880) * Brun of Querfurt (c. 974–1009), missionary archbishop and martyr * Brun I, Count of Brunswick (c. 975–c. 1010) Other * Brun (grape), ...
for storing, loading, and running binary executables. , , and are provided for BASIC programs, and an was provided for running text-based
batch file Batch may refer to: Food and drink * Batch (alcohol), an alcoholic fruit beverage * Batch loaf, a type of bread popular in Ireland * A dialect term for a bread roll used in North Warwickshire, Nuneaton and Coventry, as well as on the Wirra ...
s consisting of BASIC and DOS commands. Finally, four types of files exist, identified by letters in a catalog listing: * I –
Integer BASIC Integer BASIC is a BASIC interpreter written by Steve Wozniak for the Apple I and Apple II computers. Originally available on cassette for the Apple I in 1976, then included in ROM on the Apple II from its release in 1977, it was the first ve ...
programs (stored in a compact format, not plain-text) * A –
Applesoft BASIC Applesoft BASIC is a dialect of Microsoft BASIC, developed by Marc McDonald and Ric Weiland, supplied with the Apple II series of computers. It supersedes Integer BASIC and is the BASIC in ROM in all Apple II series computers after the original ...
programs (also stored in a packed, space-saving format) * B –
Binary file A binary file is a computer file that is not a text file. The term "binary file" is often used as a term meaning "non-text file". Many binary file formats contain parts that can be interpreted as text; for example, some computer document fil ...
s, either executable machine-language programs, or data files * T –
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of ...
text file A text file (sometimes spelled textfile; an old alternative name is flatfile) is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system. In operating ...
s (or plain-text, unpacked batch files) 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 the "S" type as data files. A call vector table in the region of $03D0–03FF allows programs to find DOS wherever it is loaded in the system memory. For example, if the DOS hooked into the BASIC
CLI CLI may refer to: Computing * Call Level Interface, an SQL database management API * Command-line interface, of a computer program * Command-line interpreter or command language interpreter; see List of command-line interpreters * CLI (x86 instruc ...
stops functioning, it can be reinitialized by calling location $03D0 (976) hence the traditional ("3D0 go") command to return to BASIC from the System Monitor.


Boot loader

The process of loading Apple DOS involves 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. *Originally, the Apple II ROM did not support disk booting at all. At power-up it would display the System Monitor prompt. Both the Monitor and Integer BASIC have commands to redirect printing to a printer driver in a designated slot, so the conventional way to boot from disk then was to command the computer to start "printing" to the disk interface card, typically installed in slot 6, using the command (from the ML monitor) or (from BASIC). When the monitor or BASIC issued the next prompt character, the computer would call the ROM routines on the disk card to "print" to it, which would then proceed with the boot sequence. (One could use input redirection to similar ends.) Alternatively, from the ML monitor, the user could type the slot number, typing to invoke the controller's boot code directly. *When the Apple II Plus was introduced, it included the ability to scan each expansion slot (working downward from slot 7 to slot 1) for a bootable expansion card ROM, and automatically call it. *The expansion card ROM boot code attempts to boot from drive 1 of the controller by moving the read/write arm to track zero and attempting to read 256 bytes from sector zero of that track. (If no readable disk is available, the drive spins indefinitely until one is provided and the drive door is closed.) *Sector zero contains a small program which instructs the computer to read sectors 0 through 9 of track zero into memory using part of the ROM boot code (rereading sector 0 in the process). *The program in sectors 1–9 of track 0, including the complete RWTS code, then proceeds to load tracks 1 and 2, which contain the rest of DOS. On a system master disk, code is also included to determine the computer's RAM configuration and relocate DOS as high into system memory as possible, up to the 48 KB limit of the Apple II's main memory ($BFFF). *Once DOS is loaded into memory, it attempts to load and execute a startup program as indicated in the DOS program code. This is commonly a BASIC language program named ''HELLO'' (or some other name) but DOS can be modified to run other types of programs at startup, such as an executable binary file. The appearance of the right-hand bracket (]) on the screen is an indication to the user that an Applesoft BASIC startup program is loading, while a greater-than symbol (>) indicates that an Integer BASIC program is loading. (These are the prompts for the respective versions of BASIC, which are being initialized at this point.) *The startup program then begins executing.


Integer BASIC and Applesoft BASIC support

The original Apple II included BASIC interpreter in ROM known originally as ''Apple BASIC'' and later as ''
Integer BASIC Integer BASIC is a BASIC interpreter written by Steve Wozniak for the Apple I and Apple II computers. Originally available on cassette for the Apple I in 1976, then included in ROM on the Apple II from its release in 1977, it was the first ve ...
''. Variables in this language can only handle integer numbers ranging from −32,768 to +32,767 (
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two mos ...
binary values); floating point numbers are not supported. Apple commissioned
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
to develop
Applesoft BASIC Applesoft BASIC is a dialect of Microsoft BASIC, developed by Marc McDonald and Ric Weiland, supplied with the Apple II series of computers. It supersedes Integer BASIC and is the BASIC in ROM in all Apple II series computers after the original ...
, capable of handling floating-point numbers. Applesoft BASIC cannot run Integer BASIC programs, causing some users to resist upgrading to it. DOS 3.3 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 or from BASIC, the user can switch between either version.


Decline

After 1980, Apple DOS entered into a state of stagnation as Apple concentrated its efforts on the ill-fated
Apple III The Apple III (styled as apple ///) is a business-oriented personal computer produced by Apple Computer and released in 1980. Running the Apple SOS operating system, it was intended as the successor to the Apple II series, but was largely consi ...
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 The Apple IIe (styled as Apple //e) is the third model in the Apple II series of personal computers produced by Apple Computer. The ''e'' in the name stands for ''enhanced'', referring to the fact that several popular features were now built-in ...
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 Ram, ram, or RAM may refer to: Animals * A male sheep * Ram cichlid, a freshwater tropical fish People * Ram (given name) * Ram (surname) * Ram (director) (Ramsubramaniam), an Indian Tamil film director * RAM (musician) (born 1974), Dutch * ...
drives, or 3.5-inch floppy disk drives. The structure of Apple DOS disks (particularly 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 is the name of two similar operating systems for the Apple II series of personal computers. The original ProDOS, renamed ProDOS 8 in version 1.2, is the last official operating system usable by all 8-bit Apple II series computers, and w ...
. ProDOS retains the 16-sector low-level format of DOS 3.3 for 5.25 inch disks, but introduces 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 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 Glen Eugene Bredon (August 24, 1932 in Fresno, California – May 8, 2000, in North Fork, California) was an American mathematician who worked in the area of topology. Education and career Bredon received a bachelor's degree from Stanford Unive ...
enables users to have multiple virtual DOS 3.3 partitions on a larger ProDOS volume, which allows 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.


Performance improvements

DOS's RWTS routine can read or write 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, the sectors on a DOS disk are arranged in an interleaved order: 0 7 e 6 d 5 c 4 b 3 a 2 9 1 8 f Later, ProDOS arranged the sectors in this order: 0 8 1 9 2 a 3 b 4 c 5 d 6 e 7 f 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 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. Unfortunately, the early DOS File Manager subverted this efficiency by copying bytes read from or written to 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 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. ''Call-A.P.P.L.E.'' is the monthly journal publication of the Apple Pugetsound Program Library Exchange (or ''A.P.P.L.E.'') The magazine was published from 1978 until 1990 when it was discontinued; after a 12-year lapse publication was restarte ...
''. Speedups in the 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 was never used in an official Apple DOS release. Similar functionality was, however, employed by Apple's successor operating system, ProDOS. The
Apple IIGS The Apple IIGS (styled as II), the fifth and most powerful of the Apple II family, is a 16-bit personal computer produced by Apple Computer. While featuring the Macintosh look and feel, and resolution and color similar to the Amiga and Atari ST ...
-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.


Source code release

In 2013, more than 35 years after the
Apple II The Apple II (stylized as ) is an 8-bit home computer and one of the world's first highly successful mass-produced microcomputer products. It was designed primarily by Steve Wozniak; Jerry Manock developed the design of Apple II's foam-m ...
debuted, the original Apple DOS
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
was released by the
Computer History Museum The Computer History Museum (CHM) is a museum of computer history, located in Mountain View, California. The museum presents stories and artifacts of Silicon Valley and the information age, and explores the computing revolution and its impact on ...
on its website. It was donated by the original author, Paul Laughton.


References


Further reading

*


External links


Paul Laughton's account of writing DOS 3.1



A2Central.com
- Apple II news and downloads
Everything2.com's DOS 3.1 Article

Apple II DOS version 3.1 source code
(1978, released in 2013 with the permission of Apple Inc.) {{Disk operating systems 1978 software
DOS DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicat ...
DOS, Apple Discontinued operating systems Disk operating systems