Remix.run Logo
Z80 REPL(abagames.github.io)
75 points by adunk 4 hours ago | 9 comments
flyinghamster 2 hours ago | parent | next [-]

The one thing I lamented about the Apple II Plus (vs. the original with Integer BASIC) was that to make room for autostart, they had to rip out the mini-assembler in the Monitor ROM. That was the closest thing I ever saw to an assembly-language REPL before this. At least they were able to keep the disassembler.

EvanAnderson 28 minutes ago | parent | next [-]

I remember being so confused, as a 10 y/o kid, trying to follow examples from an Apple II-era book on my public library's Apple IIe computers. I didn't understand why I couldn't get the mini assembler to work. The idea that features would be removed on future machines simply didn't occur to me. I guess I really didn't even understand that the IIe was a different machine than what the book was written for.

abecedarius 41 minutes ago | parent | prev | next [-]

I felt the same way.

There was another downside, that the Applesoft BASIC license gave Microsoft a hostage which they later used to kill https://en.wikipedia.org/wiki/MacBASIC. Hard to tell how much it mattered that the Mac came with no user programmability, which had been expected for PCs till then.

boomlinde an hour ago | parent | prev [-]

It's common in the C64 world to use freezer cartridges that allow you to interrupt normal operation and invoke a monitor program. These typically include rudimentary assemblers and disassemblers as well. Fun and useful for patching and reverse engineering!

networked 2 hours ago | parent | prev | next [-]

Cool idea! The REPL needs to handle whitespace after an instruction with no operands:

  > ld c,20h
  0E 20   (7 cycles)
  > ld c,20h [<-- trailing space here]
  0E 20   (7 cycles)
  > nop
  00      (4 cycles)
  > nop [<-- trailing space here]
  unknown instruction: nop
I also wish I could select from the completion list with Tab without typing more of the instruction, fish-style. I.e., you press Tab to go through completion 1, completion 2, ..., completion N, completion 1 again with Enter to confirm your pick.
jottinger 2 hours ago | parent | prev | next [-]

The source code for this is apparently 8 years old: https://github.com/abagames/z80-repl

With that said, I love the idea.

wkjagt an hour ago | parent [-]

That makes me love it even more

torutofu an hour ago | parent | prev | next [-]

the fun part is how fast you can get back into Z80 muscle memory once the repl is giving you immediate feedback

j4cobgarby 2 hours ago | parent | prev [-]

Really nice! Would be fun if there were a few examples that could be loaded into memory