The Apple-1 Software Library Beta

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.

Pasart

by Ken Wesson in 2007

Draw artistic patterns based on Pascal's triangle.

assemblyabove 4k

Also referred to as PasArt or PASART (all caps).

History

A first BASIC version of this artistic program is listed by Creative Computing magazine in the beginning of 1977. It explaines how it works:

Pascal's triangle is one of the most famous number patterns in mathematics. The triangle is very easy to construct. The first two rows consist of only 1's. Each of the subsequent have a 1 at either end of the row, but all other numbers in the pattern are the sum of the two numbers to the right and left in the row above.

The resulting triangle is then rotated to form a table of numbers. After that it is translated to a graphic picture built up from asterisks (*) depending on a few variables that change this behavior.

In 2007, Ken Wesson rewrote this program in assembly for the Apple-1, as he explaines:

I have just finished porting - well recoding really - one of the "games" from Creative Computing. The game is PASART, and it draws quite nice patterns generated from Pascal's Triangle. The idea is nice, and there is really a very wide range of patterns you can easily produce (I chose this one for my kid's benefit), but the original code totally ignores the inherent symmetry in the construction, and as a result is about 7 times as long as necessary! :-)

Wikipedia explaines the mathematical background on the triangle of Pascal.

Memory fix

This program starts but runs incorrect on an Apple-1 with a default memory setup. All asterisks (*) are displayed when it runs, no patterns are being drawn.

Fix it by changing the initialization of a zero-page variable in the program before running it:

308: 06 RETURN

300R RETURN

Now the program uses the start memory address $0600 (instead of $1000) for storing its bookkeeping data and draws the patterns correct.

Instructions

The program asks a four questions (explained below), hit RETURN after answering them with a number. Note that the screen of the Apple-1 is 40 characters wide and has 24 rows. The maximum amount of columns can be 39, because it needs one column for the cursor.

Question Description
ROWS? Amount of rows for the drawing (>2).
COLUMNS? Amount of columns (3-39).
MODULO? All values of Pascal's triangle equal to 0 (zero) with this modulus are not drawn (as spaces). Others are drawn as asterisks (*).
STYLE (1,2,3)? Three choices for the style of the drawing: 1) a single triangle starting at the top left corner, 2) two triangles starting at opposite corners and 3) four triangles starting in all corners.

The drawing will be generated and displayed on the screen after answering all questions. Press RETURN to create another drawing or hit ESC to exit the program.

References

  • Personal website of Ken Wesson, this program is part of the Samples-file for Krusader. A few sample patterns can be found here as well.
  • Creative Computing (March-April 1977, volume 3, no. 2, p. 122-123) published a BASIC version of this program, which was used as an inspiration for this version for the Apple-1.
  • Watch a YouTube video of the program in action.
  • Pascal's triangle explained on Wikipedia.
Screenshot of Pasart

Historical reference : hardware

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 Apple-1 Computer main board
The Apple-1 Computer main board.

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.

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

Software

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.

Dive deeper? Read more here and here.

How to emulate?

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

View a comparison of emulators here.

...and run a program

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.

In-website transfer to an Apple-1 Order now!

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.

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 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 »

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

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.

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.

Mistakes happen, as this website is not generated by any AI, 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.