Vocabulary goals:
- shell
- sandbox
- instruction, operation, inouts, outputs
- strings, arrays, streams
- addresses, handles
- ...
Prerequisites:
- Linux
- git
- fluency with typing in commands at the terminal and interpreting their output
- fluency with some text editor, undo, saving work in files. Autocomplete is nice as well since Mu has some really long function names in its vocabulary.
Resources to keep open:
Task list for learning Mu:
- -- Read the first section of the Readme, and run the program described.
- -- Read the first section of mu.md
- Write an instruction to store 42 to register eax.
- Write an instruction to define a variable
y
on the stack. - Write an instruction to add 3 to a var
x
in a register. - Write an instruction to add 3 to a var
x
on the stack. - ...filling in the blanks on a more complex function. Which one? c2f requires floating point...
- -- Read the second section of mu.md
- Write the header for a function that takes two
int
arguments and returns their sum. Do you need to make any assumptions? - Implement the body of the function.
- ...some exercises involving control flow...
- .../comments on magic constants...
- ...floating point...
- ...drawing text on screen; std lib reference...
- Here's a working counter app. Add a button/hotkey to decrement the counter. You might want to consult ___ in the docs.
- ...some exercise involving a single gap buffer...
- Here's a working temperature converter. Turn it into a miles/km converter.
- Build a simple CRUD app. You'll need the button widget from the counter and the input widget from the temperature converter.
Task list for learning the shell of the Mu computer:
- read https://github.com/akkartik/mu/tree/main/shell#readme
- boot into the shell with this data disk, get game of life running inside the sandbox
- press a key after game of life starts running. what happens?
- boot into the shell with the following data disk and ...
Task list for learning the low-level SubX notation for machine code
- add 2 numbers
- convert celsius to fahrenheit
- reimplement writing a string to a stream
Task list for understanding the Mu toolchain
- Open translate0 to get a sense for what it does.
- Here's a function written in Mu. Pass it through translate0. Try to map Mu instructions to the SubX generated for them.
- Here's a function in SubX. Pass it to translate_subx.
- Open the following files in sequence: a.subx, a.braces, a.calls, a.sigils, a.tests, a.dquotes, a.pack, a.survey. Try to roughly map instructions in each file to the next.