akkartik / mu

Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.
http://akkartik.name/akkartik-convivial-20200607.pdf
Other
1.35k stars 47 forks source link

SubX exercise 2: reimplement writing a string to a stream #25

Closed akkartik closed 2 years ago

akkartik commented 5 years ago

To see the failing tests:

$ ./subx translate 05[0-7]*.subx -o a.elf  &&  ./subx run a.elf test

Email me if you'd like commit access to work on this.

This exercise should get you thinking about arrays and streams of bytes, a couple of foundational data structures for us. It should also focus attention on the couple of instructions in subx help opcodes that operate on r8/m8 values.

The write function is pretty foundational, so many tests now fail in the project as a whole. The above command focuses on the immediately failing tests. If these pass then everything else should, as well.

When (when!) you need to debug things, go back and reread https://github.com/akkartik/mu/blob/master/subx/Readme.md#a-few-hints-for-debugging. And, of course, feel free to ask me questions.

akkartik commented 2 years ago

Closing because the instructions on this issue are out of date. Issues aren't an ideal way to provide exercises.