Module advent_solutions::advent2017::day18
[−]
[src]
Day 18: Duet
You discover a tablet containing some strange assembly code labeled simply "Duet". Rather than bother the sound card with it, you decide to run the code yourself. Unfortunately, you don't see any documentation, so you're left to figure out what the instructions mean on your own.
Enums
| Instruction |
There aren't that many instructions, so it shouldn't be hard to figure out what they do. Here's what you determine: |
| Value |
Many of the instructions can take either a register (a single letter) or a number. The value of a register is the integer it contains; the value of a number is that number. |
Functions
| parse_input | |
| part1 |
For example: |
| part2 |
As you congratulate yourself for a job well done, you notice that the documentation has been on the back of the tablet this entire time. While you actually got most of the instructions correct, there are a few key differences. This assembly code isn't about sound at all - it's meant to be run twice at the same time. |