From 372367f59a897162912d0646158bdea1e07d6e66 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 26 Jun 2021 20:55:36 -0700 Subject: html: better highlighting for int registers --- html/linux/advent2020/5a.mu.html | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'html/linux/advent2020/5a.mu.html') diff --git a/html/linux/advent2020/5a.mu.html b/html/linux/advent2020/5a.mu.html index 0c197443..65e52369 100644 --- a/html/linux/advent2020/5a.mu.html +++ b/html/linux/advent2020/5a.mu.html @@ -14,19 +14,18 @@ pre { white-space: pre-wrap; font-family: monospace; color: #000000; background- body { font-size:12pt; font-family: monospace; color: #000000; background-color: #ffffd7; } a { color:inherit; } * { font-size:12pt; font-size: 1em; } -.muRegEdx { color: #878700; } -.muComment { color: #005faf; } -.CommentedCode { color: #8a8a8a; } -.LineNr { } -.muRegEcx { color: #af875f; } -.muRegEax { color: #875f00; } +.PreProc { color: #c000c0; } +.muRegEdx { color: #af5f00; } .Special { color: #ff6060; } -.muRegEdi { color: #87ffd7; } +.LineNr { } +.muRegEbx { color: #5f00ff; } +.Constant { color: #008787; } +.muRegEdi { color: #00af00; } +.muRegEcx { color: #870000; } .Delimiter { color: #c000c0; } .muFunction { color: #af5f00; text-decoration: underline; } -.muRegEbx { color: #8787af; } -.Constant { color: #008787; } -.PreProc { color: #c000c0; } +.CommentedCode { color: #8a8a8a; } +.muComment { color: #005faf; } --> @@ -82,11 +81,11 @@ if ('onhashchange' in window) { 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-<= @@ -99,13 +98,13 @@ if ('onhashchange' in window) { 35 return 0 36 } 37 -38 fn convert-from-binary in: (addr stream byte) -> _/eax: int { +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 @@ -126,7 +125,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" -- cgit 1.4.1-2-gfad0