Browse all the Apple-1 programs that ever existed. A tribute to history and their hackers.
Run them in any emulator, or instantly on the (real) machine.
by Chris Espinosa in 1976
A handy string output subroutine for do-it-yourselfers.
Dr. Dobb's Journal published this program by Chris Espinosa in September 1976. More or less two months after the introduction of the Apple-1, he writes:
... I believe you should also concentrate on HANDY (Helpful Algorithms for Novice Do-It-Yourselfers) programs to save bytes in space-limited systems. I enclose my example: a string immediate-output subroutine for 6502-based systems.
It was actually an early example of a software component that could be reused by other microcomputer hobbyists. He continues his letter:
It has been implimented on an Apple Computer and copies of the program are being delivered to the Homebrew library and the CCC repository.
Chris was only 14 years old at the time he wrote this program and was Apple's employee number 8. It could be that he created this program in Steve Jobs's parents' garage, where the company was housed at the time.
A couple of months later, an improved version of the routine was published in Dr. Dobb's. It was Marcel Meier who used some byte saving tricks to make the program smaller, without changing the function of the program. This was done regularly in those days because memory was expensive.
In February 1977 this program was revisited again by H. Gordon from the University of California, Berkeley. His revision was even more compact and easier to relocate in RAM. Note that this version is not compatible with the Apple-1 as it starts at memory location 200
, it overlaps the memory used as input buffer storage for the Apple-1 keyboard.
Interestingly, the original published code is not working on the Apple-1. The actual output of a character is handled at location 0413
. On this row, a JSR
instruction with absolute memory address EFFF
is being executed:
0413 20 FF EF JSR OUT OUTPUT IT
However, the correct jump subroutine instruction here should be 20 EF FF
, pointing to the ECHO-routine at FFEF
of the Apple-1's ROM. Chris mentioned "has been implimented on an Apple Computer...", meaning the Apple-1. This seems to be a mistake, the high and low byte of the address should be swapped.
Note that all running versions published on this site are corrected and work on the Apple-1, however the assembly sources are untouched.
The workings of the original version was explained by Chris in his letter:
This routine saves pointers, loops, etc. normally used for string output by sequentially outputting the ASCII characters represented in hex in the bytes immediately following the Jump to Subroutine. After reading a terminating character (null), it returns to the instruction following the end of the string. No string addresses or lengths are needed.
After loading the routine, it can be used in another program like this:
... 20 00 04 48 45 4C 4C 4F 20 57 4F 52 4C 44 21 00 ...
^ <---------------------------------> ^ ^
JSR 0400 ASCII characters null program continues
It first does a jump subroutine to location 0400
, the location where this routine is loaded. Then, the string of ASCII characters follow. These can be of any length, but should be terminated with a null character. After the routine outputs the ASCII characters, it returns to the memory location after the null, resuming the calling program. See more details on 6502 instructions here.
The Hellorld! program can be recreated using this routine, another example:
300: 20 00 04 48 45 4C 4C 4F 52 4C 44 21 00
RETURN
300R
RETURN
Note that the program 'hangs' after outputting to the screen, because the computer tries to execute the arbitrary code that is in memory after the 00
. Also, the Meier's version can be used in the same way, but Gordon's version differs, it is explained in Dr. Dobb's.
Pfff, all this to put something on the screen? Yeah, later programmers were spoiled with the simple print-statements.
This website has full functionality when displayed on a larger screen.
In 1976, the Apple-1 Computer was advertised for $666.66 and came with 4K of on-board memory. For a $120 extra, this doubled to 8K of RAM. The provided Operation Manual included the circuit diagram and assembly code of the monitor program, also called Wozmon.
The Cassette Interface (or ACI) was used to load and save programs from cassette tape. The ACI Manual showed how to install it (the main board had to be jumpered correctly) and explained how it had to be used. Priced at $75, it included a cassette of Apple BASIC.
Its BASIC was written by Woz himself. It did not support floating point arithmetic, but was tiny enough to fit in 4K of memory. The software itself was free. The Preliminary Apple BASIC Users Manual explained how to write your own games and programs with it.
Cassette tapes could be bought as an original accessory to your new Apple-1. A total of nine programs were available and listed $5 each. Pick one below and go back in time.
At the time, people were also inspired by publications like 101 BASIC Computer Games. They spent their evenings and nights to key-in the games, but soon were disappointed to discover that some of these did not work at all because of the missing floating points... Arghh.
It is easy to run the software with one of these emulators:
View a comparison of emulators here.
First, start the emulator of choice and have it run Wozmon (or BASIC), then use the Wozmon button to copy-paste the program code into the emulator.
For example: open Apple 1js in another browser tab. Hit CLS to clear the screen and RESET to enter Wozmon. Then paste the copied Wozmon code from this website.
This website can connect directly (and locally) to the Keyboard Serial Terminal from 8BitFlux.com. It uses the Web Serial API for this and is supported by Chrome or Edge browsers. The Wozmon code of any program can be transferred quickly.
Use the Serial button to transfer the current program to the Apple-1. For example, BASIC takes around 20 seconds to transfer at a speed of 57.6 kbps. The board is compatible with the higher-speed TurboType™ format (with CRC check).
After the transfer of the game or program, switch over to the normal Apple-1 keyboard (by pressing a button) and enjoy it. This makes also a great kit for museums and public events. Kits available now »
This library is an initiative of 8BitFlux.com. It can be put to full use with a Keyboard Serial Terminal adapter board, which let you run software instantly on a (real) Apple-1.
The textual descriptions and screenshots of the programs on this website are licensed under CC BY 4.0
Many thanks to Uncle Bernie for his support and provision of his TurboType™ algorithm, which is part of his Apple-1 Toolchain. Last but not least, all this was not possible by all the authors of Apple-1 software and emulators. The hobby computer enthusiasts of the past, but also people of the present, who keep this hobby so alive. Thank you all.
This website is not associated with Apple Inc. in any way.
It tries to be a tribute to (their) history. It wants to list only software that is already considered to be in the public domain, or its license permits further publication. The (online) sources of the program and other references are listed when known.
Mistakes happen, as this website is not generated by any AI, please report any nonconformities.
Made behind an 🍎 in The Netherlands.