From 61ec86b71928afc4a7b0a9c787ba88d5b4b3040b Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 30 Aug 2021 09:21:52 -0700 Subject: . --- html/shell/primitives.mu.html | 140 +++++++++++++++++++++--------------------- 1 file changed, 70 insertions(+), 70 deletions(-) (limited to 'html/shell/primitives.mu.html') diff --git a/html/shell/primitives.mu.html b/html/shell/primitives.mu.html index 0b702821..3cebf0f6 100644 --- a/html/shell/primitives.mu.html +++ b/html/shell/primitives.mu.html @@ -137,56 +137,56 @@ if ('onhashchange' in window) { 72 fn render-primitives screen: (addr screen), xmin: int, xmax: int, ymax: int { 73 var y/ecx: int <- copy ymax 74 y <- subtract 0x11/primitives-border - 75 clear-rect screen, xmin, y, xmax, ymax, 0xdc/bg=green-bg + 75 clear-rect screen, xmin, y, xmax, ymax, 0xdc/bg=green-bg 76 y <- increment 77 var right-min/edx: int <- copy xmax 78 right-min <- subtract 0x1e/primitives-divider - 79 set-cursor-position screen, right-min, y - 80 draw-text-wrapping-right-then-down-from-cursor screen, "primitives", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg + 79 set-cursor-position screen, right-min, y + 80 draw-text-wrapping-right-then-down-from-cursor screen, "primitives", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg 81 y <- increment - 82 set-cursor-position screen, right-min, y - 83 draw-text-wrapping-right-then-down-from-cursor screen, " fn apply set if while", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg + 82 set-cursor-position screen, right-min, y + 83 draw-text-wrapping-right-then-down-from-cursor screen, " fn apply set if while", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg 84 y <- increment - 85 set-cursor-position screen, right-min, y - 86 draw-text-wrapping-right-then-down-from-cursor screen, "booleans", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg + 85 set-cursor-position screen, right-min, y + 86 draw-text-wrapping-right-then-down-from-cursor screen, "booleans", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg 87 y <- increment - 88 set-cursor-position screen, right-min, y - 89 draw-text-wrapping-right-then-down-from-cursor screen, " = and or not", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg + 88 set-cursor-position screen, right-min, y + 89 draw-text-wrapping-right-then-down-from-cursor screen, " = and or not", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg 90 y <- increment - 91 set-cursor-position screen, right-min, y - 92 draw-text-wrapping-right-then-down-from-cursor screen, "lists", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg + 91 set-cursor-position screen, right-min, y + 92 draw-text-wrapping-right-then-down-from-cursor screen, "lists", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg 93 y <- increment - 94 set-cursor-position screen, right-min, y - 95 draw-text-wrapping-right-then-down-from-cursor screen, " cons car cdr no cons? len", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg + 94 set-cursor-position screen, right-min, y + 95 draw-text-wrapping-right-then-down-from-cursor screen, " cons car cdr no cons? len", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg 96 y <- increment - 97 set-cursor-position screen, right-min, y - 98 draw-text-wrapping-right-then-down-from-cursor screen, "numbers", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg + 97 set-cursor-position screen, right-min, y + 98 draw-text-wrapping-right-then-down-from-cursor screen, "numbers", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg 99 y <- increment - 100 set-cursor-position screen, right-min, y - 101 draw-text-wrapping-right-then-down-from-cursor screen, " + - * / %", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg + 100 set-cursor-position screen, right-min, y + 101 draw-text-wrapping-right-then-down-from-cursor screen, " + - * / %", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg 102 y <- increment - 103 set-cursor-position screen, right-min, y - 104 draw-text-wrapping-right-then-down-from-cursor screen, " < > <= >=", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg + 103 set-cursor-position screen, right-min, y + 104 draw-text-wrapping-right-then-down-from-cursor screen, " < > <= >=", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg 105 y <- increment - 106 set-cursor-position screen, right-min, y - 107 draw-text-wrapping-right-then-down-from-cursor screen, " sqrt abs sgn", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg + 106 set-cursor-position screen, right-min, y + 107 draw-text-wrapping-right-then-down-from-cursor screen, " sqrt abs sgn", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg 108 y <- increment - 109 set-cursor-position screen, right-min, y - 110 draw-text-wrapping-right-then-down-from-cursor screen, "arrays", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg + 109 set-cursor-position screen, right-min, y + 110 draw-text-wrapping-right-then-down-from-cursor screen, "arrays", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg 111 y <- increment - 112 set-cursor-position screen, right-min, y - 113 draw-text-wrapping-right-then-down-from-cursor screen, " array index iset len", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg + 112 set-cursor-position screen, right-min, y + 113 draw-text-wrapping-right-then-down-from-cursor screen, " array index iset len", right-min, y, xmax, ymax, 0x2a/fg=orange, 0xdc/bg=green-bg 114 y <- increment 115 var tmpx/eax: int <- copy right-min - 116 tmpx <- draw-text-rightward screen, " populate", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 117 tmpx <- draw-text-rightward screen, ": int _ -> array", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg + 116 tmpx <- draw-text-rightward screen, " populate", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 117 tmpx <- draw-text-rightward screen, ": int _ -> array", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg 118 y <- increment - 119 set-cursor-position screen, right-min, y - 120 draw-text-wrapping-right-then-down-from-cursor screen, "images", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg + 119 set-cursor-position screen, right-min, y + 120 draw-text-wrapping-right-then-down-from-cursor screen, "images", right-min, y, xmax, ymax, 7/fg=grey, 0xdc/bg=green-bg 121 y <- increment 122 var tmpx/eax: int <- copy right-min - 123 tmpx <- draw-text-rightward screen, " img", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 124 tmpx <- draw-text-rightward screen, ": screen stream x y w h", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg + 123 tmpx <- draw-text-rightward screen, " img", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 124 tmpx <- draw-text-rightward screen, ": screen stream x y w h", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg 125 #? { 126 #? compare screen, 0 127 #? break-if-!= @@ -199,64 +199,64 @@ if ('onhashchange' in window) { 134 var left-max/edx: int <- copy xmax 135 left-max <- subtract 0x20/primitives-divider 136 var tmpx/eax: int <- copy xmin - 137 tmpx <- draw-text-rightward screen, "cursor graphics", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 137 tmpx <- draw-text-rightward screen, "cursor graphics", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 138 y <- increment 139 var tmpx/eax: int <- copy xmin - 140 tmpx <- draw-text-rightward screen, " print", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 141 tmpx <- draw-text-rightward screen, ": screen _ -> _", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 140 tmpx <- draw-text-rightward screen, " print", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 141 tmpx <- draw-text-rightward screen, ": screen _ -> _", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 142 y <- increment 143 var tmpx/eax: int <- copy xmin - 144 tmpx <- draw-text-rightward screen, " lines columns", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 145 tmpx <- draw-text-rightward screen, ": screen -> number", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 144 tmpx <- draw-text-rightward screen, " lines columns", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 145 tmpx <- draw-text-rightward screen, ": screen -> number", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 146 y <- increment 147 var tmpx/eax: int <- copy xmin - 148 tmpx <- draw-text-rightward screen, " up down left right", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 149 tmpx <- draw-text-rightward screen, ": screen", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 148 tmpx <- draw-text-rightward screen, " up down left right", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 149 tmpx <- draw-text-rightward screen, ": screen", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 150 y <- increment 151 var tmpx/eax: int <- copy xmin - 152 tmpx <- draw-text-rightward screen, " cr", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 153 tmpx <- draw-text-rightward screen, ": screen ", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg - 154 tmpx <- draw-text-rightward screen, "# move cursor down and to left margin", tmpx, left-max, y, 0x38/fg=trace, 0xdc/bg=green-bg + 152 tmpx <- draw-text-rightward screen, " cr", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 153 tmpx <- draw-text-rightward screen, ": screen ", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 154 tmpx <- draw-text-rightward screen, "# move cursor down and to left margin", tmpx, left-max, y, 0x38/fg=trace, 0xdc/bg=green-bg 155 y <- increment 156 var tmpx/eax: int <- copy xmin - 157 tmpx <- draw-text-rightward screen, "pixel graphics", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 157 tmpx <- draw-text-rightward screen, "pixel graphics", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 158 y <- increment 159 var tmpx/eax: int <- copy xmin - 160 tmpx <- draw-text-rightward screen, " circle bezier line hline vline pixel", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 160 tmpx <- draw-text-rightward screen, " circle bezier line hline vline pixel", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg 161 y <- increment 162 var tmpx/eax: int <- copy xmin - 163 tmpx <- draw-text-rightward screen, " width height", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 164 tmpx <- draw-text-rightward screen, ": screen -> number", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 163 tmpx <- draw-text-rightward screen, " width height", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 164 tmpx <- draw-text-rightward screen, ": screen -> number", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 165 y <- increment 166 var tmpx/eax: int <- copy xmin - 167 tmpx <- draw-text-rightward screen, " clear", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 168 tmpx <- draw-text-rightward screen, ": screen", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 167 tmpx <- draw-text-rightward screen, " clear", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 168 tmpx <- draw-text-rightward screen, ": screen", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 169 y <- increment 170 var tmpx/eax: int <- copy xmin - 171 tmpx <- draw-text-rightward screen, "input", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 171 tmpx <- draw-text-rightward screen, "input", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 172 y <- increment 173 var tmpx/eax: int <- copy xmin - 174 tmpx <- draw-text-rightward screen, " key", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 175 tmpx <- draw-text-rightward screen, ": keyboard -> grapheme?", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 174 tmpx <- draw-text-rightward screen, " key", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 175 tmpx <- draw-text-rightward screen, ": keyboard -> grapheme?", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 176 y <- increment 177 var tmpx/eax: int <- copy xmin - 178 tmpx <- draw-text-rightward screen, "streams", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 178 tmpx <- draw-text-rightward screen, "streams", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 179 y <- increment 180 var tmpx/eax: int <- copy xmin - 181 tmpx <- draw-text-rightward screen, " stream", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 182 tmpx <- draw-text-rightward screen, ": -> stream ", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 181 tmpx <- draw-text-rightward screen, " stream", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 182 tmpx <- draw-text-rightward screen, ": -> stream ", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 183 y <- increment 184 var tmpx/eax: int <- copy xmin - 185 tmpx <- draw-text-rightward screen, " write", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 186 tmpx <- draw-text-rightward screen, ": stream grapheme -> stream", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 185 tmpx <- draw-text-rightward screen, " write", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 186 tmpx <- draw-text-rightward screen, ": stream grapheme -> stream", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 187 y <- increment 188 var tmpx/eax: int <- copy xmin - 189 tmpx <- draw-text-rightward screen, " rewind clear", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 190 tmpx <- draw-text-rightward screen, ": stream", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 189 tmpx <- draw-text-rightward screen, " rewind clear", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 190 tmpx <- draw-text-rightward screen, ": stream", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 191 y <- increment 192 var tmpx/eax: int <- copy xmin - 193 tmpx <- draw-text-rightward screen, " read", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg - 194 tmpx <- draw-text-rightward screen, ": stream -> grapheme", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg + 193 tmpx <- draw-text-rightward screen, " read", tmpx, left-max, y, 0x2a/fg=orange, 0xdc/bg=green-bg + 194 tmpx <- draw-text-rightward screen, ": stream -> grapheme", tmpx, left-max, y, 7/fg=grey, 0xdc/bg=green-bg 195 } 196 197 fn primitive-global? _x: (addr global) -> _/eax: boolean { @@ -1836,7 +1836,7 @@ if ('onhashchange' in window) { 1771 var stream-storage: (stream byte 0x100) 1772 var stream/edi: (addr stream byte) <- address stream-storage 1773 print-cell second-ah, stream, trace -1774 draw-stream-wrapping-right-then-down-from-cursor-over-full-screen screen, stream, 7/fg, 0/bg +1774 draw-stream-wrapping-right-then-down-from-cursor-over-full-screen screen, stream, 7/fg, 0/bg 1775 # return what was printed 1776 copy-object second-ah, out 1777 } @@ -1879,7 +1879,7 @@ if ('onhashchange' in window) { 1814 var screen-ah/eax: (addr handle screen) <- get first, screen-data 1815 var _screen/eax: (addr screen) <- lookup *screen-ah 1816 var screen/ecx: (addr screen) <- copy _screen -1817 clear-screen screen +1817 clear-screen screen 1818 return 1819 } 1820 error trace, "first arg for 'clear' is not a screen or a stream" @@ -2184,7 +2184,7 @@ if ('onhashchange' in window) { 2119 } 2120 var fourth-value/eax: (addr float) <- get fourth, number-data 2121 var color/eax: int <- convert *fourth-value -2122 pixel screen, x, y, color +2122 pixel screen, x, y, color 2123 # return nothing 2124 } 2125 @@ -3193,7 +3193,7 @@ if ('onhashchange' in window) { 3128 var x-float/xmm0: float <- copy *second-value 3129 var x/eax: int <- convert x-float 3130 var x-grapheme/eax: grapheme <- copy x -3131 write-grapheme stream-data, x-grapheme +3131 write-grapheme stream-data, x-grapheme 3132 # return the stream 3133 copy-object first-ah, out 3134 } @@ -3267,7 +3267,7 @@ if ('onhashchange' in window) { 3202 var _stream-data/eax: (addr stream byte) <- lookup *stream-data-ah 3203 var stream-data/ebx: (addr stream byte) <- copy _stream-data 3204 #? rewind-stream stream-data -3205 var result-grapheme/eax: grapheme <- read-grapheme stream-data +3205 var result-grapheme/eax: grapheme <- read-grapheme stream-data 3206 var result/eax: int <- copy result-grapheme 3207 new-integer out, result 3208 } @@ -3307,7 +3307,7 @@ if ('onhashchange' in window) { 3242 # compute dimensions 3243 var dummy/eax: int <- copy 0 3244 var height/ecx: int <- copy 0 -3245 dummy, height <- screen-size screen +3245 dummy, height <- screen-size screen 3246 var result/xmm0: float <- convert height 3247 new-float out, result 3248 } @@ -3347,7 +3347,7 @@ if ('onhashchange' in window) { 3282 # compute dimensions 3283 var width/eax: int <- copy 0 3284 var dummy/ecx: int <- copy 0 -3285 width, dummy <- screen-size screen +3285 width, dummy <- screen-size screen 3286 var result/xmm0: float <- convert width 3287 new-float out, result 3288 } @@ -3387,7 +3387,7 @@ if ('onhashchange' in window) { 3322 # compute dimensions 3323 var width/eax: int <- copy 0 3324 var dummy/ecx: int <- copy 0 -3325 width, dummy <- screen-size screen +3325 width, dummy <- screen-size screen 3326 width <- shift-left 3/log2-font-width 3327 var result/xmm0: float <- convert width 3328 new-float out, result @@ -3428,7 +3428,7 @@ if ('onhashchange' in window) { 3363 # compute dimensions 3364 var dummy/eax: int <- copy 0 3365 var height/ecx: int <- copy 0 -3366 dummy, height <- screen-size screen +3366 dummy, height <- screen-size screen 3367 height <- shift-left 4/log2-font-height 3368 var result/xmm0: float <- convert height 3369 new-float out, result @@ -3558,8 +3558,8 @@ if ('onhashchange' in window) { 3493 var dest-ah/eax: (addr handle screen) <- get second, screen-data 3494 var dest/eax: (addr screen) <- lookup *dest-ah 3495 # -3496 convert-graphemes-to-pixels src -3497 copy-pixels src, dest +3496 convert-screen-cells-to-pixels src +3497 copy-pixels src, dest 3498 } 3499 3500 fn apply-array _args-ah: (addr handle cell), _out-ah: (addr handle cell), trace: (addr trace) { -- cgit 1.4.1-2-gfad0