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/mandelbrot.mu.html | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'html/mandelbrot.mu.html') diff --git a/html/mandelbrot.mu.html b/html/mandelbrot.mu.html index 14324ce4..013dcab9 100644 --- a/html/mandelbrot.mu.html +++ b/html/mandelbrot.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; } -.muRegEsi { color: #87d787; } -.muComment { color: #005faf; } -.LineNr { } -.muRegEdi { color: #87ffd7; } -.muRegEcx { color: #af875f; } +.PreProc { color: #c000c0; } +.muRegEdx { color: #af5f00; } .Special { color: #ff6060; } -.muRegEax { color: #875f00; } +.LineNr { } +.muRegEsi { color: #005faf; } +.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; } -.muRegEdx { color: #878700; } +.muComment { color: #005faf; } --> @@ -82,11 +81,11 @@ if ('onhashchange' in window) { 18 # Initially the viewport shows a section of the scene 4 units wide. 19 # scene-width-scale = 0.5 20 var scene-width-scale: float - 21 var dest/eax: (addr float) <- address scene-width-scale + 21 var dest/eax: (addr float) <- address scene-width-scale 22 fill-in-rational dest, 1, 2 23 # scene-width = 4 24 var four: float - 25 var dest/eax: (addr float) <- address four + 25 var dest/eax: (addr float) <- address four 26 fill-in-rational dest, 4, 1 27 var scene-width/xmm3: float <- copy four 28 { @@ -103,7 +102,7 @@ if ('onhashchange' in window) { 39 } 40 41 fn mandelbrot screen: (addr screen), scene-cx: float, scene-cy: float, scene-width: float { - 42 var a/eax: int <- copy 0 + 42 var a/eax: int <- copy 0 43 var b/ecx: int <- copy 0 44 a, b <- screen-size screen 45 var width/esi: int <- copy a @@ -120,7 +119,7 @@ if ('onhashchange' in window) { 56 compare x, width 57 break-if->= 58 var real/xmm0: float <- viewport-to-real x, width, scene-cx, scene-width - 59 var iterations/eax: int <- mandelbrot-iterations-for-point real, imaginary, 0x400/max + 59 var iterations/eax: int <- mandelbrot-iterations-for-point real, imaginary, 0x400/max 60 iterations <- shift-right 3 61 var color/edx: int <- copy 0 62 iterations, color <- integer-divide iterations, 0x18/24/size-of-cycle-0 @@ -134,13 +133,13 @@ if ('onhashchange' in window) { 70 } 71 } 72 - 73 fn mandelbrot-iterations-for-point real: float, imaginary: float, max: int -> _/eax: int { + 73 fn mandelbrot-iterations-for-point real: float, imaginary: float, max: int -> _/eax: int { 74 var zero: float 75 var x/xmm0: float <- copy zero 76 var y/xmm1: float <- copy zero 77 var iterations/ecx: int <- copy 0 78 { - 79 var done?/eax: boolean <- mandelbrot-done? x, y + 79 var done?/eax: boolean <- mandelbrot-done? x, y 80 compare done?, 0/false 81 break-if-!= 82 compare iterations, max @@ -155,7 +154,7 @@ if ('onhashchange' in window) { 91 return iterations 92 } 93 - 94 fn mandelbrot-done? x: float, y: float -> _/eax: boolean { + 94 fn mandelbrot-done? x: float, y: float -> _/eax: boolean { 95 # x*x + y*y > 4 96 var x2/xmm0: float <- copy x 97 x2 <- multiply x @@ -163,7 +162,7 @@ if ('onhashchange' in window) { 99 y2 <- multiply y 100 var sum/xmm0: float <- copy x2 101 sum <- add y2 -102 var four/eax: int <- copy 4 +102 var four/eax: int <- copy 4 103 var four-f/xmm1: float <- convert four 104 compare sum, four-f 105 { @@ -187,7 +186,7 @@ if ('onhashchange' in window) { 123 124 fn mandelbrot-y x: float, y: float, imaginary: float -> _/xmm3: float { 125 # 2*x*y + imaginary -126 var two/eax: int <- copy 2 +126 var two/eax: int <- copy 2 127 var result/xmm0: float <- convert two 128 result <- multiply x 129 result <- multiply y @@ -210,7 +209,7 @@ if ('onhashchange' in window) { 146 var width-f/xmm1: float <- convert width 147 result <- divide width-f 148 result <- add scene-cx -149 var two/eax: int <- copy 2 +149 var two/eax: int <- copy 2 150 var two-f/xmm2: float <- convert two 151 var half-scene-width/xmm1: float <- copy scene-width 152 half-scene-width <- divide two-f @@ -230,7 +229,7 @@ if ('onhashchange' in window) { 166 var width-f/xmm1: float <- convert width 167 result <- divide width-f 168 result <- add scene-cy -169 var two/eax: int <- copy 2 +169 var two/eax: int <- copy 2 170 var two-f/xmm2: float <- convert two 171 var second-term/xmm1: float <- copy scene-width 172 second-term <- divide two-f -- cgit 1.4.1-2-gfad0