Hacker News

Favorites Setup
Comment by mrandish | original | How did Woz write the Apple 1 BASIC before building the computer?
[−]mrandish · 2026-11-15 Sun 00:41 UTC · link
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.

[−]valeena · 2026-11-15 Sun 02:03 UTC · link
I'm sorry I don't understand - you had to buy instructions?
[−]totallymike · 2026-11-15 Sun 02:18 UTC · link
$nn was a common way to write numeric literals (specifically in hexadecimal, if memory serves) in assembly languages, to differentiate from memory addresses or other uses for values
[−]valeena · 2026-11-15 Sun 03:12 UTC · link
Ah ok, it does make sense now! Super interesting to read about the devices from back then and the difference from the then-Assembly and the one we use nowadays
[−]rbehrends · 2026-11-15 Sun 02:27 UTC · link
$XX was a form of hex code notation, used by the 6502 and Motorola processors assembly language. But not universal: in 8080 or Z80 assembly, hex values were denoted by a `H` suffix (this required adding a `0` at the front if the leading digit was in the A-F range to distinguish them from idenitifiers).
[−]valeena · 2026-11-15 Sun 03:11 UTC · link
Thanks for the answer! Wow, the Assembly from back then seems very different from today's - I'm learning it In uni currently. I'll have to ask my teacher
[−]mrandish · 2026-11-15 Sun 04:15 UTC · link
Oh, yeah... didn't even think of that. Sorry!

Since I was entirely self-taught on that first computer with zero prior education and no books other than the included manuals and a 6809 CPU reference card a very kind sales rep at Motorola mailed to me for free, I learned hex representation that way. It actually still seems a bit weird when I see other hex notations. :-)

[−]valeena · 2026-11-15 Sun 13:07 UTC · link
I believe it's not the first time I've read someone saying that a Motorola sales rep mailed them something like this! Also, nowadays you wouldn't associate Motorola to something computer related... I can remember Motorola phones being more popular before the smart phone era but something related to computer, nope
[−]mrandish · 2026-11-15 Sun 05:13 UTC · link
Here's the reference card I learned assembler from: https://colorcomputerarchive.com/repo/Documents/Datasheets/M...

I still have it in a box, as well as a working sample of the computer in my collection.

[−]valeena · 2026-11-15 Sun 13:18 UTC · link
I've sent it to my teacher along with the the link to the thread!! I know he had a C64 as first computer and from my quick search it wasn't that long after your Motorola... Bet he'll like that!!
[−]myhf · 2026-11-15 Sun 07:58 UTC · link
I'll gladly pay you Tuesday for a NOP today.
[−]ErroneousBosh · 2026-11-15 Sun 12:07 UTC · link
Having spent a lot of time disassembling the ROM firmware and bootable software for the mid-80s Ensoniq Mirage sampler, I can pretty much disassemble 6809 in my head now.

I wish I couldn't, and could remember useful stuff instead.