Browse this growing collection of Apple-1 programs.
A tribute to history and their hackers.

Run them in the emulator right away, or just on the real machine.

version

Apple BASIC, Huston version

by Steve Wozniak in 1977

An interpreter that allows to run programs written in BASIC.

apple tapemachine codewithin 4k

Also referred to as Integer BASIC. Sold by Apple Computer on cassette tape for $5, order code A1T001X.

History

At the time, BASIC was a very popular language that enabled people to do more stuff with their mini- and microcomputers more easily. In order for the Apple-1 to succeed it needed a BASIC.

Apple BASIC was written by Steve Wozniak himself and later on improved further by other people. It did not support floating point arithmetic, so no decimals could be used. It was open source and was shared amoung fellow hobbyists.

Instructions

The Preliminary Apple BASIC Users Manual explains how BASIC is loaded from cassette tape:

Hit the CLEAR SCREEN button which will clear the screen and display only the cursor (a flashing @ sign) in the upper left corner of the screen.

Hit the RESET button which will cause the computer to print a backslash (\) and move the cursor down a line.

Place the BASIC cassette into the recorder, rewinding it if necessary.

  1. Type C100R RETURN
  2. Type E000.EFFFR (don't hit RETURN yet!)
  3. Start the tape
  4. Hit RETURN
  5. When BASIC is loaded (about 30 seconds) the computer will print a backslash (\).

To enter BASIC type E000R RETURN. The computer will print a few characters, then, on the next line, print the prompt character >. This prompt character (>) is used throughout BASIC to signify that the BASIC is ready for additional commands or statements.

To exit BASIC hit the RESET button. This will return control to the monitor. To re-enter BASIC from the monitor without losing the previous program, enter BASIC at E2B3 RETURN, instead of EOOO RETURN. This is extremely useful when you have unintentionally hit the RESET button while in BASIC. Normally, you should enter BASIC at E000 RETURN, which clears any previous programs.

The various BASIC statements and control structures are explained further by the manual.

Versions

Several versions are known to exist. Wendell Sander did some research into this:

There were many versions of Apple 1 Basic provided by Apple in the early days. There was just Woz and SJ and Woz was writing Basic while the computers were being sold. When someone got a copy from SJ it was just the last stable version from Woz.

I bought my Apple 1 at a Byte Shop in mid 1976 and I got 4 different versions of Basic over the next 6 months or so. I labeled them version A through D. Version A did not even have an INPUT statement so about all you could do is print HELLO WORLD. Version B added the INPUT statement, Version C added Arrays and Version D added PEEK and POKE. I have copies of C and D but have not been able to find any earlier. The Huston brothers got a copy of Apple 1 Basic in late 1977 or early 1978 when they were employees at Apple that includes a checksum program and I presume that was the last version. By late 1976 and early 1977 Woz was focused on the Apple II.

Based on the above, together with a blog article and another topic, the following comparison can be made;

Version Related with Comments
A source lost
B source lost, INPUT statement was added
C DIM statement, arrays, were added
D
Super BASIC
Winston Gayler
Eric Smith
Larry Nelson
PEEK and POKE statement were added
HIMEM and LOMEM patch
see tips from Larry Nelson
Pagetable
Briel BASIC 1
Achim Breidenbach see pagetable blog article
Huston Huston Brothers Presumably the last version
Included a checksum program

1 This version of BASIC is used for the Replica 1 and is basically the same thing as the Pagetable version, except that the DSP alias D0F2 used in the Pagetable and original Apple versions (at E3D6 and E3DB) has been replaced with D012.

In the later versions of BASIC there are traces of Apple ][ commands, as becomes clear by reading letters from Larry Nelson written in 1980 and 1981. So this is clearly proof that the development of the Apple ][ got intertwined with the Apple-1. Quoting:

Also found USR, RNDX, and OFF statements on commands in there. USR and RNDX don't work, but OFF turns off the auto-line #. (Try it by typing AUTO 10 RETURN). Then type ESC, then OFF RETURN. We have COLOR=, PLOT, HLIN, too. It adds up to 120 bytes in there + several commands that we can't use.

Maybe Woz has the early versions still lying around, who knows?

Example program

The following program can be entered while running BASIC. It displays the fibonacci numbers and can be started with the RUN command. Use LIST to check if the program is entered correctly.

05 REM Fibonacci numbers 
10 LET M = 5000
20 LET X = 1 : LET Y = 1
30 IF (X>M) THEN GOTO 100
40 PRINT X
50 X = X + Y
60 IF (Y>M) THEN GOTO 100
70 PRINT Y
80 Y = X + Y
90 GOTO 30
100 END

Memory structure of BASIC programs

In this post Larry Nelson explains how a BASIC program is organized in memory:

In the years since I last used my Apple-1, I'm not sure I remember the storage points of each program. If I gave you the wrong loading instructions it would account for the problem of not being able to load a tape. Try this: On a BASIC program that won't load, just load the first segment; 4A.00FFR. If it loads and the computer returns to the monitor, the tape can be read. Now look at the memory locations 004A, 004B, 004C, and 004D.

004B is high byte of the starting address of the second segment on the tape. 004A is the low byte of that address.

004D and 004C respectively form high and low bytes of the ending address of the 2nd segment, plus 0001h. If the 004D,004C combination is <1000h> then the ending address would be 0FFFh (1000-0001=FFFF hex). Replace the addresses you have been using with the calculated addresses and see if you can load the program. If that works, WRITE IT DOWN! If not, the problem may be with the recording itself.

For example, after a BASIC program is loaded, hit RESET to return to Wozmon. Enter 4A.4D and get the starting and ending address of the loaded BASIC program:

004A: 80 02 00 10

In this example the BASIC program is stored in memory from 0280 to 0FFF (1000 minus 0001 hex).

References

Screenshot of Apple BASIC, Huston version
RAM: 4KB
CPU PC=0000

                

Use your keyboard to interact with this Apple-1 program.

Emulated with HoneyCrisp v1.2.7,
check here for more details.


Historical reference

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 source code of Wozmon, the operating system.

The Apple-1 Computer main board
The Apple-1 Computer main board.

The Apple 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.

The Apple-1 Cassette Interface or ACI
The Apple-1 Cassette Interface or ACI.
Cassette with Apple BASIC
Cassette with Apple BASIC.

Software

Woz wrote a BASIC interpreter by himself. It was tiny enough to fit in 4K of memory, but did not support floating point arithmetic. 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.

Dive deeper? Read more here and here.

Memory

The Apple-1 has a 16-bit address bus and 64kB of addressable space. Within this space the 6502-processor can use the different parts of the computer:

  • read from ROM, where Wozmon is stored,
  • manipulate RAM, where user programs and BASIC are loaded,
  • and communicate with peripherals, like the attached keyboard and the cassette interface (ACI).

Woz designed a jumper area on the Apple-1 mainboard where the hobbyist-user could configure how memory should be organized. This was very flexible and made extension of the Apple-1 possible.

The full 64kB is split into 16 equal banks of 4kB each by this jumper area. The banks range from 0 to F, hexadecimal. A bank can be tied to one part of the computer: e.g. the ROM, upper RAM chips or a board in the expansion slot.

Jumper area on the Apple-1 mainboard
Jumper area on the mainboard of the Apple-1.

The default configuration is shown above. For example bank E (address space $E000-$EFFF) was usually tied to the eight lower RAM chips on the Apple-1 mainboard, indicated by W and the black wire in the figure. Usually BASIC was loaded here.

Wozmon

No windows yet. It was called a monitor program back then, the predecessor of an operating system. It allowed reading and modifying the computer's memory and starting programs. Woz his monitor was stored in only 256 bytes of ROM.

Part of the Wozmon source.
Part of the Wozmon source code, stored in ROM.

To load it, the user had to press RESET after powering on the computer. A back slash \ appeared on the screen with a flashing @ below, the cursor. Indicating the Apple-1 was ready for commands.

Try Wozmon yourself by pressing the Run button and after that Reset in the above emulator (any program). Then type 280 RETURN to read a memory location. Values are hexadecimal, so range from 0 to F. Change memory with 280: AB RETURN. Read it again and wow you changed memory!

Follow this excellent course to learn more. The original manual explains Wozmon as well (in Section II) and lists the assembly source code.

Transfer software to a real Apple-1 Order now

Use the 8BitFlux.com Keyboard Serial Terminal to connect to an Apple-1 with this website. It uses the Web Serial API locally and is supported by Chrome and Edge browsers. The Wozmon code of any program can be transferred right away.

The Keyboard Serial Terminal connected to an Apple-1
The Keyboard Serial Terminal connected to an Apple-1.

Use the Serial button to transfer the current program to an Apple-1. For example, BASIC takes around 20 seconds to transfer, at a speed of 57.6 kbps. The board is compatible with the high-speed TurboType™ format. It also performs a CRC check and has an error LED indicator.

Done transferring the game or program? Switch the input to the attached Apple-1 keyboard by pressing a button and enjoy it. This makes a great kit for hobbyists, museums or public events. More info »

Emulation

It is easy to run the software with one of these emulators as well:

This website uses the HoneyCrisp emulator. More information can be found here. It has its own software library with even more programs to explore.

View a comparison of emulators here.

Further exploration

  • Talk on Applefritter, the home ground of the Apple-1 Owners Club.
  • For an anarchistic collection of Apple docs and software see the Asimov FTP.
  • Antoine's collection of Apple cassettes, with scans and audio extracts of the tapes.
  • The Apple-1 Registry keeps track of all real Apple-1 machines that ever existed.
  • The story of a homebrew Apple-1 computer by Bryan.
  • Vince Briel's GitHub repository has all the information on his Replica 1.
  • P-Lab lists interesting Apple-1 projects on his website.
  • San Bergman's website has a lot of well-documented information on the Apple-1, from its internal workings to programming it in assembly.
  • Take the online course in 6502 assembly language programming.

Credits

An initiative of 8BitFlux.com. This website can be put to full use with a Keyboard Serial Terminal adapter board, which enables you run software on a (real) Apple-1 right away.

The textual descriptions and screenshots of the programs listed on this website are licensed under CC BY 4.0

A lot of recognition goes out to Landon J. Smith for being so kind to share his HoneyCrisp Emulator (also available on GitHub) for use on this website. 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 other emulators. The hobby computer enthusiasts of the past, but also people of the present, who keep this hobby so alive. Thank you all.

Disclaimer

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.

No AI is used to describe the software packages here. Human mistakes happen, so please report any nonconformities.

Like it?

Buy me a ☕ coffee.

Check out my products, or just spread the word! Incorrect or missing content can be reported here. Thanks!

No trackers and zero cookies 🍪

Made behind an 🍎 in The Netherlands.