From ec32c11d3bde6772ddd250d3b217e0541409e0ce Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Thu, 24 Jun 2021 21:44:18 -0700 Subject: . Switch html rendering to a white background. --- html/linux/advent2020/1a.mu.html | 54 +++++++++-------- html/linux/advent2020/1b.mu.html | 58 ++++++++++-------- html/linux/advent2020/2a.mu.html | 48 ++++++++------- html/linux/advent2020/2b.mu.html | 52 ++++++++-------- html/linux/advent2020/3a.mu.html | 52 ++++++++-------- html/linux/advent2020/3b.mu.html | 66 +++++++++++---------- html/linux/advent2020/4a.mu.html | 32 ++++++---- html/linux/advent2020/4b.mu.html | 124 ++++++++++++++++++++------------------- html/linux/advent2020/5a.mu.html | 37 +++++++----- html/linux/advent2020/5b.mu.html | 44 ++++++++------ 10 files changed, 313 insertions(+), 254 deletions(-) (limited to 'html/linux/advent2020') diff --git a/html/linux/advent2020/1a.mu.html b/html/linux/advent2020/1a.mu.html index 51414ef0..2724d4bc 100644 --- a/html/linux/advent2020/1a.mu.html +++ b/html/linux/advent2020/1a.mu.html @@ -7,21 +7,27 @@ - + @@ -70,30 +76,30 @@ if ('onhashchange' in window) { 11 # 12 # You'll need to register to download the 'input' file for yourself. 13 -14 fn main -> _/ebx: int { +14 fn main -> _/ebx: int { 15 # data structure 16 var numbers-storage: (array int 0x100) # 256 ints -17 var numbers/esi: (addr array int) <- address numbers-storage -18 var numbers-index/ecx: int <- copy 0 +17 var numbers/esi: (addr array int) <- address numbers-storage +18 var numbers-index/ecx: int <- copy 0 19 # phase 1: parse each line from stdin and add it to numbers 20 { 21 var line-storage: (stream byte 0x100) # 256 bytes -22 var line/edx: (addr stream byte) <- address line-storage +22 var line/edx: (addr stream byte) <- address line-storage 23 { 24 #? print-string 0, "== iter\n" 25 # read line from stdin 26 clear-stream line 27 read-line-from-real-keyboard line 28 # if line is empty (not even a newline), quit -29 var done?/eax: boolean <- stream-empty? line +29 var done?/eax: boolean <- stream-empty? line 30 compare done?, 0/false 31 break-if-!= 32 #? print-stream-to-real-screen line 33 # convert line to int and append it to numbers -34 var n/eax: int <- parse-decimal-int-from-stream line +34 var n/eax: int <- parse-decimal-int-from-stream line 35 #? print-int32-decimal 0, n 36 #? print-string 0, "\n" -37 var dest/ebx: (addr int) <- index numbers, numbers-index +37 var dest/ebx: (addr int) <- index numbers, numbers-index 38 copy-to *dest, n 39 numbers-index <- increment 40 #? print-string 0, "== " @@ -104,17 +110,17 @@ if ('onhashchange' in window) { 45 } 46 # phase 2: for each number in the array, check if 2020-it is in the rest of 47 # the array -48 var i/eax: int <- copy 0 +48 var i/eax: int <- copy 0 49 { 50 compare i, numbers-index 51 break-if->= -52 var src/ebx: (addr int) <- index numbers, i +52 var src/ebx: (addr int) <- index numbers, i 53 #? print-int32-decimal 0, *src 54 #? print-string 0, "\n" -55 var target/ecx: int <- copy 0x7e4 # 2020 +55 var target/ecx: int <- copy 0x7e4 # 2020 56 target <- subtract *src 57 { -58 var found?/eax: boolean <- find-after numbers, i, target +58 var found?/eax: boolean <- find-after numbers, i, target 59 compare found?, 0/false 60 break-if-= 61 print-string 0, "found\n" @@ -133,16 +139,16 @@ if ('onhashchange' in window) { 74 return 1/not-found 75 } 76 -77 fn find-after _numbers: (addr array int), start: int, _target: int -> _/eax: boolean { -78 var numbers/esi: (addr array int) <- copy _numbers -79 var target/edi: int <- copy _target -80 var len/ecx: int <- length numbers -81 var i/eax: int <- copy start +77 fn find-after _numbers: (addr array int), start: int, _target: int -> _/eax: boolean { +78 var numbers/esi: (addr array int) <- copy _numbers +79 var target/edi: int <- copy _target +80 var len/ecx: int <- length numbers +81 var i/eax: int <- copy start 82 i <- increment 83 { 84 compare i, len 85 break-if->= -86 var src/edx: (addr int) <- index numbers, i +86 var src/edx: (addr int) <- index numbers, i 87 # if *src == target, return true 88 compare *src, target 89 { diff --git a/html/linux/advent2020/1b.mu.html b/html/linux/advent2020/1b.mu.html index 599d60ba..f5a39374 100644 --- a/html/linux/advent2020/1b.mu.html +++ b/html/linux/advent2020/1b.mu.html @@ -7,21 +7,27 @@ - + @@ -70,30 +76,30 @@ if ('onhashchange' in window) { 11 # 12 # You'll need to register to download the 'input' file for yourself. 13 - 14 fn main -> _/ebx: int { + 14 fn main -> _/ebx: int { 15 # data structure 16 var numbers-storage: (array int 0x100) # 256 ints - 17 var numbers/esi: (addr array int) <- address numbers-storage - 18 var numbers-index/ecx: int <- copy 0 + 17 var numbers/esi: (addr array int) <- address numbers-storage + 18 var numbers-index/ecx: int <- copy 0 19 # phase 1: parse each line from stdin and add it to numbers 20 { 21 var line-storage: (stream byte 0x100) # 256 bytes - 22 var line/edx: (addr stream byte) <- address line-storage + 22 var line/edx: (addr stream byte) <- address line-storage 23 { 24 #? print-string 0, "== iter\n" 25 # read line from stdin 26 clear-stream line 27 read-line-from-real-keyboard line 28 # if line is empty (not even a newline), quit - 29 var done?/eax: boolean <- stream-empty? line + 29 var done?/eax: boolean <- stream-empty? line 30 compare done?, 0/false 31 break-if-!= 32 #? print-stream-to-real-screen line 33 # convert line to int and append it to numbers - 34 var n/eax: int <- parse-decimal-int-from-stream line + 34 var n/eax: int <- parse-decimal-int-from-stream line 35 #? print-int32-decimal 0, n 36 #? print-string 0, "\n" - 37 var dest/ebx: (addr int) <- index numbers, numbers-index + 37 var dest/ebx: (addr int) <- index numbers, numbers-index 38 copy-to *dest, n 39 numbers-index <- increment 40 #? print-string 0, "== " @@ -104,12 +110,12 @@ if ('onhashchange' in window) { 45 } 46 # phase 2: for every pair of distinct numbers, check if the rest of the 47 # array has 2020-it - 48 var i/edi: int <- copy 0 + 48 var i/edi: int <- copy 0 49 { 50 compare i, numbers-index 51 break-if->= 52 # for j from i+1 to end - 53 var j/edx: int <- copy i + 53 var j/edx: int <- copy i 54 j <- increment 55 { 56 compare j, numbers-index @@ -117,13 +123,13 @@ if ('onhashchange' in window) { 58 { 59 compare i, j 60 break-if-= - 61 var target/ebx: int <- copy 0x7e4 # 2020 - 62 var src/edi: (addr int) <- index numbers, i + 61 var target/ebx: int <- copy 0x7e4 # 2020 + 62 var src/edi: (addr int) <- index numbers, i 63 target <- subtract *src - 64 var src2/ecx: (addr int) <- index numbers, j + 64 var src2/ecx: (addr int) <- index numbers, j 65 target <- subtract *src2 66 { - 67 var found?/eax: boolean <- find-after numbers, j, target + 67 var found?/eax: boolean <- find-after numbers, j, target 68 compare found?, 0/false 69 break-if-= 70 print-string 0, "found\n" @@ -149,16 +155,16 @@ if ('onhashchange' in window) { 90 return 1/not-found 91 } 92 - 93 fn find-after _numbers: (addr array int), start: int, _target: int -> _/eax: boolean { - 94 var numbers/esi: (addr array int) <- copy _numbers - 95 var target/edi: int <- copy _target - 96 var len/ecx: int <- length numbers - 97 var i/eax: int <- copy start + 93 fn find-after _numbers: (addr array int), start: int, _target: int -> _/eax: boolean { + 94 var numbers/esi: (addr array int) <- copy _numbers + 95 var target/edi: int <- copy _target + 96 var len/ecx: int <- length numbers + 97 var i/eax: int <- copy start 98 i <- increment 99 { 100 compare i, len 101 break-if->= -102 var src/edx: (addr int) <- index numbers, i +102 var src/edx: (addr int) <- index numbers, i 103 # if *src == target, return true 104 compare *src, target 105 { diff --git a/html/linux/advent2020/2a.mu.html b/html/linux/advent2020/2a.mu.html index b964b6eb..2c8d07f1 100644 --- a/html/linux/advent2020/2a.mu.html +++ b/html/linux/advent2020/2a.mu.html @@ -7,18 +7,24 @@ - + @@ -67,31 +73,31 @@ if ('onhashchange' in window) { 8 # 9 # You'll need to register to download the 'input' file for yourself. 10 - 11 fn main -> _/ebx: int { - 12 var valid-password-count/edi: int <- copy 0 + 11 fn main -> _/ebx: int { + 12 var valid-password-count/edi: int <- copy 0 13 var line-storage: (stream byte 0x100) # 256 bytes - 14 var line/edx: (addr stream byte) <- address line-storage + 14 var line/edx: (addr stream byte) <- address line-storage 15 var slice-storage: slice - 16 var slice/ecx: (addr slice) <- address slice-storage + 16 var slice/ecx: (addr slice) <- address slice-storage 17 { 18 # read line from stdin 19 clear-stream line 20 read-line-from-real-keyboard line 21 # if line is empty (not even a newline), quit - 22 var done?/eax: boolean <- stream-empty? line + 22 var done?/eax: boolean <- stream-empty? line 23 compare done?, 0/false 24 break-if-!= 25 print-stream-to-real-screen line 26 # slice = next-token(line, '-') 27 next-token line, 0x2d, slice 28 # pos1 = parse-int(slice) - 29 var _pos1/eax: int <- parse-decimal-int-from-slice slice - 30 var pos1/ebx: int <- copy _pos1 - 31 var dash/eax: byte <- read-byte line # skip '-' + 29 var _pos1/eax: int <- parse-decimal-int-from-slice slice + 30 var pos1/ebx: int <- copy _pos1 + 31 var dash/eax: byte <- read-byte line # skip '-' 32 # slice = next-token(line, ' ') 33 next-token line, 0x20, slice - 34 var _pos2/eax: int <- parse-decimal-int-from-slice slice - 35 var pos2/esi: int <- copy _pos2 + 34 var _pos2/eax: int <- parse-decimal-int-from-slice slice + 35 var pos2/esi: int <- copy _pos2 36 print-int32-decimal 0, pos1 37 print-string 0, " " 38 print-int32-decimal 0, pos2 @@ -104,14 +110,14 @@ if ('onhashchange' in window) { 45 } 46 # letter = next non-space 47 skip-chars-matching-whitespace line - 48 var letter/eax: byte <- read-byte line + 48 var letter/eax: byte <- read-byte line 49 # skip some stuff 50 { - 51 var colon/eax: byte <- read-byte line # skip ':' + 51 var colon/eax: byte <- read-byte line # skip ':' 52 } 53 skip-chars-matching-whitespace line 54 # now check the rest of the line - 55 var valid?/eax: boolean <- valid? pos1, pos2, letter, line + 55 var valid?/eax: boolean <- valid? pos1, pos2, letter, line 56 compare valid?, 0/false 57 { 58 break-if-= @@ -128,9 +134,9 @@ if ('onhashchange' in window) { 69 # ideally password would be a random-access array 70 # we'll just track an index 71 # one benefit: we can easily start at 1 - 72 fn valid? pos1: int, pos2: int, letter: byte, password: (addr stream byte) -> _/eax: boolean { - 73 var i/esi: int <- copy 1 - 74 var letter-count/edi: int <- copy 0 + 72 fn valid? pos1: int, pos2: int, letter: byte, password: (addr stream byte) -> _/eax: boolean { + 73 var i/esi: int <- copy 1 + 74 var letter-count/edi: int <- copy 0 75 # while password stream isn't empty 76 # c = read byte from password 77 # if (c == letter) @@ -143,10 +149,10 @@ if ('onhashchange' in window) { 84 #? print-string 0, " " 85 #? print-int32-decimal 0, i 86 #? print-string 0, "\n" - 87 var done?/eax: boolean <- stream-empty? password + 87 var done?/eax: boolean <- stream-empty? password 88 compare done?, 0/false 89 break-if-!= - 90 var c/eax: byte <- read-byte password + 90 var c/eax: byte <- read-byte password 91 #? { 92 #? var c2/eax: int <- copy c 93 #? print-int32-decimal 0, c2 diff --git a/html/linux/advent2020/3a.mu.html b/html/linux/advent2020/3a.mu.html index 34e0a152..531c212e 100644 --- a/html/linux/advent2020/3a.mu.html +++ b/html/linux/advent2020/3a.mu.html @@ -7,21 +7,27 @@ - + @@ -67,24 +73,24 @@ if ('onhashchange' in window) { 8 # 9 # You'll need to register to download the 'input' file for yourself. 10 - 11 fn main -> _/ebx: int { + 11 fn main -> _/ebx: int { 12 # represent trees in a 2D array of ints 13 # wasteful since each tree is just one bit 14 var trees-storage: (array int 0x2800) # 10k ints - 15 var trees/esi: (addr array int) <- address trees-storage - 16 var trees-length/ecx: int <- copy 0 + 15 var trees/esi: (addr array int) <- address trees-storage + 16 var trees-length/ecx: int <- copy 0 17 var num-rows: int 18 var width: int 19 # phase 1: parse each row of trees from stdin 20 { 21 var line-storage: (stream byte 0x40) # 64 bytes - 22 var line/edx: (addr stream byte) <- address line-storage + 22 var line/edx: (addr stream byte) <- address line-storage 23 { 24 # read line from stdin 25 clear-stream line 26 read-line-from-real-keyboard line 27 # if line is empty (not even a newline), quit - 28 var done?/eax: boolean <- stream-empty? line + 28 var done?/eax: boolean <- stream-empty? line 29 compare done?, 0/false 30 break-if-!= 31 # wastefully recompute width on every line @@ -92,15 +98,15 @@ if ('onhashchange' in window) { 33 copy-to width, 0 34 # turn each byte into a tree and append it 35 $main:line-loop: { - 36 var done?/eax: boolean <- stream-empty? line + 36 var done?/eax: boolean <- stream-empty? line 37 compare done?, 0/false 38 break-if-!= 39 #? print-int32-decimal 0, num-rows 40 #? print-string 0, " " 41 #? print-int32-decimal 0, width 42 #? print-string 0, "\n" - 43 var dest/ebx: (addr int) <- index trees, trees-length - 44 var c/eax: byte <- read-byte line + 43 var dest/ebx: (addr int) <- index trees, trees-length + 44 var c/eax: byte <- read-byte line 45 # newline comes only at end of line 46 compare c, 0xa/newline 47 break-if-= @@ -128,13 +134,13 @@ if ('onhashchange' in window) { 69 print-string 0, "x" 70 print-int32-decimal 0, width 71 print-string 0, "\n" - 72 var row/ecx: int <- copy 0 - 73 var col/edx: int <- copy 0 - 74 var num-trees-hit/edi: int <- copy 0 + 72 var row/ecx: int <- copy 0 + 73 var col/edx: int <- copy 0 + 74 var num-trees-hit/edi: int <- copy 0 75 { 76 compare row, num-rows 77 break-if->= - 78 var curr/eax: int <- index2d trees, row, col, width + 78 var curr/eax: int <- index2d trees, row, col, width 79 compare curr, 0 80 { 81 break-if-= @@ -150,18 +156,18 @@ if ('onhashchange' in window) { 91 return 0 92 } 93 - 94 fn index2d _arr: (addr array int), _row: int, _col: int, width: int -> _/eax: int { + 94 fn index2d _arr: (addr array int), _row: int, _col: int, width: int -> _/eax: int { 95 # handle repeating columns of trees - 96 var dummy/eax: int <- copy 0 - 97 var col/edx: int <- copy 0 + 96 var dummy/eax: int <- copy 0 + 97 var col/edx: int <- copy 0 98 dummy, col <- integer-divide _col, width 99 # compute index -100 var index/eax: int <- copy _row +100 var index/eax: int <- copy _row 101 index <- multiply width 102 index <- add col 103 # look up array -104 var arr/esi: (addr array int) <- copy _arr -105 var src/eax: (addr int) <- index arr, index +104 var arr/esi: (addr array int) <- copy _arr +105 var src/eax: (addr int) <- index arr, index 106 return *src 107 } diff --git a/html/linux/advent2020/3b.mu.html b/html/linux/advent2020/3b.mu.html index 6d34a66b..153d86da 100644 --- a/html/linux/advent2020/3b.mu.html +++ b/html/linux/advent2020/3b.mu.html @@ -7,21 +7,27 @@ - + @@ -67,24 +73,24 @@ if ('onhashchange' in window) { 8 # 9 # You'll need to register to download the 'input' file for yourself. 10 - 11 fn main -> _/ebx: int { + 11 fn main -> _/ebx: int { 12 # represent trees in a 2D array of ints 13 # wasteful since each tree is just one bit 14 var trees-storage: (array int 0x2800) # 10k ints - 15 var trees/esi: (addr array int) <- address trees-storage - 16 var trees-length/ecx: int <- copy 0 + 15 var trees/esi: (addr array int) <- address trees-storage + 16 var trees-length/ecx: int <- copy 0 17 var num-rows: int 18 var width: int 19 # phase 1: parse each row of trees from stdin 20 { 21 var line-storage: (stream byte 0x40) # 64 bytes - 22 var line/edx: (addr stream byte) <- address line-storage + 22 var line/edx: (addr stream byte) <- address line-storage 23 { 24 # read line from stdin 25 clear-stream line 26 read-line-from-real-keyboard line 27 # if line is empty (not even a newline), quit - 28 var done?/eax: boolean <- stream-empty? line + 28 var done?/eax: boolean <- stream-empty? line 29 compare done?, 0/false 30 break-if-!= 31 # wastefully recompute width on every line @@ -92,15 +98,15 @@ if ('onhashchange' in window) { 33 copy-to width, 0 34 # turn each byte into a tree and append it 35 $main:line-loop: { - 36 var done?/eax: boolean <- stream-empty? line + 36 var done?/eax: boolean <- stream-empty? line 37 compare done?, 0/false 38 break-if-!= 39 #? print-int32-decimal 0, num-rows 40 #? print-string 0, " " 41 #? print-int32-decimal 0, width 42 #? print-string 0, "\n" - 43 var dest/ebx: (addr int) <- index trees, trees-length - 44 var c/eax: byte <- read-byte line + 43 var dest/ebx: (addr int) <- index trees, trees-length + 44 var c/eax: byte <- read-byte line 45 # newline comes only at end of line 46 compare c, 0xa/newline 47 break-if-= @@ -124,24 +130,24 @@ if ('onhashchange' in window) { 65 } 66 } 67 # phase 2: compute - 68 var product/edi: int <- copy 1 - 69 var result/eax: int <- num-trees-hit trees, width, num-rows, 1, 1 + 68 var product/edi: int <- copy 1 + 69 var result/eax: int <- num-trees-hit trees, width, num-rows, 1, 1 70 print-int32-decimal 0, result 71 print-string 0, " x " 72 product <- multiply result - 73 var result/eax: int <- num-trees-hit trees, width, num-rows, 3, 1 + 73 var result/eax: int <- num-trees-hit trees, width, num-rows, 3, 1 74 print-int32-decimal 0, result 75 print-string 0, " x " 76 product <- multiply result - 77 var result/eax: int <- num-trees-hit trees, width, num-rows, 5, 1 + 77 var result/eax: int <- num-trees-hit trees, width, num-rows, 5, 1 78 print-int32-decimal 0, result 79 print-string 0, " x " 80 product <- multiply result - 81 var result/eax: int <- num-trees-hit trees, width, num-rows, 7, 1 + 81 var result/eax: int <- num-trees-hit trees, width, num-rows, 7, 1 82 print-int32-decimal 0, result 83 print-string 0, " x " 84 product <- multiply result - 85 var result/eax: int <- num-trees-hit trees, width, num-rows, 1, 2 + 85 var result/eax: int <- num-trees-hit trees, width, num-rows, 1, 2 86 print-int32-decimal 0, result 87 print-string 0, " = " 88 product <- multiply result @@ -150,21 +156,21 @@ if ('onhashchange' in window) { 91 return 0 92 } 93 - 94 fn num-trees-hit trees: (addr array int), width: int, num-rows: int, right: int, down: int -> _/eax: int { + 94 fn num-trees-hit trees: (addr array int), width: int, num-rows: int, right: int, down: int -> _/eax: int { 95 #? print-string 0, "== " 96 #? print-int32-decimal 0, right 97 #? print-string 0, " " 98 #? print-int32-decimal 0, down 99 #? print-string 0, "\n" -100 var row/ecx: int <- copy 0 -101 var col/edx: int <- copy 0 -102 var num-trees-hit/edi: int <- copy 0 +100 var row/ecx: int <- copy 0 +101 var col/edx: int <- copy 0 +102 var num-trees-hit/edi: int <- copy 0 103 { 104 compare row, num-rows 105 break-if->= 106 #? print-int32-decimal 0, col 107 #? print-string 0, "\n" -108 var curr/eax: int <- index2d trees, row, col, width +108 var curr/eax: int <- index2d trees, row, col, width 109 compare curr, 0 110 { 111 break-if-= @@ -177,21 +183,21 @@ if ('onhashchange' in window) { 118 return num-trees-hit 119 } 120 -121 fn index2d _arr: (addr array int), _row: int, _col: int, width: int -> _/eax: int { +121 fn index2d _arr: (addr array int), _row: int, _col: int, width: int -> _/eax: int { 122 # handle repeating columns of trees -123 var dummy/eax: int <- copy 0 -124 var col/edx: int <- copy 0 +123 var dummy/eax: int <- copy 0 +124 var col/edx: int <- copy 0 125 dummy, col <- integer-divide _col, width 126 #? print-string 0, " " 127 #? print-int32-decimal 0, col 128 #? print-string 0, "\n" 129 # compute index -130 var index/eax: int <- copy _row +130 var index/eax: int <- copy _row 131 index <- multiply width 132 index <- add col 133 # look up array -134 var arr/esi: (addr array int) <- copy _arr -135 var src/eax: (addr int) <- index arr, index +134 var arr/esi: (addr array int) <- copy _arr +135 var src/eax: (addr int) <- index arr, index 136 return *src 137 } diff --git a/html/linux/advent2020/4a.mu.html b/html/linux/advent2020/4a.mu.html index e17c8199..113207ac 100644 --- a/html/linux/advent2020/4a.mu.html +++ b/html/linux/advent2020/4a.mu.html @@ -7,18 +7,24 @@ - + @@ -67,21 +72,21 @@ if ('onhashchange' in window) { 8 # 9 # You'll need to register to download the 'input' file for yourself. 10 -11 fn main -> _/ebx: int { +11 fn main -> _/ebx: int { 12 var line-storage: (stream byte 0x10) # 16 bytes is enough -13 var line/edx: (addr stream byte) <- address line-storage -14 var max-seat-id/edi: int <- copy 0 +13 var line/edx: (addr stream byte) <- address line-storage +14 var max-seat-id/edi: int <- copy 0 15 { 16 # read line from stdin 17 clear-stream line 18 read-line-from-real-keyboard line 19 print-stream-to-real-screen line 20 # if line is empty (not even a newline), quit -21 var done?/eax: boolean <- stream-empty? line +21 var done?/eax: boolean <- stream-empty? line 22 compare done?, 0/false 23 break-if-!= 24 # process line -25 var seat-id/eax: int <- convert-from-binary line +25 var seat-id/eax: int <- convert-from-binary line 26 compare seat-id, max-seat-id 27 { 28 break-if-<= @@ -94,20 +99,20 @@ if ('onhashchange' in window) { 35 return 0 36 } 37 -38 fn convert-from-binary in: (addr stream byte) -> _/eax: int { -39 var result/edi: int <- copy 0 -40 var i/ecx: int <- copy 9 # loop counter and also exponent +38 fn convert-from-binary in: (addr stream byte) -> _/eax: int { +39 var result/edi: int <- copy 0 +40 var i/ecx: int <- copy 9 # loop counter and also exponent 41 { 42 compare i, 0 43 break-if-< -44 var c/eax: byte <- read-byte in +44 var c/eax: byte <- read-byte in 45 #? print-string 0, "char: " 46 #? { 47 #? var c2/eax: int <- copy c 48 #? print-int32-hex 0, c2 49 #? } 50 #? print-string 0, "\n" -51 var bit/edx: int <- copy 0 +51 var bit/edx: int <- copy 0 52 { 53 compare c, 0x42/B 54 break-if-!= @@ -121,7 +126,7 @@ if ('onhashchange' in window) { 62 #? print-string 0, "bit: " 63 #? print-int32-decimal 0, bit 64 #? print-string 0, "\n" -65 var bit-value/eax: int <- repeated-shift-left bit, i +65 var bit-value/eax: int <- repeated-shift-left bit, i 66 #? print-string 0, "bit value: " 67 #? print-int32-decimal 0, bit-value 68 #? print-string 0, "\n" diff --git a/html/linux/advent2020/5b.mu.html b/html/linux/advent2020/5b.mu.html index 04f53ae0..80f542e4 100644 --- a/html/linux/advent2020/5b.mu.html +++ b/html/linux/advent2020/5b.mu.html @@ -7,18 +7,24 @@ - +