diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-12-02 19:36:10 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-12-02 19:36:10 -0800 |
commit | f60ebed0fb53ebc9cc0c9d3914359fee8b48ca3b (patch) | |
tree | f8cd919e2853e7dcbca0b12f12507c6e278c7e8a /apps/advent2020/2a.mu | |
parent | a41a6eadd167b26e95c4bc2253cb3fe8dc79667f (diff) | |
download | mu-f60ebed0fb53ebc9cc0c9d3914359fee8b48ca3b.tar.gz |
7318 - advent day 2 done
Funny story: I got the right answer for part 1 even though I missed the ':' in the line format. But of course that didn't work for part 2.
Diffstat (limited to 'apps/advent2020/2a.mu')
-rw-r--r-- | apps/advent2020/2a.mu | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/advent2020/2a.mu b/apps/advent2020/2a.mu index b91cc175..aad94be4 100644 --- a/apps/advent2020/2a.mu +++ b/apps/advent2020/2a.mu @@ -40,7 +40,10 @@ fn main -> _/ebx: int { # letter = next non-space skip-chars-matching-whitespace line var letter/eax: byte <- read-byte line - # skip more spaces + # skip some stuff + { + var colon/eax: byte <- read-byte line # skip ':' + } skip-chars-matching-whitespace line # now check the rest of the line var is-valid?/eax: boolean <- is-valid? start, end, letter, line |