Showing posts with label Apple. Show all posts
Showing posts with label Apple. Show all posts

Thursday, March 13, 2014

Building Apple II DOS From Source Code

I am currently reading the book Sophistication & Simplicity: The Life and Times of the Apple II Computer by Steven Weyhrich. It is a fascinating history of the Apple II series of computers, from the beginnings with the Apple I up to the present time.

Many of the books and historical articles about Apple do not give enough credit to the Apple II for getting the company started and generating the revenue and size of company that was need to develop later products like the Lisa, Macintosh, and iPhone.

Reading about Apple DOS reminded me that, recently, the original Apple II DOS source code was publicly released. It has quite an interesting  history, which is covered both in the Steven Weyrich book as well as the Computer History Museum site where the materials can be downloaded.

There is both PDF format scans of the original assembler listing as well as a Microsoft Word file with the source code. I thought it would be fun to try to get the code to build using the CC65 assembler.

An evening's work was enough to get both the low-level disk routines source file as well as the full DOS source cross-compiled on a Linux system using CC65. Since I do not own an Apple II I am not able to test it. but the files assemble and appear to be correct.

I did not check every instruction in detail against the PDF source listing but the length of the code is correct and I checked a good number of the addresses. The Microsoft Word version was very helpful and was used as a starting point, but it did contain a number of errors which were resolved by looking at the scan of the assembly listing. Interestingly enough, the original source code assembler listing reports one assembly error in the code, which I believe I fixed correctly.

If you are interested in the ported code, it can be found here.

After doing the port, I found out that Scott LaBombard had also got the code built and even running on an Apple II. I plan to compare my binaries to his and see if there are any errors in my version that I missed.

I don't plan to do more with this, at least not unless I get my hands on an Apple II (I had an Apple //e and an Apple ][+ in the past but they were damaged a number of years ago in a basement flood).

References:

Tuesday, November 26, 2013

Steve Jobs and Heathkit

In my book Classic Heathkit Electronic Test Equipment I mentioned under Heathkit trivia that Apple Computer co-founder Steve Jobs built some Heathkits as a teenager. I found this link to a full video of a 1995 Steve Jobs interview as well as this transcript. Here is the portion of the discussion where he mentions Heathkit:

I got to know this man, whose name was Larry Lang, and he taught me a lot of electronics. He was great. He used to build Heathkits. Heathkits were really great. Heathkits were these products that you would buy in kit form. You actually paid more money for them than if you just went and bought the finished product if it was available. These Heathkits would come with these detailed manuals about how to put this thing together and all the parts would be laid out in a certain way and color coded. You'd actually build this thing yourself.

I would say that this gave one several things. It gave one an understanding of what was inside a finished product and how it worked because it would include a theory of operation. But maybe even more importantly it gave one the sense that one could build the things that one saw around oneself in the universe. These things were not mysteries any more. I mean you looked at a television set you would think that "I haven't built one of those but I could. There's one of those in the Heathkit catalog and I've built two other Heathkits so I could build that."

In related news, my book is now available from Amazon.com and most country-specific Amazon sites like amazon.de and amazon.co.uk (but unfortunately, not amazon.ca). This will give the book much wider exposure although I'd prefer people order from lulu.com as Amazon takes as much larger commission from the authors.