Hacker News

Favorites Setup
Comment by vr46 | original | How did Woz write the Apple 1 BASIC before building the computer?
[−]vr46 · 2026-11-15 Sun 07:06 UTC · link
The days when I would remember everyone's telephone numbers AND Z80 instructions!

  10 FOR N=0 TO 28
  20 READ B: POKE 32768+N,B
  30 NEXT N
  40 RANDOMIZE USR 32768
  50 DATA 62,2,205,1,22,17,16,128
  60 DATA 1,13,0,205,60,32,24,245
  70 DATA 73,32,65,77,32,65,87,69
  80 DATA 83,79,77,69,13
[−]anonzzzies · 2026-11-15 Sun 07:13 UTC · link
Yep,I did hex data but I still can do z80 like this; assembler does not help as 3e reads and writes faster than ld a,x.
[−]pjmlp · 2026-11-15 Sun 08:05 UTC · link
Thanks for posting this snippet, this is exactly what I meant with DATA and small loader section on another comment.
[−]stevekemp · 2026-11-15 Sun 09:07 UTC · link
It's a little scary that I can recognize a lot of those instructions from memory, even though it's been 40 years since I first got my ZX Spectrum.

Of course more recently I've been doing a lot of z80-based CP/M retro-fun. But "62, xx" is obviously LD A,xx, and similarly the 205 is CD which is CALL.

Fun stuf, thanks for the post, you are indeed AWESOME.

[−]ErroneousBosh · 2026-11-15 Sun 12:04 UTC · link
"call 5633" at that which opens the IO stream given in A.
[−]guenthert · 2026-11-15 Sun 12:43 UTC · link
I thought that's silly, but uh, I did recognize the opcode for CALL as well. Turbo Pascal for CP/M allowed one to enter in-line machine code, but didn't offer an assembler...
[−]stevekemp · 2026-11-15 Sun 14:51 UTC · link
One of the reasons I prefer the port of BBC BASIC for CP/M, over Microsoft's, is that it supports inline Z80 assembler.
[−]ErroneousBosh · 2026-11-15 Sun 12:03 UTC · link
The neat thing about USR was that if I recall correctly it would pass the start address in BC, and return what value you placed in BC when it went back to BASIC.

I could have sworn the ROM spelled it RANDOMISE with the UK spelling though.

[−]JdeBP · 2026-11-15 Sun 16:36 UTC · link
It was the French RANDOMISE in Sinclair SuperBASIC on the QL and the ZX80/81. The Speccy used the Oxford spelling RANDOMIZE.
[−]guenthert · 2026-11-15 Sun 12:49 UTC · link
Uh, no checksums, shudder.