BACK TO BLOG LIST

SUBSCRIBE: RSS ATOM

AMB for the Apple II

by NJB // // Lafayette, CO

© 2025 Nicholas Bernhard

CC-BY-SA 4.0

Mateusz Viste developed an open e-book format called AMB, or Ancient Machine Book. True to its name, it’s made for very old computers. In fact, in comes bundled with the FreeDOS operating system, which I have installed onto a number of old laptops.

AMB works well. It will render out a book for 80-column displays. It allows for hyperlinks, so one can have a table of contents and links to next or previous chapters.

Last year, I even wrote a script to parse my Shanty markup language into the even simpler AMB markup language, so producing ebooks for AMB would be a snap.

I was curious about going one step beyond: what if AMB could be ported onto a really old computer, like the Apple II?

AMB is written in C, so the port would involve compiling the C source code into the Apple II’s 6502 Assembly language. Fortunately, there is a compiler, CC65, meant for doing just that.

I reached out for some help on this, just to see if this was even doable. A very nice retired developer, who had written Z80 Assembly programs in the day, offered his advice to me.

This very helpful gentleman told me it would not really work. You see, CC65 could absolutely compile AMB down to 6502 Assembly, that part wasn’t the problem. The problem is that as a program, AMB requires at least 64K of RAM, which is the entire memory capacity of my Apple II+. A 64K RAM footprint is insanely, microscopically tiny by today’s standards, but it would completely max out the Apple II+. (The Apple IIe, the top of the line, had a maximum of 128 K of RAM)

Then there are some real limitations on storage. The Apple II’s Disk II drive used 5 1/4 floppy disks, which could hold 140 kilobytes. 140K equals roughly {{https://www.themeasureofthings.com/results.php?comp=data&unit=kb&amt=140||sixty pages of text, not a very long book. (To be fair, I don’t think anyone would want to read even sixty pages on an Apple II).

Verdict: A fun idea, but not one I’ll be pursuing seriously for now. I can imagine a very simple BASIC program where the text of a book is stored in an array, and you’d have controls to cycle through the pages. That’s not too far from how text-based adventure games worked back then. You could call it PMB: Primeval Machine Book.

For now, I’m working very hard on Version 5 of Nantucket E-Books. AMB will be a part of that, although my focus is on EPUB, physical books, and the best browser-based books you’ve ever seen.

SHOW/HIDE COMMENTS
  • No comments yet.

WANT TO COMMENT?