Hacker News

Favorites Setup
Comment by dhosek | original | How did Woz write the Apple 1 BASIC before building the computer?
[−]dhosek · 2026-11-15 Sun 03:52 UTC · link
I find it amusing that so many of the comments were surprised about hand-assembling 6502 code. When I came to the Apple ][, assemblers were relatively more accessible, but even at around $200, it was well beyond my financial means so I would write code longhand in spiral bound graph paper notebooks in four columns: Addresses, labels, hex codes (up to three bytes per opcode) and then the assembly code.

And that $200 being out of bounds went pretty low: for the first couple years of my programming life, floppy disks were beyond my means, so any code I wrote lived in its official version as hand-written code and would have to be retyped any time I wanted it.

[−]ssl-3 · 2026-11-15 Sun 05:08 UTC · link
A lot of us aren't quite old enough to have ever experienced that echelon of computing.
[−]robotresearcher · 2026-11-15 Sun 05:15 UTC · link
It’s still available if you want to try it :)

Like blowing into a gourd is still available to a modern saxophonist.

[−]ssl-3 · 2026-11-15 Sun 05:24 UTC · link
Mmm. It's tempting. And I did write plenty of basic on paper in detention when I was young; that exercise certainly did force me to think in unusual ways.

But I think I'll stick to my LLMs and the fond memories of spending a few evenings sussing out resolute performance from an RP2040 PIO's whole-several assembly instructions. :)

[−]efitz · 2026-11-15 Sun 06:20 UTC · link
It was fun; you should try it!
[−]pseudohadamard · 2026-11-15 Sun 07:47 UTC · link
Kids these days... that's exactly how I wrote code, the 6502 was simple enough that you quickly memorized all the opcodes (A9 07 20 ED FD ...), and you sketched it out on paper and desk-checked it before typing it in... which you did by banging rocks together to get ones and zeros. Ay, we had it tough, but you know, we were happy in those days.
[−]ssl-3 · 2026-11-15 Sun 08:00 UTC · link
I once worked worked with a guy who had himself done 6502 assembler, for CompuServe[1], in their home base of Columbus. Good dude; I wish I'd chatted with him more.

He wasn't happy about the position he was in while we were chatting, except it paid some bills and it provided good health insurance.

For comparison, I never learned any 6502.

But we both answered the phones the same way in that call center, and both we worked to give callers the best troubleshooting advice we could, given our understanding and ability to control that system.

[1]: https://en.wikipedia.org/wiki/CompuServe

[−]lanstin · 2026-11-15 Sun 16:31 UTC · link
I did this for my non apple 6502 machine - the issue I always had was how much space to put in between subroutines so I could change them later and not have to redo all the jumps. I think after a while I just did one 256 byte block per subroutine and screw memory efficiency (not for the last time in the following forty five years). The only time I crunched it back down was for a “use almost all 8K for the decimal digits of E” (which was fun and much faster than Pi but not totally useful as I couldn’t print them or save them to tape).
[−]compsciphd · 2026-11-15 Sun 08:15 UTC · link
if you play blurays / want to make them region free, you can experience it today (the HDMV bytecode that run the non java parts)
[−]flomo · 2026-11-15 Sun 05:21 UTC · link
My local teenager Apple crowd could get you almost any game, or disk copy utility, or etc. But never an assembler or complied Basic, or Apple Pascal or anything like that. I was insufficiently 1335.

Anyway, my career in writing 6502 machine code in pencil pretty much ended at "Hello World".

[−]BuildTheRobots · 2026-11-15 Sun 07:54 UTC · link
1335? Though to be fair you were very almost 1337...
[−]dlcarrier · 2026-11-15 Sun 06:22 UTC · link
…and then you accidentally type 'O' instead of '0' when entering it, and it doesn't work.
[−]mitxela · 2026-11-15 Sun 06:29 UTC · link
If you even had that button on your keyboard.

Apple 1 users had a keyboard. But its developers may have been using a hex keypad, or an array of toggle switches.

[−]skeeter2020 · 2026-11-15 Sun 15:28 UTC · link
When I see old photos of the toggle switch arrays my finger pads start to ache in sympathy!
[−]fy20 · 2026-11-15 Sun 06:53 UTC · link
Using a slashed zero when writing was common for this reason. The BBC Micro even had that instead of unslahsed 0 on its keyboard.
[−]raverbashing · 2026-11-15 Sun 07:07 UTC · link
And honestly assembly consisted of tens of instructions, not hundreds

You could go a long way with mov/jz/jnz etc and basic bios calls

[−]f055 · 2026-11-15 Sun 09:18 UTC · link
I was 4yo when I re-typed my first program from Atari manual to my Atari 800xl and was baffled that I had to retype it after restarting the computer. I tried saving it to a cassette tape but that didn’t work well. I envied my cousins who had their Atari with 5 inch floppy drive.
[−]jonathanlydall · 2026-11-15 Sun 13:01 UTC · link
Speaking as a father of a 4 and 6 year old, and trying to think back to my own (lack of) capabilities at that age, a 4yo being able to re-type a program into a computer seems quite extraordinary.
[−]askbjoernhansen · 2026-11-15 Sun 15:23 UTC · link
I think life was a little slower, so typing a program from hand written notes into the computer was pretty good for getting dopamine.

I was a little older than 4, but I learned to transcribe random snippets from the programming manual into the computer about the time I learned to read; and later I'd program (Pascal, not assembly) by hand writing when in school and then run home and try it out. What else were you going to do?

[−]JKCalhoun · 2026-11-15 Sun 12:58 UTC · link
I'm working on a modern "The First Book of KIM" [1] and there are pages of assembly code for games, utilities. Alongside the assembly is the machine code (byte code).

As near as I can tell, the assembly is not formatted in a way that would actually assemble? Furthermore, there are missing labels, errors… My understanding is that the assembly is there more or less as documentation for the machine code—it was the hex that the person purchasing the book was expected to enter into KIM.

[1] https://archive.org/details/The_First_Book_of_KIM

A new game for the fifty-year-old KIM-1: https://engineersneedart.com/blog/yahtc/yahtc.html

[−]WesolyKubeczek · 2026-11-15 Sun 13:09 UTC · link
> for the first couple years of my programming life, floppy disks were beyond my means, so any code I wrote lived in its official version as hand-written code and would have to be retyped any time I wanted it.

Vimes boots theory exemplified!

[−]oldjohnnylane · 2026-11-15 Sun 15:14 UTC · link
That’s because we’ve had multiple generations of programmers who don’t know what’s under the hood. It is a complete disconnect between hardware and software. I don’t know if that’s good or bad, it just is. FWIW I went to computer camp in the early 80s and the advanced assembly class was exactly what woz did: write on paper and type in hex bytes from the monitor (call -151. If you know you know … 99% of people here think a monitor is just the screen, that’s what I mean).
[−]RaftPeople · 2026-11-15 Sun 19:02 UTC · link
I did this on 6809 for a long time when I got started, just pages full of numbers with some hand written comments. The relative addressing modes made it easier for inserting or moving chunks of code.

I didn't even know what an assembler was until I ran into someone more knowledgeable about this stuff.