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/403unicode.mu.html | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'html/403unicode.mu.html') diff --git a/html/403unicode.mu.html b/html/403unicode.mu.html index 2acbbaf6..6cee5b30 100644 --- a/html/403unicode.mu.html +++ b/html/403unicode.mu.html @@ -14,18 +14,17 @@ 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; } +.PreProc { color: #c000c0; } +.muRegEdx { color: #af5f00; } +.Special { color: #ff6060; } .LineNr { } -.muRegEdi { color: #87ffd7; } +.muRegEsi { color: #005faf; } .Constant { color: #008787; } -.Special { color: #ff6060; } -.muRegEax { color: #875f00; } +.muRegEdi { color: #00af00; } +.muRegEcx { color: #870000; } .Delimiter { color: #c000c0; } .muFunction { color: #af5f00; text-decoration: underline; } -.muRegEsi { color: #87d787; } -.muRegEcx { color: #af875f; } -.PreProc { color: #c000c0; } +.muComment { color: #005faf; } --> @@ -82,8 +81,8 @@ if ('onhashchange' in window) { 19 # 20 # The day we want to support combining characters, this function will need to 21 # take multiple code points. Or something. - 22 fn to-grapheme in: code-point -> _/eax: grapheme { - 23 var c/eax: int <- copy in + 22 fn to-grapheme in: code-point -> _/eax: grapheme { + 23 var c/eax: int <- copy in 24 var num-trailers/ecx: int <- copy 0 25 var first/edx: int <- copy 0 26 $to-grapheme:compute-length: { @@ -91,7 +90,7 @@ if ('onhashchange' in window) { 28 compare c, 0x7f 29 { 30 break-if-> - 31 var g/eax: grapheme <- copy c + 31 var g/eax: grapheme <- copy c 32 return g 33 } 34 # 2 bytes @@ -152,28 +151,28 @@ if ('onhashchange' in window) { 89 # TODO: bring in tests once we have check-ints-equal 90 91 # read the next grapheme from a stream of bytes - 92 fn read-grapheme in: (addr stream byte) -> _/eax: grapheme { + 92 fn read-grapheme in: (addr stream byte) -> _/eax: grapheme { 93 # if at eof, return EOF 94 { - 95 var eof?/eax: boolean <- stream-empty? in + 95 var eof?/eax: boolean <- stream-empty? in 96 compare eof?, 0/false 97 break-if-= 98 return 0xffffffff 99 } -100 var c/eax: byte <- read-byte in +100 var c/eax: byte <- read-byte in 101 var num-trailers/ecx: int <- copy 0 102 $read-grapheme:compute-length: { 103 # single byte: just return it 104 compare c, 0xc0 105 { 106 break-if->= -107 var g/eax: grapheme <- copy c +107 var g/eax: grapheme <- copy c 108 return g 109 } 110 compare c, 0xfe 111 { 112 break-if-< -113 var g/eax: grapheme <- copy c +113 var g/eax: grapheme <- copy c 114 return g 115 } 116 # 2 bytes @@ -206,8 +205,8 @@ if ('onhashchange' in window) { 143 { 144 compare num-trailers, 0 145 break-if-<= -146 var tmp/eax: byte <- read-byte in -147 var tmp2/eax: int <- copy tmp +146 var tmp/eax: byte <- read-byte in +147 var tmp2/eax: int <- copy tmp 148 tmp2 <- shift-left-bytes tmp2, num-byte-shifts 149 result <- or tmp2 150 # update loop state @@ -219,9 +218,9 @@ if ('onhashchange' in window) { 156 } 157 158 # needed because available primitives only shift by a literal/constant number of bits -159 fn shift-left-bytes n: int, k: int -> _/eax: int { +159 fn shift-left-bytes n: int, k: int -> _/eax: int { 160 var i/ecx: int <- copy 0 -161 var result/eax: int <- copy n +161 var result/eax: int <- copy n 162 { 163 compare i, k 164 break-if->= @@ -238,7 +237,7 @@ if ('onhashchange' in window) { 175 # this is like write-to-stream, except we skip leading 0 bytes 176 fn write-grapheme out: (addr stream byte), g: grapheme { 177 $write-grapheme:body: { -178 var c/eax: int <- copy g +178 var c/eax: int <- copy g 179 append-byte out, c # first byte is always written 180 c <- shift-right 8 181 compare c, 0 -- cgit 1.4.1-2-gfad0