diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-05-01 15:37:55 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-05-01 15:37:55 -0700 |
commit | 2b616894fdedcb40d2907272567377ce073fbc54 (patch) | |
tree | 1052304e1d425e0f65f838ab088ddbdd24d1d371 /shell | |
parent | e3290a6c1a8dbdf386e6763b8beedf0ac3092e88 (diff) | |
download | mu-2b616894fdedcb40d2907272567377ce073fbc54.tar.gz |
move color scheme closer to Solarized dark
sed -i 's,0x12/bg=almost-black,0xdc/bg=green-bg,g' shell/*.mu sed -i 's, 0/bg, 0xc5/bg=blue-bg,g' shell/*.mu sed -i 's, 7/fg=trace, 0x38/fg=trace,g' shell/*.mu sed -i 's, 7/bg=grey, 0x5c/bg=black,g' shell/*.mu Still a few issues. Thanks Adrian Cochrane and Zach DeCook. https://floss.social/@alcinnz/106152068473019933 https://social.librem.one/@zachdecook/106159988837603417
Diffstat (limited to 'shell')
-rw-r--r-- | shell/evaluate.mu | 70 | ||||
-rw-r--r-- | shell/gap-buffer.mu | 14 | ||||
-rw-r--r-- | shell/global.mu | 64 | ||||
-rw-r--r-- | shell/grapheme-stack.mu | 4 | ||||
-rw-r--r-- | shell/main.mu | 2 | ||||
-rw-r--r-- | shell/print.mu | 4 | ||||
-rw-r--r-- | shell/sandbox.mu | 100 | ||||
-rw-r--r-- | shell/trace.mu | 28 |
8 files changed, 143 insertions, 143 deletions
diff --git a/shell/evaluate.mu b/shell/evaluate.mu index 491a2022..f444d145 100644 --- a/shell/evaluate.mu +++ b/shell/evaluate.mu @@ -98,9 +98,9 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel { break-if-!= trace-text trace, "eval", "symbol" - debug-print "a", 7/fg, 0/bg + debug-print "a", 7/fg, 0xc5/bg=blue-bg lookup-symbol in-addr, out, env-h, globals, trace, screen-cell, keyboard-cell - debug-print "z", 7/fg, 0/bg + debug-print "z", 7/fg, 0xc5/bg=blue-bg trace-higher trace return } @@ -185,10 +185,10 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel rest-ah <- get rest, right rest <- lookup *rest-ah var second-arg-ah/edx: (addr handle cell) <- get rest, left - debug-print "P", 4/fg, 0/bg + debug-print "P", 4/fg, 0xc5/bg=blue-bg increment call-number evaluate second-arg-ah, out, env-h, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "Q", 4/fg, 0/bg + debug-print "Q", 4/fg, 0xc5/bg=blue-bg trace-text trace, "eval", "saving global binding" var first-arg/eax: (addr cell) <- lookup *first-arg-ah var first-arg-data-ah/eax: (addr handle stream byte) <- get first-arg, text-data @@ -230,10 +230,10 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel rest-ah <- get rest, right rest <- lookup *rest-ah var second-arg-ah/edx: (addr handle cell) <- get rest, left - debug-print "P", 4/fg, 0/bg + debug-print "P", 4/fg, 0xc5/bg=blue-bg increment call-number evaluate second-arg-ah, out, env-h, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "Q", 4/fg, 0/bg + debug-print "Q", 4/fg, 0xc5/bg=blue-bg trace-text trace, "eval", "mutating binding" var first-arg/eax: (addr cell) <- lookup *first-arg-ah var first-arg-data-ah/eax: (addr handle stream byte) <- get first-arg, text-data @@ -256,10 +256,10 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel trace-text trace, "eval", "evaluating first arg" var rest/eax: (addr cell) <- lookup *rest-ah var first-arg-ah/ecx: (addr handle cell) <- get rest, left - debug-print "R2", 4/fg, 0/bg + debug-print "R2", 4/fg, 0xc5/bg=blue-bg increment call-number evaluate first-arg-ah, out, env-h, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "S2", 4/fg, 0/bg + debug-print "S2", 4/fg, 0xc5/bg=blue-bg # if first arg is nil, short-circuit var out-ah/eax: (addr handle cell) <- copy out var out-a/eax: (addr cell) <- lookup *out-ah @@ -273,10 +273,10 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel rest-ah <- get rest, right rest <- lookup *rest-ah var second-ah/eax: (addr handle cell) <- get rest, left - debug-print "T2", 4/fg, 0/bg + debug-print "T2", 4/fg, 0xc5/bg=blue-bg increment call-number evaluate second-ah, out, env-h, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "U2", 4/fg, 0/bg + debug-print "U2", 4/fg, 0xc5/bg=blue-bg trace-higher trace return } @@ -294,10 +294,10 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel trace-text trace, "eval", "evaluating first arg" var rest/eax: (addr cell) <- lookup *rest-ah var first-arg-ah/ecx: (addr handle cell) <- get rest, left - debug-print "R2", 4/fg, 0/bg + debug-print "R2", 4/fg, 0xc5/bg=blue-bg increment call-number evaluate first-arg-ah, out, env-h, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "S2", 4/fg, 0/bg + debug-print "S2", 4/fg, 0xc5/bg=blue-bg # if first arg is not nil, short-circuit var out-ah/eax: (addr handle cell) <- copy out var out-a/eax: (addr cell) <- lookup *out-ah @@ -311,10 +311,10 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel rest-ah <- get rest, right rest <- lookup *rest-ah var second-ah/eax: (addr handle cell) <- get rest, left - debug-print "T2", 4/fg, 0/bg + debug-print "T2", 4/fg, 0xc5/bg=blue-bg increment call-number evaluate second-ah, out, env-h, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "U2", 4/fg, 0/bg + debug-print "U2", 4/fg, 0xc5/bg=blue-bg trace-higher trace return } @@ -335,10 +335,10 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel var first-arg-ah/ecx: (addr handle cell) <- get rest, left var guard-h: (handle cell) var guard-ah/esi: (addr handle cell) <- address guard-h - debug-print "R", 4/fg, 0/bg + debug-print "R", 4/fg, 0xc5/bg=blue-bg increment call-number evaluate first-arg-ah, guard-ah, env-h, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "S", 4/fg, 0/bg + debug-print "S", 4/fg, 0xc5/bg=blue-bg rest-ah <- get rest, right rest <- lookup *rest-ah var branch-ah/edi: (addr handle cell) <- get rest, left @@ -353,10 +353,10 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel rest <- lookup *rest-ah branch-ah <- get rest, left } - debug-print "T", 4/fg, 0/bg + debug-print "T", 4/fg, 0xc5/bg=blue-bg increment call-number evaluate branch-ah, out, env-h, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "U", 4/fg, 0/bg + debug-print "U", 4/fg, 0xc5/bg=blue-bg trace-higher trace return } @@ -391,10 +391,10 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel break-if-!= $evaluate:while:loop-execution } trace-text trace, "eval", "loop termination check" - debug-print "V", 4/fg, 0/bg + debug-print "V", 4/fg, 0xc5/bg=blue-bg increment call-number evaluate first-arg-ah, guard-ah, env-h, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "W", 4/fg, 0/bg + debug-print "W", 4/fg, 0xc5/bg=blue-bg var guard-a/eax: (addr cell) <- lookup *guard-ah var done?/eax: boolean <- nil? guard-a compare done?, 0/false @@ -422,10 +422,10 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel var curr-out/eax: (addr cell) <- lookup *curr-out-ah var left-out-ah/edi: (addr handle cell) <- get curr-out, left var left-ah/esi: (addr handle cell) <- get curr, left - debug-print "A", 4/fg, 0/bg + debug-print "A", 4/fg, 0xc5/bg=blue-bg increment call-number evaluate left-ah, left-out-ah, env-h, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "B", 4/fg, 0/bg + debug-print "B", 4/fg, 0xc5/bg=blue-bg # curr-out-ah <- get curr-out, right var right-ah/eax: (addr handle cell) <- get curr, right @@ -437,9 +437,9 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel var evaluated-list/eax: (addr cell) <- lookup *evaluated-list-ah var function-ah/ecx: (addr handle cell) <- get evaluated-list, left var args-ah/edx: (addr handle cell) <- get evaluated-list, right - debug-print "C", 4/fg, 0/bg + debug-print "C", 4/fg, 0xc5/bg=blue-bg apply function-ah, args-ah, out, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "Y", 4/fg, 0/bg + debug-print "Y", 4/fg, 0xc5/bg=blue-bg trace-higher trace # trace "=> " out {{{ { @@ -452,7 +452,7 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel trace trace, "eval", stream } # }}} - debug-print "Z", 4/fg, 0/bg + debug-print "Z", 4/fg, 0xc5/bg=blue-bg } fn apply _f-ah: (addr handle cell), args-ah: (addr handle cell), out: (addr handle cell), globals: (addr global-table), trace: (addr trace), screen-cell: (addr handle cell), keyboard-cell: (addr handle cell), call-number: int { @@ -499,9 +499,9 @@ fn apply _f-ah: (addr handle cell), args-ah: (addr handle cell), out: (addr hand rest <- lookup *rest-ah var params-ah/ecx: (addr handle cell) <- get rest, left var body-ah/eax: (addr handle cell) <- get rest, right - debug-print "D", 7/fg, 0/bg + debug-print "D", 7/fg, 0xc5/bg=blue-bg apply-function params-ah, args-ah, body-ah, out, *callee-env-ah, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "Y", 7/fg, 0/bg + debug-print "Y", 7/fg, 0xc5/bg=blue-bg trace-higher trace return } @@ -531,10 +531,10 @@ fn evaluate-exprs _exprs-ah: (addr handle cell), out: (addr handle cell), env-h: # evaluate each expression, writing result to `out` { var curr-ah/eax: (addr handle cell) <- get exprs, left - debug-print "E", 7/fg, 0/bg + debug-print "E", 7/fg, 0xc5/bg=blue-bg increment call-number evaluate curr-ah, out, env-h, globals, trace, screen-cell, keyboard-cell, call-number - debug-print "X", 7/fg, 0/bg + debug-print "X", 7/fg, 0xc5/bg=blue-bg } # exprs-ah <- get exprs, right @@ -664,9 +664,9 @@ fn lookup-symbol sym: (addr cell), out: (addr handle cell), env-h: (handle cell) var env-nil?/eax: boolean <- nil? env compare env-nil?, 0/false break-if-= - debug-print "b", 7/fg, 0/bg + debug-print "b", 7/fg, 0xc5/bg=blue-bg lookup-symbol-in-globals sym, out, globals, trace, screen-cell, keyboard-cell - debug-print "x", 7/fg, 0/bg + debug-print "x", 7/fg, 0xc5/bg=blue-bg trace-higher trace # trace "=> " out " (global)" {{{ { @@ -683,7 +683,7 @@ fn lookup-symbol sym: (addr cell), out: (addr handle cell), env-h: (handle cell) trace trace, "eval", stream } # }}} - debug-print "y", 7/fg, 0/bg + debug-print "y", 7/fg, 0xc5/bg=blue-bg return } # check car @@ -847,9 +847,9 @@ fn mutate-binding name: (addr stream byte), val: (addr handle cell), env-h: (han var env-nil?/eax: boolean <- nil? env compare env-nil?, 0/false break-if-= - debug-print "b", 3/fg, 0/bg + debug-print "b", 3/fg, 0xc5/bg=blue-bg mutate-binding-in-globals name, val, globals, trace - debug-print "x", 3/fg, 0/bg + debug-print "x", 3/fg, 0xc5/bg=blue-bg trace-higher trace # trace "=> " val " (global)" {{{ { @@ -866,7 +866,7 @@ fn mutate-binding name: (addr stream byte), val: (addr handle cell), env-h: (han trace trace, "eval", stream } # }}} - debug-print "y", 3/fg, 0/bg + debug-print "y", 3/fg, 0xc5/bg=blue-bg return } # check car diff --git a/shell/gap-buffer.mu b/shell/gap-buffer.mu index 911fb16f..fe6569d9 100644 --- a/shell/gap-buffer.mu +++ b/shell/gap-buffer.mu @@ -556,7 +556,7 @@ fn test-render-gap-buffer-without-cursor { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 5, 4, 0/no-pixel-graphics # - var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 0/no-cursor, 3/fg, 0/bg + var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 0/no-cursor, 3/fg, 0xc5/bg=blue-bg check-screen-row screen, 0/y, "abc ", "F - test-render-gap-buffer-without-cursor" check-ints-equal x, 4, "F - test-render-gap-buffer-without-cursor: result" # abc @@ -574,7 +574,7 @@ fn test-render-gap-buffer-with-cursor-at-end { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 5, 4, 0/no-pixel-graphics # - var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0/bg + var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0xc5/bg=blue-bg check-screen-row screen, 0/y, "abc ", "F - test-render-gap-buffer-with-cursor-at-end" # we've drawn one extra grapheme for the cursor check-ints-equal x, 4, "F - test-render-gap-buffer-with-cursor-at-end: result" @@ -594,7 +594,7 @@ fn test-render-gap-buffer-with-cursor-in-middle { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 5, 4, 0/no-pixel-graphics # - var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0/bg + var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0xc5/bg=blue-bg check-screen-row screen, 0/y, "abc ", "F - test-render-gap-buffer-with-cursor-in-middle" check-ints-equal x, 4, "F - test-render-gap-buffer-with-cursor-in-middle: result" # abc @@ -611,7 +611,7 @@ fn test-render-gap-buffer-with-cursor-at-start { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 5, 4, 0/no-pixel-graphics # - var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0/bg + var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0xc5/bg=blue-bg check-screen-row screen, 0/y, "abc ", "F - test-render-gap-buffer-with-cursor-at-start" check-ints-equal x, 4, "F - test-render-gap-buffer-with-cursor-at-start: result" # abc @@ -628,7 +628,7 @@ fn test-render-gap-buffer-highlight-matching-close-paren { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 5, 4, 0/no-pixel-graphics # - var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0/bg + var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0xc5/bg=blue-bg check-screen-row screen, 0/y, "(a) ", "F - test-render-gap-buffer-highlight-matching-close-paren" check-ints-equal x, 4, "F - test-render-gap-buffer-highlight-matching-close-paren: result" check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "| ", "F - test-render-gap-buffer-highlight-matching-close-paren: cursor" @@ -646,7 +646,7 @@ fn test-render-gap-buffer-highlight-matching-open-paren { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 5, 4, 0/no-pixel-graphics # - var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0/bg + var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0xc5/bg=blue-bg check-screen-row screen, 0/y, "(a) ", "F - test-render-gap-buffer-highlight-matching-open-paren" check-ints-equal x, 4, "F - test-render-gap-buffer-highlight-matching-open-paren: result" check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " | ", "F - test-render-gap-buffer-highlight-matching-open-paren: cursor" @@ -663,7 +663,7 @@ fn test-render-gap-buffer-highlight-matching-open-paren-of-end { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 5, 4, 0/no-pixel-graphics # - var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0/bg + var x/eax: int <- render-gap-buffer screen, gap, 0/x, 0/y, 1/show-cursor, 3/fg, 0xc5/bg=blue-bg check-screen-row screen, 0/y, "(a) ", "F - test-render-gap-buffer-highlight-matching-open-paren-of-end" check-ints-equal x, 4, "F - test-render-gap-buffer-highlight-matching-open-paren-of-end: result" check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " |", "F - test-render-gap-buffer-highlight-matching-open-paren-of-end: cursor" diff --git a/shell/global.mu b/shell/global.mu index 75dfc60e..1a068408 100644 --- a/shell/global.mu +++ b/shell/global.mu @@ -125,7 +125,7 @@ fn write-globals out: (addr stream byte), _self: (addr global-table) { # globals layout: 1 char padding, 41 code, 1 padding, 41 code, 1 padding = 85 chars fn render-globals screen: (addr screen), _self: (addr global-table) { - clear-rect screen, 0/xmin, 0/ymin, 0x55/xmax, 0x2f/ymax=screen-height-without-menu, 0x12/bg=almost-black + clear-rect screen, 0/xmin, 0/ymin, 0x55/xmax, 0x2f/ymax=screen-height-without-menu, 0xdc/bg=green-bg var self/esi: (addr global-table) <- copy _self # render primitives render-primitives screen, 1/xmin=padding-left, 0x55/xmax, 0x2f/ymax @@ -172,12 +172,12 @@ fn render-globals screen: (addr screen), _self: (addr global-table) { compare y, y2 { break-if->= - x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 1/padding-left, y1, 0x2a/xmax, 0x2f/ymax, 0/no-cursor, 7/fg=definition, 0/bg + x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 1/padding-left, y1, 0x2a/xmax, 0x2f/ymax, 0/no-cursor, 7/fg=definition, 0xc5/bg=blue-bg y <- add 2 copy-to y1, y break $render-globals:render-global } - x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 0x2b/xmin, y2, 0x54/xmax, 0x2f/ymax, 0/no-cursor, 7/fg=definition, 0/bg + x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 0x2b/xmin, y2, 0x54/xmax, 0x2f/ymax, 0/no-cursor, 7/fg=definition, 0xc5/bg=blue-bg y <- add 2 copy-to y2, y } @@ -191,62 +191,62 @@ fn render-primitives screen: (addr screen), xmin: int, xmax: int, ymax: int { var y/ecx: int <- copy ymax y <- subtract 0xf var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, "cursor graphics", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, "cursor graphics", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, " print", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, ": screen a -> a", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, " print", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, ": screen a -> a", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, " lines columns", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, ": screen -> number", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, " lines columns", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, ": screen -> number", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, " up down left right", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, ": screen", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, " up down left right", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, ": screen", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, " cr", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, ": screen ", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, "# move cursor down and to left margin", tmpx, xmax, y, 9/fg=blue, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, " cr", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, ": screen ", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, "# move cursor down and to left margin", tmpx, xmax, y, 9/fg=blue, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, "pixel graphics", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, "pixel graphics", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, " width height", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, ": screen -> number", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, " width height", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, ": screen -> number", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, " pixel", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, ": screen x y color", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, " pixel", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, ": screen x y color", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, "screen/keyboard", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, "screen/keyboard", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, " clear", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, ": screen", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, " clear", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, ": screen", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, " key", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, ": () -> grapheme?", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, " key", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, ": () -> grapheme?", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, "streams", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, "streams", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, " stream", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, ": () -> stream ", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, " stream", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, ": () -> stream ", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, " write", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, ": stream grapheme -> stream", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, " write", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, ": stream grapheme -> stream", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg y <- increment var tmpx/eax: int <- copy xmin - tmpx <- draw-text-rightward screen, "fn def set if while = no(t) car cdr cons ", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, "num: ", tmpx, xmax, y, 7/fg=grey, 0x12/bg=almost-black - tmpx <- draw-text-rightward screen, "+ - * / sqrt abs sgn < > <= >= ", tmpx, xmax, y, 0x2a/fg=orange, 0x12/bg=almost-black + tmpx <- draw-text-rightward screen, "fn def set if while = no(t) car cdr cons ", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, "num: ", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg + tmpx <- draw-text-rightward screen, "+ - * / sqrt abs sgn < > <= >= ", tmpx, xmax, y, 0x2a/fg=orange, 0xdc/bg=green-bg } fn primitive-global? _x: (addr global) -> _/eax: boolean { @@ -1351,7 +1351,7 @@ fn apply-print _args-ah: (addr handle cell), out: (addr handle cell), trace: (ad var stream-storage: (stream byte 0x100) var stream/edi: (addr stream byte) <- address stream-storage print-cell second-ah, stream, trace - draw-stream-wrapping-right-then-down-from-cursor-over-full-screen screen, stream, 7/fg, 0/bg + draw-stream-wrapping-right-then-down-from-cursor-over-full-screen screen, stream, 7/fg, 0xc5/bg=blue-bg # return what was printed copy-object second-ah, out } diff --git a/shell/grapheme-stack.mu b/shell/grapheme-stack.mu index dda4623d..16a9a596 100644 --- a/shell/grapheme-stack.mu +++ b/shell/grapheme-stack.mu @@ -126,7 +126,7 @@ fn render-stack-from-bottom screen: (addr screen), self: (addr grapheme-stack), var height/ebx: int <- copy _height var x2/eax: int <- copy 0 var y2/ecx: int <- copy 0 - x2, y2 <- render-stack-from-bottom-wrapping-right-then-down screen, self, x, y, width, height, x, y, highlight-matching-open-paren?, open-paren-depth, 3/fg=cyan, 0/bg + x2, y2 <- render-stack-from-bottom-wrapping-right-then-down screen, self, x, y, width, height, x, y, highlight-matching-open-paren?, open-paren-depth, 3/fg=cyan, 0xc5/bg=blue-bg return x2 # y2? yolo } @@ -189,7 +189,7 @@ fn render-stack-from-top screen: (addr screen), self: (addr grapheme-stack), x: var height/ebx: int <- copy _height var x2/eax: int <- copy 0 var y2/ecx: int <- copy 0 - x2, y2 <- render-stack-from-top-wrapping-right-then-down screen, self, x, y, width, height, x, y, render-cursor?, 3/fg=cyan, 0/bg + x2, y2 <- render-stack-from-top-wrapping-right-then-down screen, self, x, y, width, height, x, y, render-cursor?, 3/fg=cyan, 0xc5/bg=blue-bg return x2 # y2? yolo } diff --git a/shell/main.mu b/shell/main.mu index e4a90aac..259fd7ab 100644 --- a/shell/main.mu +++ b/shell/main.mu @@ -82,7 +82,7 @@ fn load-state data-disk: (addr disk), _sandbox: (addr sandbox), globals: (addr g var s-storage: (stream byte 0x1000) # space for 8/sectors var s/ebx: (addr stream byte) <- address s-storage load-sectors data-disk, 0/lba, 8/sectors, s -#? draw-stream-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, s, 7/fg, 0/bg +#? draw-stream-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, s, 7/fg, 0xc5/bg=blue-bg # stream -> gap-buffer load-gap-buffer-from-stream data, s clear-stream s diff --git a/shell/print.mu b/shell/print.mu index 1eb19ba3..e9056323 100644 --- a/shell/print.mu +++ b/shell/print.mu @@ -88,14 +88,14 @@ fn dump-cell-at-top-right in-ah: (addr handle cell) { print-cell in-ah, stream, 0/no-trace var d1/eax: int <- copy 0 var d2/ecx: int <- copy 0 - d1, d2 <- draw-stream-wrapping-right-then-down 0/screen, stream, 0/xmin, 0/ymin, 0x80/xmax, 0x30/ymax, 0/x, 0/y, 7/fg, 0/bg + d1, d2 <- draw-stream-wrapping-right-then-down 0/screen, stream, 0/xmin, 0/ymin, 0x80/xmax, 0x30/ymax, 0/x, 0/y, 7/fg, 0xc5/bg=blue-bg } fn dump-cell-from-cursor-over-full-screen in-ah: (addr handle cell) { var stream-storage: (stream byte 0x200) var stream/edx: (addr stream byte) <- address stream-storage print-cell in-ah, stream, 0/no-trace - draw-stream-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, stream, 7/fg, 0/bg + draw-stream-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, stream, 7/fg, 0xc5/bg=blue-bg } fn print-symbol _in: (addr cell), out: (addr stream byte), trace: (addr trace) { diff --git a/shell/sandbox.mu b/shell/sandbox.mu index a699e8bd..c28270ee 100644 --- a/shell/sandbox.mu +++ b/shell/sandbox.mu @@ -79,7 +79,7 @@ fn write-sandbox out: (addr stream byte), _self: (addr sandbox) { ## fn render-sandbox screen: (addr screen), _self: (addr sandbox), xmin: int, ymin: int, xmax: int, ymax: int { - clear-rect screen, xmin, ymin, xmax, ymax, 0/bg=black + clear-rect screen, xmin, ymin, xmax, ymax, 0xc5/bg=blue-bg=black add-to xmin, 1/padding-left subtract-from xmax, 1/padding-right var self/esi: (addr sandbox) <- copy _self @@ -92,7 +92,7 @@ fn render-sandbox screen: (addr screen), _self: (addr sandbox), xmin: int, ymin: y <- maybe-render-empty-screen screen, self, xmin, y y <- maybe-render-keyboard screen, self, xmin, y var cursor-in-sandbox?/ebx: (addr boolean) <- get self, cursor-in-data? - x, y <- render-gap-buffer-wrapping-right-then-down screen, data, x, y, xmax, ymax, *cursor-in-sandbox?, 7/fg, 0/bg + x, y <- render-gap-buffer-wrapping-right-then-down screen, data, x, y, xmax, ymax, *cursor-in-sandbox?, 7/fg, 0xc5/bg=blue-bg y <- increment # trace var trace-ah/eax: (addr handle trace) <- get self, trace @@ -110,9 +110,9 @@ fn render-sandbox screen: (addr screen), _self: (addr sandbox), xmin: int, ymin: compare done?, 0/false break-if-!= var x/eax: int <- copy 0 - x, y <- draw-text-wrapping-right-then-down screen, "=> ", xmin, y, xmax, ymax, xmin, y, 7/fg, 0/bg + x, y <- draw-text-wrapping-right-then-down screen, "=> ", xmin, y, xmax, ymax, xmin, y, 7/fg, 0xc5/bg=blue-bg var x2/edx: int <- copy x - var dummy/eax: int <- draw-stream-rightward screen, value, x2, xmax, y, 7/fg=grey, 0/bg + var dummy/eax: int <- draw-stream-rightward screen, value, x2, xmax, y, 7/fg=grey, 0xc5/bg=blue-bg } y <- add 2 # padding y <- maybe-render-screen screen, self, xmin, y @@ -151,9 +151,9 @@ fn clear-sandbox-output screen: (addr screen), _self: (addr sandbox), xmin: int, y <- maybe-render-empty-screen screen, self, xmin, y y <- maybe-render-keyboard screen, self, xmin, y var cursor-in-sandbox?/ebx: (addr boolean) <- get self, cursor-in-data? - x, y <- render-gap-buffer-wrapping-right-then-down screen, data, x, y, xmax, ymax, *cursor-in-sandbox?, 3/fg, 0/bg + x, y <- render-gap-buffer-wrapping-right-then-down screen, data, x, y, xmax, ymax, *cursor-in-sandbox?, 3/fg, 0xc5/bg=blue-bg y <- increment - clear-rect screen, xmin, y, xmax, ymax, 0/bg=black + clear-rect screen, xmin, y, xmax, ymax, 0xc5/bg=blue-bg=black } fn maybe-render-empty-screen screen: (addr screen), _self: (addr sandbox), xmin: int, ymin: int -> _/ecx: int { @@ -175,7 +175,7 @@ fn maybe-render-empty-screen screen: (addr screen), _self: (addr sandbox), xmin: var screen-obj-ah/eax: (addr handle screen) <- get screen-obj-cell, screen-data var _screen-obj/eax: (addr screen) <- lookup *screen-obj-ah var screen-obj/edx: (addr screen) <- copy _screen-obj - var x/eax: int <- draw-text-rightward screen, "screen: ", xmin, 0x99/xmax, y, 7/fg, 0/bg + var x/eax: int <- draw-text-rightward screen, "screen: ", xmin, 0x99/xmax, y, 7/fg, 0xc5/bg=blue-bg y <- render-empty-screen screen, screen-obj, x, y return y } @@ -204,7 +204,7 @@ fn maybe-render-screen screen: (addr screen), _self: (addr sandbox), xmin: int, break-if-= return ymin } - var x/eax: int <- draw-text-rightward screen, "screen: ", xmin, 0x99/xmax, ymin, 7/fg, 0/bg + var x/eax: int <- draw-text-rightward screen, "screen: ", xmin, 0x99/xmax, ymin, 7/fg, 0xc5/bg=blue-bg var y/ecx: int <- copy ymin y <- render-screen screen, screen-obj, x, y return y @@ -223,7 +223,7 @@ fn render-empty-screen screen: (addr screen), _target-screen: (addr screen), xmi { compare x, limit break-if->= - draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0x12/bg=almost-black + draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0xdc/bg=green-bg move-cursor-right screen x <- increment loop @@ -237,19 +237,19 @@ fn render-empty-screen screen: (addr screen), _target-screen: (addr screen), xmi compare y, *height break-if->= set-cursor-position screen, xmin, screen-y - draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0x12/bg=almost-black + draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0xdc/bg=green-bg move-cursor-right screen var width/edx: (addr int) <- get target-screen, width var x/ebx: int <- copy 0 { compare x, *width break-if->= - draw-code-point-at-cursor screen, 0x20/space, 0x18/fg, 0/bg + draw-code-point-at-cursor screen, 0x20/space, 0x18/fg, 0xc5/bg=blue-bg move-cursor-right screen x <- increment loop } - draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0x12/bg=almost-black + draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0xdc/bg=green-bg y <- increment screen-y <- increment loop @@ -264,7 +264,7 @@ fn render-empty-screen screen: (addr screen), _target-screen: (addr screen), xmi { compare x, limit break-if->= - draw-code-point-at-cursor screen, 0x20/space, 0x20/space, 0x12/bg=almost-black + draw-code-point-at-cursor screen, 0x20/space, 0x20/space, 0xdc/bg=green-bg move-cursor-right screen x <- increment loop @@ -287,7 +287,7 @@ fn render-screen screen: (addr screen), _target-screen: (addr screen), xmin: int { compare x, limit break-if->= - draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0x12/bg=almost-black + draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0xdc/bg=green-bg move-cursor-right screen x <- increment loop @@ -302,7 +302,7 @@ fn render-screen screen: (addr screen), _target-screen: (addr screen), xmin: int compare y, *height break-if->= set-cursor-position screen, xmin, screen-y - draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0x12/bg=almost-black + draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0xdc/bg=green-bg move-cursor-right screen var width/edx: (addr int) <- get target-screen, width var x/ebx: int <- copy 0 @@ -314,7 +314,7 @@ fn render-screen screen: (addr screen), _target-screen: (addr screen), xmin: int x <- increment loop } - draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0x12/bg=almost-black + draw-code-point-at-cursor screen, 0x20/space, 0/fg, 0xdc/bg=green-bg y <- increment screen-y <- increment loop @@ -382,7 +382,7 @@ fn render-screen screen: (addr screen), _target-screen: (addr screen), xmin: int { compare x, limit break-if->= - draw-code-point-at-cursor screen, 0x20/space, 0x20/space, 0x12/bg=almost-black + draw-code-point-at-cursor screen, 0x20/space, 0x20/space, 0xdc/bg=green-bg move-cursor-right screen x <- increment loop @@ -436,7 +436,7 @@ fn maybe-render-keyboard screen: (addr screen), _self: (addr sandbox), xmin: int var keyboard-obj-ah/eax: (addr handle gap-buffer) <- get keyboard-obj-cell, keyboard-data var _keyboard-obj/eax: (addr gap-buffer) <- lookup *keyboard-obj-ah var keyboard-obj/edx: (addr gap-buffer) <- copy _keyboard-obj - var x/eax: int <- draw-text-rightward screen, "keyboard: ", xmin, 0x99/xmax, ymin, 7/fg, 0/bg + var x/eax: int <- draw-text-rightward screen, "keyboard: ", xmin, 0x99/xmax, ymin, 7/fg, 0xc5/bg=blue-bg var y/ecx: int <- copy ymin var cursor-in-keyboard?/esi: (addr boolean) <- get self, cursor-in-keyboard? y <- render-keyboard screen, keyboard-obj, x, y, *cursor-in-keyboard? @@ -457,7 +457,7 @@ fn render-keyboard screen: (addr screen), _keyboard: (addr gap-buffer), xmin: in { compare x, width break-if->= - draw-code-point-at-cursor screen, 0x2d/horizontal-bar, 0x18/fg, 0/bg + draw-code-point-at-cursor screen, 0x2d/horizontal-bar, 0x18/fg, 0xc5/bg=blue-bg move-cursor-right screen x <- increment loop @@ -466,13 +466,13 @@ fn render-keyboard screen: (addr screen), _keyboard: (addr gap-buffer), xmin: in } # keyboard var x/eax: int <- copy xmin - draw-code-point screen, 0x7c/vertical-bar, x, y, 0x18/fg, 0/bg + draw-code-point screen, 0x7c/vertical-bar, x, y, 0x18/fg, 0xc5/bg=blue-bg x <- increment - x <- render-gap-buffer screen, keyboard, x, y, render-cursor?, 3/fg, 0/bg + x <- render-gap-buffer screen, keyboard, x, y, render-cursor?, 3/fg, 0xc5/bg=blue-bg x <- copy xmin x <- add 1 # for left bar x <- add 0x10/keyboard-capacity - draw-code-point screen, 0x7c/vertical-bar, x, y, 0x18/fg, 0/bg + draw-code-point screen, 0x7c/vertical-bar, x, y, 0x18/fg, 0xc5/bg=blue-bg y <- increment # bottom border { @@ -482,7 +482,7 @@ fn render-keyboard screen: (addr screen), _keyboard: (addr gap-buffer), xmin: in { compare x, width break-if->= - draw-code-point-at-cursor screen, 0x2d/horizontal-bar, 0x18/fg, 0/bg + draw-code-point-at-cursor screen, 0x2d/horizontal-bar, 0x18/fg, 0xc5/bg=blue-bg move-cursor-right screen x <- increment loop @@ -514,13 +514,13 @@ fn render-sandbox-menu screen: (addr screen), _self: (addr sandbox) { y <- decrement var height/ebx: int <- copy y height <- increment - clear-rect screen, 0/x, y, width, height, 0/bg=black + clear-rect screen, 0/x, y, width, height, 0xc5/bg=blue-bg=black set-cursor-position screen, 0/x, y - draw-text-rightward-from-cursor screen, " ctrl+... ", width, 0xf/fg, 0/bg - draw-text-rightward-from-cursor screen, " r ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " run main ", width, 7/fg, 0/bg - draw-text-rightward-from-cursor screen, " s ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " run sandbox ", width, 7/fg, 0/bg + draw-text-rightward-from-cursor screen, " ctrl+... ", width, 0xf/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " r ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " run main ", width, 7/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " s ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " run sandbox ", width, 7/fg, 0xc5/bg=blue-bg $render-sandbox-menu:render-ctrl-m: { var self/eax: (addr sandbox) <- copy _self var has-trace?/eax: boolean <- has-trace? self @@ -528,20 +528,20 @@ fn render-sandbox-menu screen: (addr screen), _self: (addr sandbox) { { break-if-= draw-text-rightward-from-cursor screen, " m ", width, 0/fg, 9/bg=blue - draw-text-rightward-from-cursor screen, " to trace ", width, 7/fg, 0/bg + draw-text-rightward-from-cursor screen, " to trace ", width, 7/fg, 0xc5/bg=blue-bg break $render-sandbox-menu:render-ctrl-m } draw-text-rightward-from-cursor screen, " m ", width, 0/fg, 0x18/bg=keyboard - draw-text-rightward-from-cursor screen, " to keyboard ", width, 7/fg, 0/bg + draw-text-rightward-from-cursor screen, " to keyboard ", width, 7/fg, 0xc5/bg=blue-bg } - draw-text-rightward-from-cursor screen, " a ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " << ", width, 7/fg, 0/bg - draw-text-rightward-from-cursor screen, " b ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " <word ", width, 7/fg, 0/bg - draw-text-rightward-from-cursor screen, " f ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " word> ", width, 7/fg, 0/bg - draw-text-rightward-from-cursor screen, " e ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " >> ", width, 7/fg, 0/bg + draw-text-rightward-from-cursor screen, " a ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " << ", width, 7/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " b ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " <word ", width, 7/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " f ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " word> ", width, 7/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " e ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " >> ", width, 7/fg, 0xc5/bg=blue-bg } fn render-keyboard-menu screen: (addr screen) { @@ -552,15 +552,15 @@ fn render-keyboard-menu screen: (addr screen) { y <- decrement var height/edx: int <- copy y height <- increment - clear-rect screen, 0/x, y, width, height, 0/bg=black + clear-rect screen, 0/x, y, width, height, 0xc5/bg=blue-bg=black set-cursor-position screen, 0/x, y - draw-text-rightward-from-cursor screen, " ctrl+... ", width, 0xf/fg, 0/bg - draw-text-rightward-from-cursor screen, " r ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " run main ", width, 7/fg, 0/bg - draw-text-rightward-from-cursor screen, " s ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " run sandbox ", width, 7/fg, 0/bg + draw-text-rightward-from-cursor screen, " ctrl+... ", width, 0xf/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " r ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " run main ", width, 7/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " s ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " run sandbox ", width, 7/fg, 0xc5/bg=blue-bg draw-text-rightward-from-cursor screen, " m ", width, 0/fg, 3/bg=cyan - draw-text-rightward-from-cursor screen, " to sandbox ", width, 7/fg, 0/bg + draw-text-rightward-from-cursor screen, " to sandbox ", width, 7/fg, 0xc5/bg=blue-bg } fn edit-sandbox _self: (addr sandbox), key: byte, globals: (addr global-table), data-disk: (addr disk), real-screen: (addr screen), tweak-real-screen?: boolean { @@ -720,9 +720,9 @@ fn run _in-ah: (addr handle gap-buffer), out: (addr stream byte), globals: (addr allocate-pair nil-ah var eval-result-storage: (handle cell) var eval-result/edi: (addr handle cell) <- address eval-result-storage - debug-print "^", 4/fg, 0/bg + debug-print "^", 4/fg, 0xc5/bg=blue-bg evaluate read-result-ah, eval-result, *nil-ah, globals, trace, screen-cell, keyboard-cell, 1/call-number - debug-print "$", 4/fg, 0/bg + debug-print "$", 4/fg, 0xc5/bg=blue-bg var error?/eax: boolean <- has-errors? trace { compare error?, 0/false @@ -749,9 +749,9 @@ fn read-evaluate-and-move-to-globals _in-ah: (addr handle gap-buffer), globals: allocate-pair nil-ah var eval-result-storage: (handle cell) var eval-result/edi: (addr handle cell) <- address eval-result-storage - debug-print "^", 4/fg, 0/bg + debug-print "^", 4/fg, 0xc5/bg=blue-bg evaluate read-result-ah, eval-result, *nil-ah, globals, 0/no-trace, 0/no-screen-cell, 0/no-keyboard-cell, 1/call-number - debug-print "$", 4/fg, 0/bg + debug-print "$", 4/fg, 0xc5/bg=blue-bg move-gap-buffer-to-global globals, read-result-ah, _in-ah } diff --git a/shell/trace.mu b/shell/trace.mu index 24a87bba..cfa6b97f 100644 --- a/shell/trace.mu +++ b/shell/trace.mu @@ -302,7 +302,7 @@ fn dump-trace _self: (addr trace) { var curr/ebx: (addr trace-line) <- index trace, offset var curr-label-ah/eax: (addr handle array byte) <- get curr, label var curr-label/eax: (addr array byte) <- lookup *curr-label-ah - y <- render-trace-line 0/screen, curr, 0, y, 0x80/width, 0x30/height, 7/fg, 0/bg + y <- render-trace-line 0/screen, curr, 0, y, 0x80/width, 0x30/height, 7/fg, 0xc5/bg=blue-bg } i <- increment loop @@ -685,20 +685,20 @@ fn render-trace-menu screen: (addr screen) { var y/ecx: int <- copy height y <- decrement set-cursor-position screen, 0/x, y - draw-text-rightward-from-cursor screen, " ctrl-r ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " run main ", width, 7/fg, 0/bg - draw-text-rightward-from-cursor screen, " ctrl-s ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " run sandbox ", width, 7/fg, 0/bg + draw-text-rightward-from-cursor screen, " ctrl-r ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " run main ", width, 7/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " ctrl-s ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " run sandbox ", width, 7/fg, 0xc5/bg=blue-bg draw-text-rightward-from-cursor screen, " ctrl-m ", width, 0/fg, 0x18/bg=keyboard - draw-text-rightward-from-cursor screen, " to keyboard ", width, 7/fg, 0/bg - draw-text-rightward-from-cursor screen, " j ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " down ", width, 7/fg, 0/bg - draw-text-rightward-from-cursor screen, " k ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " up ", width, 7/fg, 0/bg - draw-text-rightward-from-cursor screen, " enter ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " expand ", width, 7/fg, 0/bg - draw-text-rightward-from-cursor screen, " backspace ", width, 0/fg, 7/bg=grey - draw-text-rightward-from-cursor screen, " collapse ", width, 7/fg, 0/bg + draw-text-rightward-from-cursor screen, " to keyboard ", width, 7/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " j ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " down ", width, 7/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " k ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " up ", width, 7/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " enter ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " expand ", width, 7/fg, 0xc5/bg=blue-bg + draw-text-rightward-from-cursor screen, " backspace ", width, 0/fg, 0x5c/bg=black + draw-text-rightward-from-cursor screen, " collapse ", width, 7/fg, 0xc5/bg=blue-bg } fn edit-trace _self: (addr trace), key: grapheme { |