
Apple II DOS source code - coloneltcb
http://www.computerhistory.org/atchm/apple-ii-dos-source-code/
======
StillBored
Hmmm, whole article about people reverse engineering apple dos, and no mention
of "Beneath Apple Dos"? That ended up being one of my apple ][ books that
nearly fell apart.

~~~
riprowan
Came here to point this out.

My Apple ][ shipped with "Beneath Apple DOS", the Apple ][ programmer's guide,
and the Apple ][ Reference Manual which included a full fold-out schematic!

The original Apple ][ was more than a computer, it was like a degree in
computer science if you actually studied what shipped with it.

~~~
DonHopkins
Woz autographed my spiral bound Apple ][ reference manual "Have fun with your
Apple! -WOZ", so I followed his instructions, line by line.

------
incepted
Another interesting side effect of Apple DOS is the extraordinary fertile
ground it created for software companies to copy-protect their applications.

Piracy was already a big deal back then and pretty much every single software
publisher on the Apple ][ had developed their own copy protection mechanism by
simply hijacking the low-level vectors of Apple DOS.

Some of these copy protections were quite frankly amazing in ingenuity.

~~~
DonHopkins
I spent so many hours watching The Locksmith [1] go "Read..." "Analyze..."
"Write..." nibble by nibble, sector by sector.

[1]
ftp://ftp.apple.asimov.net/pub/apple_II/documentation/applications/misc/Locksmith%20User%20Manual.pdf

~~~
Shivetya
well I guess I will admit to the hours friends and I spent hacking out
Wizardry and other games. Wizardry was a pain because it was in effect booting
its own runtime, a pascal based one at that. (think it was wizardry that did
this). Between the days of NDD on PCs and messing with code on Apple ][ I
never realized how much my love for programming was being developed

~~~
incepted
Yes, Wizardry was the first game to ship that was written in Pascal UCSD if I
recall correctly.

The boot sequence was pretty unmistakable (clear screen, switch to 80 columns,
cursor in the upper left corner) but quite novel at the time.

Here it is, if you want to experience it yourself:

[http://www.virtualapple.org/wizardrydisk.html](http://www.virtualapple.org/wizardrydisk.html)

------
jonny_eh
My mind is blown that they used punch cards to write Apple II software in the
early days.

~~~
pvg
Only very, very early system bootstrapping stuff. Beyond that, most software
was written on the machines themselves. Like this guy, who is also on HN

[http://www.atariarchives.org/deli/cottage_computer_programmi...](http://www.atariarchives.org/deli/cottage_computer_programming.php)

~~~
foobarge
Thank you for that reference. Paul Lutus is a childhood hero.

~~~
cturner
He wrote a cool book about sailing, also. I read it in q3 last year, then quit
my job and did an atlantic crossing in november. I am now cottage programming.

------
mkhalil
Cool article. Must of been one hell of an smile on their face every time DOS
ran on the machine properly after being assembled on a separate machine.

Q̶u̶e̶u̶e̶ Cue the person looking at source code mentioning something along
the lines of "this is real engineering".

~~~
colejohnson66
Operating systems today are still marvelous feats of engineering despite their
quirks (such as legacy "features" like ANSI and UCS-2 "Unicode" in Windows),
the fact that in the past we could fit an _entire operating system AND running
applications_ in one _megabyte_ of RAM is remarkable!

~~~
cgh
Like my sibling poster said, a full megabyte would have been the sheerest
luxury. After the ROM was mapped into memory on startup, my C64 had 38 kB
available for programs. It is flat-out amazing what people did with that
memory, including office software, networking and of course games.

Keep in mind that the Apple II originally shipped with 4 kB.

~~~
Tloewald
The Sinclair Cambridge ZX-80 (sold here as the Timex computer or somesuch)
shipped with 1kB of RAM. That said, it wasn't really usable for much beyond
programmable calculator kinds of stuff. With a 16kB expansion it was pretty
awesome.

~~~
ianmcgowan
My first computer! I was programming in Z-80 assembler, typing in listings
from magazines, with no way to save the code. So once the machine was switched
off, the program was wiped and it had to be entered again. It's one way to
learn the importance of accuracy - after hours of typing hex digits, to have
one type cause the program to blow up, and have to start all over.

~~~
NewNole2001
I'm gonna' need you to retype this comment from the beginning as there's a
typo and thus, I can't read it.

~~~
alexandre_m
Are you going to blow up as well?

------
mhewett
The Wikipedia entry for Jef Raskin has further discussion of "Notzo Basic". It
was a project by Jef that was never completed.

~~~
juliangamble
There is some more about Notzo basic here:

[http://www.laughton.com/Apple/Apple.html](http://www.laughton.com/Apple/Apple.html)

and here:

[https://s3.amazonaws.com/s3data.computerhistory.org/atchm/do...](https://s3.amazonaws.com/s3data.computerhistory.org/atchm/documents/Apple_DOS_meeting_5Oct1978.pdf)

------
coldcode
I remember 6502 assembly fondly, so easy to learn and remember, but so full of
tricks you had to learn as well.

~~~
jimmaswell
I don't remember any tricks from working with NES 6502 assembly, what tricks
do you mean?

~~~
pvg
Could you write self-modifying code on a NES? If not (or not typically) that
would get rid of most of the crazier stuff.

~~~
Narishma
Code on consoles of that era is typically executed directly from ROM, so you'd
have to first copy it to RAM, which was rather limited (only 2 KB I believe on
the NES).

~~~
jimmaswell
Some carts also had expansion RAM in them also

------
DonHopkins
Reminds me of all those warm starts on a cold late 3D0G night.

TIL the name of that band [1] was suggested by the June Fairchild, the Cheech
and Chong "Ajax Lady" [2].

[1]
[https://en.wikipedia.org/wiki/Three_Dog_Night#Band_name_orig...](https://en.wikipedia.org/wiki/Three_Dog_Night#Band_name_origin)

[2] [https://www.youtube.com/watch?v=WREo-
_R9uyc](https://www.youtube.com/watch?v=WREo-_R9uyc)

~~~
nobleach
Wow! I remember reading 3D0G in one of the many apple manuals that came with
my Apple ][+ I filed it away in my memory and used it every time I
accidentally ended up with a * prompt. It feels good to know others have fond
memories of those days too.

~~~
DonHopkins
The earlier Apple ]['s would dump you into the monitor instead of Applesoft
when you hit the RESET key, after resetting the CIN and COUT vectors which
disable DOS, so you had to type 3D0G to warm start DOS, hook them back up and
re-enter BASIC.

The RESET key was so unfortunately placed, and earlier models had very soft
springs, which Apple eventually stiffened in later models, so there was a
whole industry of after market RESET key protectors [1] (like a square plastic
tube that slides over the key so you have to stick your finger down into it to
RESET), to prevent you from having to type 3D0G so often.

[1]
[http://apple2history.org/history/ah13/#13](http://apple2history.org/history/ah13/#13)

~~~
chiph
I think the ][+ was the first one with the stiffer reset spring.

The other thing that tripped up newbies was the power light on the keyboard
that wasn't a switch (you had to reach around the back left of the unit and
fumble for it).

------
Jedd
I run Debian unstable, wryly observing that I get nervous if any package on my
machines is more than 6 months old.

While I appreciate that some of this code could possibly be re-purposed for
embedded systems or micro-controllers with similar memory constraints, it
seems these problems have been well solved several times over in the past 38
years. Yes, there's a surprising amount of 65xx development still going on,
but again, is this going to fill any gaps that free software doesn't already
cover? Note, I'm not saying this isn't interesting - it very much is.

But, at the risk of sounding churlish, is this hubris, or is there some
justification for the constraint:

    
    
      > ... we are pleased to make available the 1978 source
      > code of Apple II DOS for non-commercial use.

~~~
white-flame
Emulation and production of expansions & 3rd party replacement parts of older
home computers often are in a legal grey area regarding permission to use,
distribute, or modify the original IP.

Permission like this is very clarifying and welcome, and has nothing to do
with what you run on your Debian box.

~~~
Jedd
Thanks for the reply (I note lots of non-explained downvotes, which are always
frustrating in response to an earnest question).

Debian reference was perhaps not useful -- more a comparison for vintage of
code in use.

I appreciate that it's a grey area, and I grew up coding 6502 & 6510 assembly
on C64, hence the interest in reading through the pdf's provided.

It's more the 'non-commercial usage is okay' caveat for the release. I
genuinely don't know if there's a possibility of commercial use, or, beyond
that question, why the restriction would be placed (it seems extremely
unlikely it's for financial reasons).

