diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-03-07 21:05:45 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-03-07 21:05:45 -0800 |
commit | de7713d97470528ee47031f64446d45555ee7a10 (patch) | |
tree | c8c1e0ad7ca220d062c544cbb673c80c7934a83f /linux/advent2020/2a.mu | |
parent | 1a1a1671edd8d27cdd6229c08e6b40a202d85740 (diff) | |
download | mu-de7713d97470528ee47031f64446d45555ee7a10.tar.gz |
7867
Diffstat (limited to 'linux/advent2020/2a.mu')
-rw-r--r-- | linux/advent2020/2a.mu | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/advent2020/2a.mu b/linux/advent2020/2a.mu index 4492e7ea..ce678eb8 100644 --- a/linux/advent2020/2a.mu +++ b/linux/advent2020/2a.mu @@ -46,8 +46,8 @@ fn main -> _/ebx: int { } skip-chars-matching-whitespace line # now check the rest of the line - var is-valid?/eax: boolean <- is-valid? start, end, letter, line - compare is-valid?, 0/false + var valid?/eax: boolean <- valid? start, end, letter, line + compare valid?, 0/false { break-if-= print-string 0, "valid!\n" @@ -60,7 +60,7 @@ fn main -> _/ebx: int { return 0 } -fn is-valid? start: int, end: int, letter: byte, password: (addr stream byte) -> _/eax: boolean { +fn valid? start: int, end: int, letter: byte, password: (addr stream byte) -> _/eax: boolean { var letter-count/edi: int <- copy 0 # for every c in password # if (c == letter) |