Share to: share facebook share twitter share wa share telegram print page

Apple DOS

Apple DOS
Apple computer running a Hello World program
DeveloperApple Computer
Written inAssembly[1]
OS familyApple DOS
Working stateDiscontinued
Source modelClosed source
Initial release1978; 46 years ago (1978)
Latest release3.3 / 1980; 44 years ago (1980)
Kernel typeMonolithic kernel
LicenseApple Software License Agreement

Apple DOS is the family of disk operating systems for the Apple II series of microcomputers 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 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 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 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 the latter wrote the operating system with punched cards and a minicomputer.[2]

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.[3][4]

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 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 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 a disk controller and booted from it when the system was powered up—earning it the name "Autostart ROM".[citation needed] DOS 3.2.1 was then released in July 1979 with some minor bug fixes.[5]

Apple DOS 3.3 was released in 1980. It improves various functions[which?] of release 3.2, while allowing for large gains in available floppy disk storage. The newer P5A/P6A PROMs in 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", 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 the computer has a language card (RAM 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 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 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 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 the "S" type as data files.

A call vector table in the region of $03D0–03FF16 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 $03D016 (97610) – hence the traditional 3D0G ("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 6 Control-P (from the ML monitor) or PR#6 (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 invoke the controller's boot code directly with a command like C600G.
  • 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 ($BFFF16).
  • 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. 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,[6] 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 FP or INT 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 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 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 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 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.[7]

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:[8]

0 7 e 6 d 5 c 4 b 3 a 2 9 1 8 f

Later, ProDOS arranged the sectors in this order:[8]

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.

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.[9] 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.. 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 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.

Source code release

In 2013, more than 35 years after the Apple II debuted, the original Apple DOS source code was released by the Computer History Museum on its website.[10] It was donated by the original author, Paul Laughton.[11]

See also

References

  1. ^ Apple II DOS - Source Code
  2. ^ Terdiman, Daniel (2013-04-03). "The untold story behind Apple's $13,000 operating system". CNET. Retrieved April 4, 2013.
  3. ^ "Apple Computer". Laughton.com. Retrieved 2013-06-14.
  4. ^ "Apple II History » 14-DOS". Apple2History.org. Archived from the original on 2010-07-10. Retrieved 2013-06-14.
  5. ^ "Apple II History » 14-DOS". Apple2History.org. Archived from the original on 2010-07-10. Retrieved 2013-06-14.
  6. ^ Steven Weyhrich. "Apple II History Chapter 16". Archived from the original on 29 January 2009. Retrieved 2009-01-26.
  7. ^ Dean Esmay (18 November 2010). "Even Apple Used Pirate Tools". Archived from the original on 25 July 2011. Retrieved 2011-08-11.
  8. ^ a b "About the archive formats". Retrieved 26 April 2012.
  9. ^ DOS 3.3, ProDOS & Beyond v1.3 bullet 07 Jul 01
  10. ^ Shustek, Len (2013-11-12). "Apple II DOS source code". ComputerHistory.org. Retrieved 2013-11-30.
  11. ^ "Apple II's 35-year-old operating system is now open to the public". November 13, 2013.

Further reading

  • Worth, Don; Lechner, Pieter (1981), Beneath Apple DOS, Quality Software, ISBN 0-912985-00-3

External links

Baca informasi lainnya yang berhubungan dengan : article

Article 19 Article 20

Read other articles:

Reef in the Philippine Sea Okinotori-shimaNative name: 沖ノ鳥島, Okinotori-shimaOkino-Tori Islands, Parece VelaAerial photographGeographyLocationPhilippine Sea, Pacific OceanCoordinates20°25′21″N 136°05′24″E / 20.42250°N 136.09000°E / 20.42250; 136.09000Total islands1 atoll with 2 isletsAreaLand area: 9.44 m2 (101.6 sq ft) Shoal area: 0.0085km2Highest elevation1.5 m (4.9 ft)Highest pointunnamed pointAdministrationJapanPre…

Este artículo se refiere o está relacionado con un evento de salud pública reciente o actualmente en curso. La información de este artículo puede cambiar frecuentemente. Por favor, no agregues datos especulativos y recuerda colocar referencias a fuentes fiables para dar más detalles. Pandemia de COVID-19 en Colombia Parte de la pandemia de COVID-19 Mapa de departamentos con casos confirmados de coronavirus (SARS-CoV-2)[1]​[2]​[3]​ de 32 departamentos más el Distrito Capi…

«Прадавність української мови» Обкладинка видання 2010 рокуАвтор Губерначук Станіслав СергійовичКраїна УкраїнаМова українська моваТема історія української мовиЖанр науково-популярнийВидавництво «Четверта хвиля», КиївВидано 2010Сторінок 352ISBN 978-966-529-218-0 У статті відсутні

п о р Хани КримуXV століття Хаджі І (1427—1456, 1456—1466) • Айдер (1456) • Нур-Девлет (1466—1467, 1467—1469, 1475—1476, 1477—1478) • Джанібек(1476—1477) • Менґлі І (1467, 1469—1475, 1478—1515) XVI століття Мехмед I • Гази I • Саадет I • Іслям I • Сахіб I • Девлет I • Мехмед…

Kepresidenan Bombayमुंबई इलाखा (Marathi)મુંબઇ પ્રાંત (Gujarati)ಬಾಂಬೆ ಪ್ರಾಂತ(Kannada) بومبي صدار ت(Sindhi)Kepresidenan di India Britania1618–1947 Panji daerahKepresidenan Bombay pada 1909, bagian utaraSejarahEra sejarahImperialisme Baru• Pendirian Kepresidenan Barat di Surat, India 1618• Kepresidenan Bombay terpecah menjadi Sindh dan negara bagian Bombay 1947• Kemerdekaan India 1947 Didahului oleh Dig…

Peralihan jalur dari jalur layang ke jalur bawah tanah MRT Jakarta yang sejajar dengan Jalan Sisingamangaraja. Salah satu bangunan di Jalan Sisingamangaraja, Masjid Agung Al Azhar. Jalan Sisingamangaraja adalah nama salah satu jalan utama Jakarta. Nama jalan ini diambil dari nama seorang Pahlawan Nasional Indonesia yaitu Si Singamangaraja XII. Jalan ini membentang sepanjang 1,8 KM dari Melawai, Kebayoran Baru, Jakarta Selatan sampai Senayan, Kebayoran Baru, Jakarta Selatan. Jalan ini melintasi 2…

1794–95 United States Senate elections ← 1792 & 1793 Dates vary by state 1796 & 1797 → 10 of the 30 seats in the United States Senate (plus special elections)16 seats needed for a majority   Majority party Minority party   Party Federalist Democratic-Republican Seats before 16(as Pro-Administration) 13(as Anti-Administration) Seats after 19 10 Seat change 3 3 Seats up 5(as Pro-Administration) 5(as Anti-Administration) Races won 8 2  &…

2008年夏季残疾人奥林匹克运动会俄罗斯代表團俄罗斯联邦国旗IPC編碼RUSNPC俄罗斯残疾人奥林匹克委员会網站paralymp.ru(英文)(俄文)2008年夏季残疾人奥林匹克运动会(北京)2008年9月6日至9月17日獎牌榜排名第8 金牌 銀牌 銅牌 總計 18 23 22 63 历届残疾人奥林匹克运动会参赛记录(总结)夏季残疾人奥林匹克运动会199620002004200820122016–20202024冬季残疾人奥林匹克运动会19941998200220…

Not to be confused with Duffws railway station (Festiniog and Blaenau Railway). Former railway station in Wales Duffws (FR)Duffws (FR) station, believed to be around 1900General informationLocationBlaenau Ffestiniog,[1] GwyneddWalesCoordinates52°59′42″N 3°56′05″W / 52.9949°N 3.9348°W / 52.9949; -3.9348Grid referenceSH 702 459Platforms1[2]Other informationStatusDisusedHistoryOriginal companyFestiniog RailwayKey datesJanuary 1866Opened1 January 1…

1994 video game This article is about the 1994 videogame. For other videogames, see Starfighter (disambiguation). This article uses bare URLs, which are uninformative and vulnerable to link rot. Please consider converting them to full citations to ensure the article remains verifiable and maintains a consistent citation style. Several templates and tools are available to assist in formatting, such as reFill (documentation) and Citation bot (documentation). (September 2022) (Learn how and when to…

27th TVyNovelas AwardsDateMarch 15, 2009LocationForum Mundo Imperial, Acapulco, GuerreroHosted byYuriMost awardsAlma de hierro (8)Most nominationsAlma de hierro (12)Television/radio coverageNetworkCanal de las estrellas ← 26th · TVyNovelas Awards · 28th → The 27th TVyNovelas Awards were an academy of special awards to the best soap operas and TV shows. The awards ceremony took place on March 15, 2009 in the Mundo Imperial Forum, Acapulco, Guerrero. The ceremony …

Operator of indoor active entertainment parks Sky Zone Franchise GroupTypePrivate companyIndustryIndoor Active Entertainment ParksFounded2004; 19 years ago (2004)HeadquartersLos Angeles, California, U.S.Number of locations300Key peopleElizabeth Blair, CEOBrands Defy Gravitopia Planet3 Rockin' Jump Ryze OwnerPalladium Equity PartnersWebsitewww.skyzone.com Sky Zone is a Los Angeles–based company that operates indoor trampoline parks. The company is often erroneously credited wi…

Japanese noodlesFresh ramenTypeNoodlesPlace of originJapanMain ingredientsFlour, water  Media: Japanese noodles Ramen Soba Udon Noodles are a staple of Japanese cuisine. They are often served chilled with dipping sauces, or in soups or hot dishes.[1] Noodles were introduced to Japan from China during the Song Dynasty between the Heian until the early Kamakura period. History Noodles were first discovered in Japan around 800 A.D during the Heian period (794-1185).[2] This…

French senior civil servant Richard DidierHigh Commissioner of the Republic in French PolynesiaIn office23 December 2010[1] – 1 August 2012Preceded byAdolphe ColratSucceeded byJean-Pierre LaflaquièrePrefect of Haute-LoireIn office28 July 2008[2] – 23 December 2010Preceded byChristophe MirmandSucceeded byDenis ConusAdministrator Superior of Wallis and FutunaIn office20 July 2006[3] – 28 July 2008Preceded byXavier de FürstSucceeded byPhili…

Hospital in Western Region, UgandaKitojo HospitalKitojo Integrated Development AssociationGeographyLocationKijojo, Rwaihamba Town Council, Kabarole District, Western Region,  UgandaOrganisationCare systemPrivateTypeGeneralServicesBeds40HistoryOpened2011LinksOther linksHospitals in Uganda Kitojo Hospital, is a hospital in Uganda. Kitojo Hospital is located in Kitojo Village, near Rwaihamba trading center, in Toro sub-region, Western Uganda, about 8 kilometres (5 mi), west of Kibaale Nat…

Safia Nafisa ShahSafia ShahBorn (1966-11-16) 16 November 1966 (age 57)London, England, United KingdomOccupation(s)Editor, freelance writer and producer, independent retailerSpouseIan ThomasChildren2 childrenParent(s)Idries Shah, Cynthia (Kashfi) KabrajiRelativesShah family Safia Nafisa Shah (Persian: سفیا شاه, Gujarati: સફિયા શાહ; born 16 November 1966), now Safia Thomas, is a British writer, editor, television news producer and member of the Afghan-Indian Shah family…

Extinct genus of reptiles PristichampsusTemporal range: Eocene, 47.8–41.2 Ma PreꞒ Ꞓ O S D C P T J K Pg N Lutetian Life reconstruction of Pristichampsus Scientific classification Domain: Eukaryota Kingdom: Animalia Phylum: Chordata Class: Reptilia Clade: Pseudosuchia Clade: Crocodylomorpha Order: Crocodilia Family: †Pristichampsidae Genus: †PristichampsusGervais, 1853 Type species †Pristichampsus rollinatii(Gray, 1831) Species †P. birjukovi? Efimov, 1988 †P. kuznetzovi? Efimo…

Not to be confused with NHK Hall. NHK Osaka HallBK HallLocationChūō-ku, Osaka, JapanOwnerNHK Planet KinkiTypeconcert hallSeating typeReservedCapacity1,417ConstructionBuilt2001Opened3 November 2001Websitenhk-osakahall.jpNHK Hall is a part of the NHK Osaka, located in Otemae, Chūō-ku, Osaka, Japan. Its address is 4-1-20, Chūō-ku, Osaka, 540-8501. This facility has a capacity of 1,417 seats.[1][2][3][4] See also NHK Hall References ^ 座席検索/Nhk大阪ホ…

Namma Metro's Purple Line terminal metro station Challaghatta Namma Metro station Namma Metro train terminating at this metro stationGeneral informationLocationMysore Main Road, Mysore Rd, BSM Extension, Kengeri Satellite Town, Bengaluru, Karnataka 560060Coordinates12°53′51″N 77°27′40″E / 12.89742°N 77.46124°E / 12.89742; 77.46124Owned byBangalore Metro Rail Corporation Ltd (BMRCL)Operated byNamma MetroLine(s)Purple LinePlatformsSide platform Platform-1 → Wh…

This article is about a musical album. For other uses, see The Greatest Story Never Told (disambiguation). This article uses bare URLs, which are uninformative and vulnerable to link rot. Please consider converting them to full citations to ensure the article remains verifiable and maintains a consistent citation style. Several templates and tools are available to assist in formatting, such as reFill (documentation) and Citation bot (documentation). (August 2022) (Learn how and when to remove th…

Kembali kehalaman sebelumnya