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/tile/surface.mu.html | 107 ++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 54 deletions(-) (limited to 'html/linux/tile/surface.mu.html') diff --git a/html/linux/tile/surface.mu.html b/html/linux/tile/surface.mu.html index 53b6ca10..ed886ff4 100644 --- a/html/linux/tile/surface.mu.html +++ b/html/linux/tile/surface.mu.html @@ -16,19 +16,18 @@ a { color:inherit; } * { font-size:12pt; font-size: 1em; } .LineNr { } .Delimiter { color: #c000c0; } -.CommentedCode { color: #8a8a8a; } -.muRegEsi { color: #87d787; } -.muRegEdi { color: #87ffd7; } +.muFunction { color: #af5f00; text-decoration: underline; } +.muRegEbx { color: #5f00ff; } +.muRegEsi { color: #005faf; } +.muRegEdi { color: #00af00; } .Constant { color: #008787; } .Special { color: #ff6060; } .PreProc { color: #c000c0; } -.muFunction { color: #af5f00; text-decoration: underline; } +.CommentedCode { color: #8a8a8a; } .muTest { color: #5f8700; } .muComment { color: #005faf; } -.muRegEax { color: #875f00; } -.muRegEcx { color: #af875f; } -.muRegEdx { color: #878700; } -.muRegEbx { color: #8787af; } +.muRegEcx { color: #870000; } +.muRegEdx { color: #af5f00; } --> @@ -88,7 +87,7 @@ if ('onhashchange' in window) { 22 var self/esi: (addr surface) <- copy _self 23 # fill in nrows, ncols 24 var nrows/ecx: int <- num-lines in - 25 var dest/eax: (addr int) <- get self, nrows + 25 var dest/eax: (addr int) <- get self, nrows 26 copy-to *dest, nrows 27 var ncols/edx: int <- first-line-length in # assume all lines are the same length 28 dest <- get self, ncols @@ -97,16 +96,16 @@ if ('onhashchange' in window) { 31 var len/ecx: int <- copy nrows 32 len <- multiply ncols 33 var out/edi: (addr surface) <- copy _self - 34 var data/eax: (addr handle array screen-cell) <- get out, data + 34 var data/eax: (addr handle array screen-cell) <- get out, data 35 populate data, len - 36 var data-addr/eax: (addr array screen-cell) <- lookup *data + 36 var data-addr/eax: (addr array screen-cell) <- lookup *data 37 fill-in data-addr, in 38 # fill in screen-nrows, screen-ncols 39 { - 40 var screen-ah/eax: (addr handle screen) <- get self, screen - 41 var _screen-addr/eax: (addr screen) <- lookup *screen-ah + 40 var screen-ah/eax: (addr handle screen) <- get self, screen + 41 var _screen-addr/eax: (addr screen) <- lookup *screen-ah 42 var screen-addr/edi: (addr screen) <- copy _screen-addr - 43 var nrows/eax: int <- copy 0 + 43 var nrows/eax: int <- copy 0 44 var ncols/ecx: int <- copy 0 45 nrows, ncols <- screen-size screen-addr 46 var dest/edi: (addr int) <- get self, screen-nrows @@ -119,7 +118,7 @@ if ('onhashchange' in window) { 53 fn pin-surface-at _self: (addr surface), r: int, c: int { 54 var self/esi: (addr surface) <- copy _self 55 var dest/ecx: (addr int) <- get self, pin-row - 56 var tmp/eax: int <- copy r + 56 var tmp/eax: int <- copy r 57 copy-to *dest, tmp 58 dest <- get self, pin-col 59 tmp <- copy c @@ -129,7 +128,7 @@ if ('onhashchange' in window) { 63 fn pin-surface-to _self: (addr surface), sr: int, sc: int { 64 var self/esi: (addr surface) <- copy _self 65 var dest/ecx: (addr int) <- get self, pin-screen-row - 66 var tmp/eax: int <- copy sr + 66 var tmp/eax: int <- copy sr 67 copy-to *dest, tmp 68 dest <- get self, pin-screen-col 69 tmp <- copy sc @@ -140,8 +139,8 @@ if ('onhashchange' in window) { 74 #? print-string-to-real-screen "render-surface\n" 75 var self/esi: (addr surface) <- copy _self 76 # clear screen - 77 var screen-ah/eax: (addr handle screen) <- get self, screen - 78 var screen/eax: (addr screen) <- lookup *screen-ah + 77 var screen-ah/eax: (addr handle screen) <- get self, screen + 78 var screen/eax: (addr screen) <- lookup *screen-ah 79 clear-screen screen 80 # 81 var nrows/edx: (addr int) <- get self, screen-nrows @@ -150,7 +149,7 @@ if ('onhashchange' in window) { 84 { 85 compare screen-row, *nrows 86 break-if-> - 87 var screen-col/eax: int <- copy 1 + 87 var screen-col/eax: int <- copy 1 88 { 89 compare screen-col, *ncols 90 break-if-> @@ -170,16 +169,16 @@ if ('onhashchange' in window) { 104 var row/ecx: int <- screen-row-to-surface self, screen-row 105 var col/edx: int <- screen-col-to-surface self, screen-col 106 var data-ah/edi: (addr handle array screen-cell) <- get self, data -107 var _data-addr/eax: (addr array screen-cell) <- lookup *data-ah +107 var _data-addr/eax: (addr array screen-cell) <- lookup *data-ah 108 var data-addr/edi: (addr array screen-cell) <- copy _data-addr -109 var idx/eax: int <- surface-screen-cell-index self, row, col +109 var idx/eax: int <- surface-screen-cell-index self, row, col 110 # if out of bounds, print ' ' 111 compare idx, 0 112 { 113 break-if->= 114 var space/ecx: grapheme <- copy 0x20 115 var screen-ah/edi: (addr handle screen) <- get self, screen -116 var screen/eax: (addr screen) <- lookup *screen-ah +116 var screen/eax: (addr screen) <- lookup *screen-ah 117 print-grapheme screen, space 118 return 119 } @@ -187,7 +186,7 @@ if ('onhashchange' in window) { 121 var offset/ecx: (offset screen-cell) <- compute-offset data-addr, idx 122 var src/ecx: (addr screen-cell) <- index data-addr, offset 123 var screen-ah/edi: (addr handle screen) <- get self, screen -124 var screen/eax: (addr screen) <- lookup *screen-ah +124 var screen/eax: (addr screen) <- lookup *screen-ah 125 print-screen-cell screen, src 126 } 127 @@ -195,10 +194,10 @@ if ('onhashchange' in window) { 129 fn print-screen-cell screen: (addr screen), _cell: (addr screen-cell) { 130 var cell/esi: (addr screen-cell) <- copy _cell 131 reset-formatting screen -132 var fg/eax: (addr int) <- get cell, color +132 var fg/eax: (addr int) <- get cell, color 133 var bg/ecx: (addr int) <- get cell, background-color 134 start-color screen, *fg, *bg -135 var tmp/eax: (addr boolean) <- get cell, bold? +135 var tmp/eax: (addr boolean) <- get cell, bold? 136 { 137 compare *tmp, 0 138 break-if-= @@ -222,7 +221,7 @@ if ('onhashchange' in window) { 156 break-if-= 157 start-blinking screen 158 } -159 var g/eax: (addr grapheme) <- get cell, data +159 var g/eax: (addr grapheme) <- get cell, data 160 print-grapheme screen, *g 161 #? var g2/eax: grapheme <- copy *g 162 #? var g3/eax: int <- copy g2 @@ -230,13 +229,13 @@ if ('onhashchange' in window) { 164 #? print-string-to-real-screen "\n" 165 } 166 -167 fn surface-screen-cell-index _self: (addr surface), row: int, col: int -> _/eax: int { +167 fn surface-screen-cell-index _self: (addr surface), row: int, col: int -> _/eax: int { 168 var self/esi: (addr surface) <- copy _self 169 #? print-int32-hex-to-real-screen row 170 #? print-string-to-real-screen ", " 171 #? print-int32-hex-to-real-screen col 172 #? print-string-to-real-screen "\n" -173 var result/eax: int <- copy -1 +173 var result/eax: int <- copy -1 174 { 175 compare row, 1 176 break-if-< @@ -263,15 +262,15 @@ if ('onhashchange' in window) { 197 fn screen-row-to-surface _self: (addr surface), screen-row: int -> _/ecx: int { 198 var self/esi: (addr surface) <- copy _self 199 var result/ecx: int <- copy screen-row -200 var tmp/eax: (addr int) <- get self, pin-row +200 var tmp/eax: (addr int) <- get self, pin-row 201 result <- add *tmp 202 tmp <- get self, pin-screen-row 203 result <- subtract *tmp 204 return result 205 } 206 -207 fn max _a: int, b: int -> _/eax: int { -208 var a/eax: int <- copy _a +207 fn max _a: int, b: int -> _/eax: int { +208 var a/eax: int <- copy _a 209 compare a, b 210 { 211 break-if-> @@ -280,8 +279,8 @@ if ('onhashchange' in window) { 214 return a 215 } 216 -217 fn min _a: int, b: int -> _/eax: int { -218 var a/eax: int <- copy _a +217 fn min _a: int, b: int -> _/eax: int { +218 var a/eax: int <- copy _a 219 compare a, b 220 { 221 break-if-> @@ -293,7 +292,7 @@ if ('onhashchange' in window) { 227 fn screen-col-to-surface _self: (addr surface), screen-col: int -> _/edx: int { 228 var self/esi: (addr surface) <- copy _self 229 var result/edx: int <- copy screen-col -230 var tmp/eax: (addr int) <- get self, pin-col +230 var tmp/eax: (addr int) <- get self, pin-col 231 result <- add *tmp 232 tmp <- get self, pin-screen-col 233 result <- subtract *tmp @@ -303,7 +302,7 @@ if ('onhashchange' in window) { 237 fn surface-row-to-screen _self: (addr surface), row: int -> _/ecx: int { 238 var self/esi: (addr surface) <- copy _self 239 var result/ecx: int <- copy row -240 var tmp/eax: (addr int) <- get self, pin-screen-row +240 var tmp/eax: (addr int) <- get self, pin-screen-row 241 result <- add *tmp 242 tmp <- get self, pin-row 243 result <- subtract *tmp @@ -313,7 +312,7 @@ if ('onhashchange' in window) { 247 fn surface-col-to-screen _self: (addr surface), col: int -> _/edx: int { 248 var self/esi: (addr surface) <- copy _self 249 var result/edx: int <- copy col -250 var tmp/eax: (addr int) <- get self, pin-screen-col +250 var tmp/eax: (addr int) <- get self, pin-screen-col 251 result <- add *tmp 252 tmp <- get self, pin-col 253 result <- subtract *tmp @@ -327,10 +326,10 @@ if ('onhashchange' in window) { 261 write s-addr, in 262 var result/ecx: int <- copy 1 263 { -264 var done?/eax: boolean <- stream-empty? s-addr +264 var done?/eax: boolean <- stream-empty? s-addr 265 compare done?, 0/false 266 break-if-!= -267 var g/eax: grapheme <- read-grapheme s-addr +267 var g/eax: grapheme <- read-grapheme s-addr 268 compare g, 0xa/newline 269 loop-if-!= 270 result <- increment @@ -345,10 +344,10 @@ if ('onhashchange' in window) { 279 write s-addr, in 280 var result/edx: int <- copy 0 281 { -282 var done?/eax: boolean <- stream-empty? s-addr +282 var done?/eax: boolean <- stream-empty? s-addr 283 compare done?, 0/false 284 break-if-!= -285 var g/eax: grapheme <- read-grapheme s-addr +285 var g/eax: grapheme <- read-grapheme s-addr 286 compare g, 0xa/newline 287 break-if-= 288 result <- increment @@ -364,10 +363,10 @@ if ('onhashchange' in window) { 298 write s-addr, in 299 var idx/ecx: int <- copy 0 300 { -301 var done?/eax: boolean <- stream-empty? s-addr +301 var done?/eax: boolean <- stream-empty? s-addr 302 compare done?, 0/false 303 break-if-!= -304 var g/eax: grapheme <- read-grapheme s-addr +304 var g/eax: grapheme <- read-grapheme s-addr 305 compare g, 0xa/newline 306 loop-if-= 307 var offset/edx: (offset screen-cell) <- compute-offset out, idx @@ -389,8 +388,8 @@ if ('onhashchange' in window) { 323 pin-surface-at s-addr, 1, 1 # surface row and column 324 pin-surface-to s-addr, 1, 1 # screen row and column 325 render-surface s-addr -326 var screen-ah/eax: (addr handle screen) <- get s-addr, screen -327 var screen-addr/eax: (addr screen) <- lookup *screen-ah +326 var screen-ah/eax: (addr handle screen) <- get s-addr, screen +327 var screen-addr/eax: (addr screen) <- lookup *screen-ah 328 check-screen-row screen-addr, 1, "abcd", "F - test-surface-pin-at-origin" 329 check-screen-row screen-addr, 2, "ghij", "F - test-surface-pin-at-origin" 330 check-screen-row screen-addr, 3, "mnop", "F - test-surface-pin-at-origin" @@ -406,8 +405,8 @@ if ('onhashchange' in window) { 340 pin-surface-at s-addr, 1, 1 # surface row and column 341 pin-surface-to s-addr, 2, 1 # screen row and column 342 render-surface s-addr -343 var screen-ah/eax: (addr handle screen) <- get s-addr, screen -344 var screen-addr/eax: (addr screen) <- lookup *screen-ah +343 var screen-ah/eax: (addr handle screen) <- get s-addr, screen +344 var screen-addr/eax: (addr screen) <- lookup *screen-ah 345 # surface edge reached (should seldom happen in the app) 346 check-screen-row screen-addr, 1, " ", "F - test-surface-pin-2" 347 check-screen-row screen-addr, 2, "abcd", "F - test-surface-pin-2" @@ -424,8 +423,8 @@ if ('onhashchange' in window) { 358 pin-surface-at s-addr, 2, 1 # surface row and column 359 pin-surface-to s-addr, 1, 1 # screen row and column 360 render-surface s-addr -361 var screen-ah/eax: (addr handle screen) <- get s-addr, screen -362 var screen-addr/eax: (addr screen) <- lookup *screen-ah +361 var screen-ah/eax: (addr handle screen) <- get s-addr, screen +362 var screen-addr/eax: (addr screen) <- lookup *screen-ah 363 check-screen-row screen-addr, 1, "ghij", "F - test-surface-pin-3" 364 check-screen-row screen-addr, 2, "mnop", "F - test-surface-pin-3" 365 check-screen-row screen-addr, 3, "stuv", "F - test-surface-pin-3" @@ -441,8 +440,8 @@ if ('onhashchange' in window) { 375 pin-surface-at s-addr, 1, 1 # surface row and column 376 pin-surface-to s-addr, 1, 2 # screen row and column 377 render-surface s-addr -378 var screen-ah/eax: (addr handle screen) <- get s-addr, screen -379 var screen-addr/eax: (addr screen) <- lookup *screen-ah +378 var screen-ah/eax: (addr handle screen) <- get s-addr, screen +379 var screen-addr/eax: (addr screen) <- lookup *screen-ah 380 # surface edge reached (should seldom happen in the app) 381 check-screen-row screen-addr, 1, " abc", "F - test-surface-pin-4" 382 check-screen-row screen-addr, 2, " ghi", "F - test-surface-pin-4" @@ -459,8 +458,8 @@ if ('onhashchange' in window) { 393 pin-surface-at s-addr, 1, 2 # surface row and column 394 pin-surface-to s-addr, 1, 1 # screen row and column 395 render-surface s-addr -396 var screen-ah/eax: (addr handle screen) <- get s-addr, screen -397 var screen-addr/eax: (addr screen) <- lookup *screen-ah +396 var screen-ah/eax: (addr handle screen) <- get s-addr, screen +397 var screen-addr/eax: (addr screen) <- lookup *screen-ah 398 check-screen-row screen-addr, 1, "bcde", "F - test-surface-pin-5" 399 check-screen-row screen-addr, 2, "hijk", "F - test-surface-pin-5" 400 check-screen-row screen-addr, 3, "nopq", "F - test-surface-pin-5" @@ -469,9 +468,9 @@ if ('onhashchange' in window) { 403 fn initialize-surface-with-fake-screen _self: (addr surface), nrows: int, ncols: int, in: (addr array byte) { 404 var self/esi: (addr surface) <- copy _self 405 # fill in screen -406 var screen-ah/eax: (addr handle screen) <- get self, screen +406 var screen-ah/eax: (addr handle screen) <- get self, screen 407 allocate screen-ah -408 var screen-addr/eax: (addr screen) <- lookup *screen-ah +408 var screen-addr/eax: (addr screen) <- lookup *screen-ah 409 initialize-screen screen-addr, nrows, ncols 410 # fill in everything else 411 initialize-surface-with self, in -- cgit 1.4.1-2-gfad0