Apple II DOS Source Code Released
gbooch writes "The Computer History Museum in Mountain View, California, is not just a museum of hardware, but also of software. The Museum has made public such gems as the source code for MacPaint, Photoshop, and APL, and now code from the Apple II. As their site reports: 'With thanks to Paul Laughton, in collaboration with Dr. Bruce Damer, founder and curator of the Digibarn Computer Museum, and with the permission of Apple Inc., we are pleased to make available the 1978 source code of Apple II DOS for non-commercial use. This material is Copyright © 1978 Apple Inc., and may not be reproduced without permission from Apple.'"
what would happen if someone would make a buck off of the Apple ][ DOS...!!!!!
Whatever your complaints about your job, at least debugging your code doesn't involve stepping through assembly on a pencil and paper virtual machine.
...ought to be enough for anyone!
I wish that Apple, and other companies, would create deep legacy support all the way back. Software from the Apple II should be able to run on the MacOSX and iOS. The computational power is there to do the necessary emulation.
May I be the first (at least in this thread) to call that the source code be GPLed! Or BSDed! Or is Apple afraid that Apple II DOS will become all the rage and displace iOS/Mac OS X? :)
Oh, and under similar note, I'd call on Apple to do the same thing with older versions of Mac OS, but then I can see them not wanting to spend the time/energy to clean up the code or otherwise deal with whatever legal hurdles there are to scrubbing it of stuff they licensed to use but don't own. But, clearly they've gone through most the legal hurdles for Apple II DOS. It's hard to believe they couldn't buy off any interests that prevent GPL/BSDing the code.
It's being "made available" but it "may not be reproduced."
How does that work, again?
If you're a zombie and you know it, bite your friend!
At this rate we will have the source code for iOS7 by 2048....
Now I can make a perfect Apple][-e emulator! Now I just need a 5.25" drive...
Because it could be a competent competitor to current Apple products?
I know I want an Apple II smartphone that I could play Oregon Trail on and make phone calls back to the '70s with!
Take the cheese to sickbay, the doctor should see it as soon as possible - B'Elanna Torres, "Learning Curve"
Back in the day, the source code for Atari DOS was included in a published book that explained exactly how it worked. That's one of the things that was great about that platform--so much information was readily available.
It was all written in 6502 assembly. Anyone that cared would disassemble it themselves, so it's not like there were any big proprietary secrets to protect. I'm surprised that this wasn't published 30 years ago.
Lately it has become common for companies that own copyright in decades-old video games to rerelease the games in an emulator that runs on a modern platform. If a video game for Apple II requires Apple DOS, the game's copyright owner has two options. It can license Apple DOS in order to distribute it as part of the game's disk image bundled with the emulator. Or it can change the emulator to use high-level emulation for the BASIC integration, file system, and RWTS (block device driver) that make up Apple DOS.
Seriously, this is cool and all, but, why wasn't this done over a decade ago? In fact, Apple should have done it themselves *before* ending the manufacturing of the Apple //, to inspire people to find new ways to hack this machine and utilize it in ways never intended by Woz.
It's sad that one of the best hacking platforms out there is the Raspberry Pi, and not the much simpler to figure out Apple // -- although to be fair, people are doing amazing things with the Pi, I just wish there was a popular 8-bit machine out there for the young'ns to get them started.
If telephones are outlawed, then only outlaws will have telephones.
Can someone please transcribe this into 6502 binary instructions and place it onto punch cards for easier reading?
Yaaaa! And don't forget that Karateka was a bootable image, not requiring any DOS to get into.
Laughter is the Spackle of the Soul.
Now to find copies of all the old Beagle Brothers Software titles
One of Apple's cheap Macs (the "LC"?) had a single nubus slot that took a special card that allowed you to hook up an Apple 5.25 floppy -- and had a hardware/software Apple // emulator.
These days, no mac supports any kind of floppy, even via USB -- you'd have to download disk image files to get to the software.
If telephones are outlawed, then only outlaws will have telephones.
"The Museum has made public such gems as the source code for MacPaint, Photoshop, and APL, and now code from the Apple II."
Now we can reverse-engineer all of Apple's current products.
Whatever your complaints about your job, at least debugging your code doesn't involve stepping through assembly on a pencil and paper virtual machine.
Back then it was actually easier to read through large amounts of code, flipping between different sections, etc when it was on paper.
...
The listing wasn't used for paper and pencil emulation, we had quite nice integrated editors and debuggers to see what was going on (ex. the LISA 6502 assembler). The listings were for reading and understanding. These lists were used somewhat like tablets today. You can take the listing anywhere, flop down on the couch and start reading,
What the hell? There is no commercial use. Stop being dicks and release it to the public domain.
Please !!!! "Computer History Museum in Mountain View", please pull your strings :)
Maybe we can fix a few bugs as a community, eh?
Design for Use, not Construction!
There was Beneath Apple DOS, a fabulous book from the time which was invaluable for figuring out what was going on. My understanding was that Don Worth and Peter Lechner disassembled the shipped code and sorted out how things worked, with great explanations. Those were a great guide and helpful for writing all kinds of software. I suspect that a similar effort these days would not be resolved without legal intervention- I have no idea if they even asked permission or if it would have occurred to people that you might want to ask. (This PDF of the book says that Apple was not in any way involved in the book, did not endorse it, etc right on the title page.) Then again, the source code for important parts of the ROMS at the time (Woz's Sweet16) was distributed with the computer in hard copy manuals. I learned a great deal from reading the Sweet 16 source for that and also from Beneath Apple DOS. Beneath Apple DOS wasn't full source code, but it did explicitly identify what blocks of code did what in a way that made it easy to understand what was going on and how to change things.
It's psychosomatic. You need a lobotomy. I'll get a saw.
I never understood Jobs' hostility towards this program. Now he's gone, it's the perfect opportunity to put that 68k code out there.
From TFA: "... for non-commercial use. This material is Copyright © 1978 Apple Inc., "
That's a shame because someone might like to use it for a commercial product: a modern-day knockoff of the Apple ][.
But that would require a cool name for the project and the good ones were already taken circa-1980: the Japanese implementation (the Japple) and the Korean version (the Krapple).
I haven't programmed assembly in decades and can still read it and follow along.. Crazy how some things just get burned into one's gray matter.
Have you considered the possibility that Apple simply wouldn't release the source code at all, if there were no copyright protection?
To keep companies from "hoarding," as you put it, would require a sort of negative copyright, where they are forced to escrow their source code for public release
I don't see why escrow would be so critical when someone with more time than money could just disassemble, document, and distribute a program. This already happens underground. Absent copyright enforcement, there would simply be no formal negative consequences for doing so.
If you don't like it, you'll have to rely on trade secrecy instead.
You'd have to keep the binary secret too in order to thwart a disassembly attack. Good luck keeping a binary secret from end users who who run it on hardware that they own. The sort of DRM seen in, say, game consoles has always failed within a few years.
Aren't you glad you're a coder now and not in 1978? I know there are still ASM programmers, but seriously:
;5 MSB'S TO LOW BITS.
LSR
STA NBUF1,X FIRST OF 8 5-BIT NIBLS.
INY
LDA (BUF),Y SECOND OF 5 USER BYTES.
STA T1 (ONLY 3 LSB'S USED)
LSR
LSR ;5 MSB'S TO LOW BITS.
LSR
STA NBUF2,X SECOND OF 8 5-BIT NIBLS.
INY
LDA (BUF),Y THIRD OF 5 USER BYTES.
STA T2 (ONLY 3 LSB'S USED)
LSR
LSR ;5 MSB'S TO LOW BITS.
LSR
STA NBUF3,X THIRD OF 8 5-BIT NIBLS.
INY
LDA (BUF),Y FOURTH OF 5 USER BYTES.
LSR
ROL T2 LSB INTO T2.
LSR
ROL T1 NEXT LSB INTO T1.
LSR
ROL T0 NEXT LSB INTO T0.
STA NBUF4,X FOURTH OF 8 5-BIT NIBLS.
INY
LDA (BUF),Y FIFTH OF 5 USER BYTES.
LSR
ROL T2 LSB INTO T2.
LSR
ROL T1 NEXT LSB INTO T1.
LSR
STA NBUF5,X FIFTH OF 8 5-BIT NIBLS.
LDA T0
ROL ;NEXT LSB.
AND #$1F TRUNCATE TO 5 BITS.
STA NBUF6,X SIXTH OF 8 5-BIT NIBLS.
LDA T1
AND #$1F TRUNCATE TO 5 BITS.
STA NBUF7,X SEVENTH OF 8 5-BIT NIBLS.
LDA T2
AND #$1F TRUNCATE TO 5 BITS.
STA NBUF8,X EIGHTH OF 8 5-BIT NIBLS.
INY
DEX NEXT OF (51) 5-BYTE PASSES.
BPL PNIB1
LDA (BUF),Y
TAX
AND #$7 3 LSB'S OF LAST
STA NBUF8+$33 USER BYTE.
TXA
LSR
LSR
LSR ;5 MSB'S OF LAST
STA NBUF5+$33 USER BYTE.
RTS
EJECT
ORG $B800 OBJ $B800 PRENIBL LDX #$32 INDEX FOR (51) 5-BYTE PASSES. LDY #$0 USER BUF INDEX. PNIB1 LDA (BUF),Y FIRST OF 5 USER BYTES. STA T0 (ONLY 3 LSB'S USED) LSR LSR
Brought to you by Carl's Junior.
Wasn't Apple DOS. They were listings from Nibble magazine,
FC Closer
One problem with virtualization (e.g. XP Mode) or paravirtualization (e.g. WOW64) is that it's likely to support only those applications that use peripherals supported by the operating system's bundled class drivers. It's far less likely to support applications that use a custom driver, such as an EPROM programmer.
Here's a reference, from my earlier comment: here.
It was recognizable in real time to an alert moviegoer at the time.
It's psychosomatic. You need a lobotomy. I'll get a saw.
A listing for the entire OS for the Sinclair Spectrum is available in a book (Complete Spectrum ROM Disassembly ). This computer was based on a Z80 and one of the interesting parts of the code (for me least) is all the floating point arithmetic in Z80. Just found out that all the codeis available on line here: http://www.wearmouth.demon.co.uk/zx82.htm
Let me try to rephrase: What some modern machines lack is the ability to become a specialist yourself, should you desire so, without beaucoup bucks of up-front costs and recurring certificate renewal costs.
I know there are still ASM programmers, but seriously
And I'm one of them. Seriously. I learned 6502 assembly on the Apple II, and most of the skills transferred to programming the Nintendo Entertainment System. In addition to my hobby coding for NES, I now have my name in a commercially published NES cartridge, where I wrote the menu and three of the games.
I'm going to guess it was faster to type your last post than:
https://www.google.com/search?q=terminator+nibble+magazine
But here's the first result, which explains how it came from Nibble magazine:
http://www.pagetable.com/?p=64
Are they waiting to release that source code for some reason? Too soon? Even GS/OS for the ][gs was last updated in 1993.
Back in the day, the source code for Atari DOS was included in a published book that explained exactly how it worked. That's one of the things that was great about that platform--so much information was readily available.
Yes, but possibly in spite of, rather then because of, Atari themselves. According to the book "Hackers" by Steven Levy, the Atari 800 was treated as a closed platform in the early days, and Atari wouldn't divulge documentation on its inner workings;
Transferring his new assembly-language skills to the Atari was difficult. The Atari was a "closed machine". This meant that Atari sequestered the information concerning the specific results you got by using microprocessor assembly-language commands. It was as if Atari did not want you to be able to write on it. It was the antithesis of the Hacker Ethic. John would write Atari's people and even call them on the telephone with questions; the voices on the phone would be cold, bearing no help. John figured Atari was acting that way to suppress any competition to its own software division. This was not a good reason at all to close your machine. (Say what you would about Apple, the machine was "open", its secrets available to all and sundry). So John was left to ponder the Atari's mysteries, wondering why Atari technicians told him that the 800 gave you only four colors in the graphics mode, while on the software they released for it, games like "basketball" and "Super Breakout", there were clearly more than eight colors.
Of course, it's true that all this stuff was *later* very well-documented, but how much Atari helped in that is open to question (*). It's certainly well-known that Atari were assholes in general in their late-70s/early-80s heyday, and they definitely tried to suppress third-party development of VCS games. So though I've heard enough people disputing aspects of "Hackers" not to take it as gospel, it does seem to tie in with what I've heard about Atari at the time.
The Atari DOS book doesn't appear to have been published by Atari themselves, and whether it was with their blessing, I don't know. "Mapping the Atari" wasn't an official publication either.
While Atari released documentation, I suspect it was at the level *they* wanted people to be using the machine at. And for all their plus points, the 400 and 800 were clearly intended as more closed, consumer-oriented machines. The 800 did have some good expansion capabilities, but this was clearly meant to be done via its official ports and interfaces designed for that use. The lower-end version, the Atari 400 had far less official expansion capability, e.g. it was never originally designed to support RAM expansion- it was possible, but apparently required far less friendly hardware modifications and installation directly onto the motherboard.
The 1200XL was notoriously even more closed (and flopped massively). FWIW, the BASIC "manual" that came with my 800XL was a paltry pamphlet, and the official DOS 3 manual was nicely-presented, but certainly not deep.
Of course, it all worked out in the end, but I guess what I'm saying is that let's not romanticise the original intentions of companies like Atari back then, who'd have been happy to sit on those secrets and not release them to their users (who they viewed as potential competition).
(*) Those early days (1979 onwards) were before my time- I got my 800XL in 1986, so I can't speak from personal experience.
"Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
Wow - so cool!
Brings back the memories!
The Atari 800 was my first computer, and it was simply awful. As far as I remember, the manual was a joke and I had to learn BASIC through magazines and good ole trial and error. The available software was a slim selection, and the cassette drive I had to load programs -- while novel in that it could play audio from the tape in conjunction with program execution -- would get out of alignment or simply stop working constantly. The Atari 800's system of cartridges used to expand RAM was quite elegant for its time, and you could probably use the chassis to stop bullets, but that's about all the kind things I could say about it. I have a feeling that opening up the software back then wouldn't have done much to reverse their fortunes or increase their share of the market. My best friend had an Apple ][c at the time, and man was I envious! It was really night and day, comparing those two.
I have heard of Microsoft Dos (Disc Operating System) - it's like the bash prompt for Linux right? I have not heard of Apple II DOS before. Thanks for sharing the link.
With all of the censorship / store rules / limited pricing control / limited bulk pricing control and so on.
*there are work arounds for the app store only parts.
also virtual machines add over heads / does not work 100% with all hardware and it still has the old base os running in it. Now maybe if we had some thing like winos2
While this is cool because of its historical significance, and it shows how the code evolved, its not really "new".
Since its written in assembly, everyone already had the code by running a disassembler against DOS and spending some time scribbling comments next to the source. Books like Inside Apple ProDOS did basically that while providing a high level understanding of entry points/etc for programmers.
(Ok, yah I know ProDos isn't DOS, but DOS wasn't really used for much other than creating copy protected games after prodos came out).
The Atari 800 was my first computer, and it was simply awful.
Er, no it wasn't. Whether or not the manuals were crap doesn't make it a bad machine. This wasn't originally a "my computer is better than yours" discussion, but since you raised the issue...
:-)
While Atari may have been dicks in terms of documentation release, the Atari 800 was nevertheless a state-of-the-art computer by the standards of its time (late 70s) and still comparable to the later C64 in terms of its capabilities (better in some respects, weaker in others).
It beat the heck out of the original Apple II, a clever design for its time, but which was quickly surpassed technically and presumably justified its continued high price on the US market due to its established support.
The much-improved Apple IIc, as far as I can tell, was a far more expensive machine than the Atari 800 at the time of its 1984 launch ($1295 according to Wikipedia). It's also unfair to condemn the Atari 800 for its cassette performance- you could easily buy an Atari 800 and disk drive for far less than the Apple IIc (and AFAIK most Atari users in the US *did* use disks by that point). Wouldn't it be much fairer to compare the Apple IIc to the Amiga 1000 which launched the next year at a comparable price?
"Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
Additional; Atari lost the market because they messed up at a critical point in the home computer wars. Circa 1983 or so, Commodore- under Jack Tramiel- launched a ruthless price war in the US that saw the C64 price forced down very low (making it very good value for what it was). This was around the point Atari launched the 1200XL, which was *more* expensive than the 800 (at a time when the line should have been made cheaper) and had expansion and compatibility issues that resulted in it flopping.
Eventually the cheaper-to-produce 600XL and 800XL replaced it, but that misstep probably cost them the market and the C64 dominated after that.
"Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
Geez, I wonder what that makes me. When I saw that the Apple II DOS source was available my first thought was 'There was a Denial of Service attack for the Apple II?'.
Then I thought, 'You moron, it's Disk Operating System'.
How time flies and acronyms change.
Pax Vobiscum
You actually linked two images from a page supporting my claim, on pagetable.com.
FC Closer
Atari lost the computer war because they had no mindshare. I was the only kid in school I knew with an Atari computer. Everyone else had Apples and C64s. To most people in the early 80s (which is when I had my 800), Atari was a brand associated with an aging game console, not computers. Between that and the lack of quality software as compared with the Apple ][, it was a doomed system.
I can relate to the "mind share" thing. In the UK, the Atari 800 and its successors weren't that well-known either- I wasn't aware of them until shortly before I got one. It was very much "second tier" in terms of support- software et al was available, but nowhere near as much (nor as easily available) as for the ZX Spectrum, Commodore 64 and Amstrad CPC.
But I'm not sure the mindshare issue (at least as far as the US market goes) contradicts what I said; desirability, popularity and awareness of formats was (and is) self-reinforcing due to the "network effect". That's why (e.g.) the ZX Spectrum remained popular here long after it was outdated- it was the first machine with hi-res colour graphics and sound at a mass-market price in the UK, and only the C64 enjoyed comparable support.
"Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).