Woz wrote Apple 1 BASIC on paper before the machine existed

How did Woz write the Apple 1 BASIC before building the computer?

A Retrocomputing Stack Exchange thread digs into how Steve Wozniak could author a BASIC interpreter for the Apple 1 before any Apple 1 hardware was built. The answer: he wrote and debugged the code by hand, simulating the 6502 on paper, then typed it in once the machine was working. Commenters marvel at the discipline this required.

How did Woz write the Apple 1 BASIC before building the computer?
  1. femto

    What Woz did was the default way of writing assembly language programs for owners of 8-bit computers (mostly hobbyists). You didn't have money for a second machine, so you wrote your program on paper, you entered it then tested it in situ. Mostly you got it right, as doing it on paper was slow and meant you had the opportunity to put lots of thought into it. 8-bit instruction sets were simple enough that you eventually learned the most common instructions by heart. There was a point where I could mostly translate a Z80 program from assembly to machine code from (my) memory.

    Maybe that is part of the nostalgia for the 8-bit days: the practice of "slow programming"? It was relaxing, sort of like those "slow tv" shows.

  2. runjake

    I don’t know about other people, but back in the early 80s, I spent a lot of time writing code (mostly assembler, some BASIC and other dead languages) with pencil on paper for various reasons: sometimes I preferred it, sometimes I was writing code for computers I only had access to in labs or at school.

    There were even pre-made paper forms for writing code, like the IBM COBOL program sheets and similar for assembler.

    Even now, if I’m working on a tough issue, I still print out code sections on paper and hash it out with a pencil.

  3. euroderf

    Just having an assembler - the first and fundamental productivity tool for whatever chunk of hardware it was that you had on your table - was an incredible step upward. That and persistent storage, even if it was Mom & Dad's cassette recorder.

  4. II2II

    Follow-up question: how did Woz get BASIC into ROM?

    The handwritten interpreter is fairly common knowledge since Woz has told that story many times, but I don't recall any accounts of how he bridged the gap from paper to silicon. All of the discussion about the machine language monitor doesn't really address the question. At best, it moves the question from programming a ROM for BASIC to programming a ROM with the machine language monitor. Even with the monitor, additional hardware would be required to program a ROM. At the very least, a latch would be required to hold the address and data. Of course, it is possible that he did it without the computer (using a rig that let him "toggle" the pins). It is also possible that he used another computer to program the ROM, but, as he said, he didn't have the money to program BASIC on a computer so why would that be different for a ROM?

  5. sam345

    I've never "assembled by hand" but I can believe it and imagine it. As a kid I did write basic code by hand and would type it into my Timex Sinclair with no ability to save it because we could not get the tape cassette to work to save it. So for the first few weeks it would all disappear when you turned the computer off. What a blessing it was to get that cassette to work and be able to save and load our programs back! The next thrill was finally getting a disk drive for a later acquired Commodore 64 and ditching the tapes. Not only storage but random disk access what a concept.

  6. asdefghyk

    I would say bit by bit, I mean "small part" and then keep making small extensions to the program(s)

    First for new hardware would be a monitor program.

    Either write one, or port one from other hardware.

    A monitor program allows the inspection and edit of memory data and also to run programs in such memory.

    The monitor program often placed in ROM for convenance.

    A 6502 cross assembler, could be used to avoid the need for hand assembly the program to 6502 machine code.

    Probably where WOZMON came from.

    Then using WOZMON start writing a VERY simple basic interpreter.

    Maybe the monitor program was borrowed from other hardware that used a 6502 ( would need slight mods for the Apple 1 ) NOTE This is just a possibility - I actually have NO idea

    I suspect WOZ would have invented his own in any case ...

    (OFF TOPIC - I messed around with a 68008 chip in mid 1980s?? and I recall I found a book with a complete montor program in for this chip - I can not recall the name of the book. )

  7. mrandish

    I got my first computer in 1981, a 4K Radio Shack Color Computer for $500 (a huge purchase decision at the time). So I missed hand assembling for bare metal and Altair-type toggles.

    However, there was an interesting period of a few years where assembler tools were either unavailable or fairly expensive, so it was common to use the computer's BASIC to write an assembly language monitor program. Such program listings were pretty common in early hobbyist 'zines. It was also pretty common to use BASIC to POKE in a quick bootstrap program to load a value in a register and jump to an address, which I could usually do from memory. After 40 years I still remember the 6809 RTS was $39 and NOP was $12, two very handy instructions to POKE a quick mod into a program.

  8. not2b

    Back in the 80s I wrote an assembler and a simulator for a custom DSP before the board was manufactured (it was the 80s so several chips were required), and our team wrote and tested code for it before the board was ready. When the board was ready, we wound up having to modify the assembler and simulator because some control signals were wired backwards and it was easier to just change the instruction coding than to redo the layout. The tools ran on a Vax. Worse, it was Eunice, a Unix-on-top-of-VMS atrocity that we were stuck with because of code that needed VMS and other code that wanted a Unix-like system.

More from this day

2026-11-15