diff options
Diffstat (limited to 'tutorial')
-rw-r--r-- | tutorial/index.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tutorial/index.md b/tutorial/index.md index 68dd29aa..cea31945 100644 --- a/tutorial/index.md +++ b/tutorial/index.md @@ -287,20 +287,20 @@ Run `translate` (or `translate_emulated`) as usual. Use your runbook from Task All our variables so far have had type `int` (integer), but there are limits to what you can do with just whole integers. For example, here's the formula -a visitor to the US will require to convert a distance on a road sign to -kilometers: +a visitor to the US will require to convert distances mentioned on road signs +from miles to kilometers: ``` distance * 1.609 ``` Write a function to perform this conversion. Some starting points: -- reread [the section on variables and registers](https://github.com/akkartik/mu/blob/main/mu.md#variables-registers-and-memory) +* Reread [the section on variables and registers](https://github.com/akkartik/mu/blob/main/mu.md#variables-registers-and-memory) with special attention to the `float` type. -- read [the section on floating-point arithmetic](https://github.com/akkartik/mu/blob/main/mu.md#floating-point-arithmetic). -- One wrinkle is that the x86 instruction set doesn't permit literal - fractional arguments. So you'll need to _create_ 1.609 somehow. Relevant is - [the section on moving values around](https://github.com/akkartik/mu/blob/main/mu.md#moving-values-around). +* Read [the section on floating-point arithmetic](https://github.com/akkartik/mu/blob/main/mu.md#floating-point-arithmetic). +* One wrinkle is that the x86 instruction set doesn't permit literal + fractional arguments. So you'll need to _create_ 1.609 somehow. See the + sub-section on moving values around under [operations on simple types](https://github.com/akkartik/mu/blob/main/mu.md#operations-on-simple-types). This task has four source files in the repo that reveal more and more of the answer. Start from the first, and bump down if you need a hint. |