about summary refs log tree commit diff stats
path: root/prototypes/browse
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-06-29 19:21:43 -0700
committerKartik Agaram <vc@akkartik.com>2020-06-29 19:21:43 -0700
commit8bd3c2b5a83d9e8b97472311491010d66a7b7584 (patch)
tree02354322b48589ec70da06211433aa36c50d758b /prototypes/browse
parent6c7f7abdb867084f1e7555105cfa140eae4f6372 (diff)
downloadmu-8bd3c2b5a83d9e8b97472311491010d66a7b7584.tar.gz
6601
Diffstat (limited to 'prototypes/browse')
-rw-r--r--prototypes/browse/10.mu14
-rw-r--r--prototypes/browse/11.mu18
-rw-r--r--prototypes/browse/12.mu18
-rw-r--r--prototypes/browse/13.mu18
-rw-r--r--prototypes/browse/14.mu18
-rw-r--r--prototypes/browse/15-headers-broken.mu22
-rw-r--r--prototypes/browse/16-screen-state-broken.mu4
-rw-r--r--prototypes/browse/17-file-state-broken/main.mu4
-rw-r--r--prototypes/browse/19/screen-position-state.mu2
-rw-r--r--prototypes/browse/20/screen-position-state.mu2
-rw-r--r--prototypes/browse/21/screen-position-state.mu2
-rw-r--r--prototypes/browse/22/screen-position-state.mu2
-rw-r--r--prototypes/browse/23-multiple-pages/screen-position-state.mu2
-rw-r--r--prototypes/browse/24-bold/main.mu14
-rw-r--r--prototypes/browse/24-bold/screen-position-state.mu2
-rw-r--r--prototypes/browse/25-soft-newlines/main.mu14
-rw-r--r--prototypes/browse/25-soft-newlines/screen-position-state.mu2
-rw-r--r--prototypes/browse/26-headers/main.mu26
-rw-r--r--prototypes/browse/26-headers/screen-position-state.mu2
-rw-r--r--prototypes/browse/27/main.mu26
-rw-r--r--prototypes/browse/27/screen-position-state.mu2
-rw-r--r--prototypes/browse/28/main.mu26
-rw-r--r--prototypes/browse/28/screen-position-state.mu2
-rw-r--r--prototypes/browse/29/main.mu26
-rw-r--r--prototypes/browse/29/screen-position-state.mu2
-rw-r--r--prototypes/browse/4-render-page.mu4
-rw-r--r--prototypes/browse/5.mu4
-rw-r--r--prototypes/browse/6.mu4
-rw-r--r--prototypes/browse/7.mu4
-rw-r--r--prototypes/browse/8-multiple-pages.mu4
-rw-r--r--prototypes/browse/9-bold.mu10
31 files changed, 150 insertions, 150 deletions
diff --git a/prototypes/browse/10.mu b/prototypes/browse/10.mu
index 5c760de4..cd0f748b 100644
--- a/prototypes/browse/10.mu
+++ b/prototypes/browse/10.mu
@@ -44,7 +44,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int {
   var leftcol/edx: int <- copy 5  # page-margin
   var rightcol/ebx: int <- copy leftcol
   rightcol <- add 0x40  # page-width = 64 characters
-  start-color 0xec, 7  # 236 = darkish gray
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
   {
     compare rightcol, ncols
     break-if->=
@@ -64,7 +64,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
@@ -95,7 +95,7 @@ $check-state: {
       {
         break-if-!=
         # r->current-state == 0 && c == '*' => bold text
-        start-bold
+        start-bold-on-screen
         copy-to *state, 1
         break $check-state
       }
@@ -103,7 +103,7 @@ $check-state: {
       {
         break-if-!=
         # r->current-state == 0 && c == '_' => bold text
-        start-bold
+        start-bold-on-screen
         copy-to *state, 1
         break $check-state
       }
@@ -115,7 +115,7 @@ $check-state: {
       {
         break-if-!=
         # r->current-state == 1 && c == '*' => normal text
-        reset-formatting
+        reset-formatting-on-screen
         copy-to *state, 0
         break $check-state
       }
@@ -123,7 +123,7 @@ $check-state: {
       {
         break-if-!=
         # r->current-state == 1 && c == '_' => normal text
-        reset-formatting
+        reset-formatting-on-screen
         copy-to *state, 0
         break $check-state
       }
@@ -138,7 +138,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
diff --git a/prototypes/browse/11.mu b/prototypes/browse/11.mu
index ab7585b0..b4fa36ce 100644
--- a/prototypes/browse/11.mu
+++ b/prototypes/browse/11.mu
@@ -42,7 +42,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int {
   var leftcol/edx: int <- copy 5  # page-margin
   var rightcol/ebx: int <- copy leftcol
   rightcol <- add 0x40  # page-width = 64 characters
-  start-color 0xec, 7  # 236 = darkish gray
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
   {
     compare rightcol, ncols
     break-if->=
@@ -64,7 +64,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
 $char-loop: {
       compare col, rightcol
       break-if->=
@@ -79,7 +79,7 @@ $update-attributes:check-state: {
           {
             break-if-!=
             # r->current-state == 0 && c == '*' => bold text
-            start-bold
+            start-bold-on-screen
             copy-to *state, 1
             break $update-attributes:check-state
           }
@@ -87,7 +87,7 @@ $update-attributes:check-state: {
           {
             break-if-!=
             # r->current-state == 0 && c == '_' => bold text
-            start-bold
+            start-bold-on-screen
             copy-to *state, 1
             break $update-attributes:check-state
           }
@@ -99,8 +99,8 @@ $update-attributes:check-state: {
           {
             break-if-!=
             # r->current-state == 1 && c == '*' => normal text
-            reset-formatting
-            start-color 0xec, 7  # 236 = darkish gray
+            reset-formatting-on-screen
+            start-color-on-screen 0xec, 7  # 236 = darkish gray
             copy-to *state, 0
             break $update-attributes:check-state
           }
@@ -108,8 +108,8 @@ $update-attributes:check-state: {
           {
             break-if-!=
             # r->current-state == 1 && c == '_' => normal text
-            reset-formatting
-            start-color 0xec, 7  # 236 = darkish gray
+            reset-formatting-on-screen
+            start-color-on-screen 0xec, 7  # 236 = darkish gray
             copy-to *state, 0
             break $update-attributes:check-state
           }
@@ -134,7 +134,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
diff --git a/prototypes/browse/12.mu b/prototypes/browse/12.mu
index 60d169c8..a8ba3f99 100644
--- a/prototypes/browse/12.mu
+++ b/prototypes/browse/12.mu
@@ -41,7 +41,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int {
   var leftcol/edx: int <- copy 5  # page-margin
   var rightcol/ebx: int <- copy leftcol
   rightcol <- add 0x40  # page-width = 64 characters
-  start-color 0xec, 7  # 236 = darkish gray
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
   {
     compare rightcol, ncols
     break-if->=
@@ -63,7 +63,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
 $char-loop: {
       compare col, rightcol
       break-if->=
@@ -78,7 +78,7 @@ $update-attributes:check-state: {
           {
             break-if-!=
             # r->current-state == 0 && c == '*' => bold text
-            start-bold
+            start-bold-on-screen
             copy-to *state, 1
             break $update-attributes:check-state
           }
@@ -86,7 +86,7 @@ $update-attributes:check-state: {
           {
             break-if-!=
             # r->current-state == 0 && c == '_' => bold text
-            start-bold
+            start-bold-on-screen
             copy-to *state, 1
             break $update-attributes:check-state
           }
@@ -100,8 +100,8 @@ $update-attributes:check-state: {
             # r->current-state == 1 && c == '*' => print c, then normal text
             print-byte-to-screen c
             col <- increment
-            reset-formatting
-            start-color 0xec, 7  # 236 = darkish gray
+            reset-formatting-on-screen
+            start-color-on-screen 0xec, 7  # 236 = darkish gray
             copy-to *state, 0
             loop $char-loop
           }
@@ -111,8 +111,8 @@ $update-attributes:check-state: {
             # r->current-state == 1 && c == '_' => print c, then normal text
             print-byte-to-screen c
             col <- increment
-            reset-formatting
-            start-color 0xec, 7  # 236 = darkish gray
+            reset-formatting-on-screen
+            start-color-on-screen 0xec, 7  # 236 = darkish gray
             copy-to *state, 0
             loop $char-loop
           }
@@ -137,7 +137,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
diff --git a/prototypes/browse/13.mu b/prototypes/browse/13.mu
index a4d2801e..48e9c112 100644
--- a/prototypes/browse/13.mu
+++ b/prototypes/browse/13.mu
@@ -41,7 +41,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int {
   var leftcol/edx: int <- copy 5  # page-margin
   var rightcol/ebx: int <- copy leftcol
   rightcol <- add 0x40  # page-width = 64 characters
-  start-color 0xec, 7  # 236 = darkish gray
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
   {
     compare rightcol, ncols
     break-if->=
@@ -63,7 +63,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
 $char-loop: {
       compare col, rightcol
       break-if->=
@@ -78,7 +78,7 @@ $update-attributes:check-state: {
           {
             break-if-!=
             # r->current-state == 0 && c == '*' => bold text
-            start-bold
+            start-bold-on-screen
             copy-to *state, 1
             break $update-attributes:check-state
           }
@@ -86,7 +86,7 @@ $update-attributes:check-state: {
           {
             break-if-!=
             # r->current-state == 0 && c == '_' => bold text
-            start-bold
+            start-bold-on-screen
             copy-to *state, 1
             break $update-attributes:check-state
           }
@@ -101,8 +101,8 @@ $update-attributes:check-state: {
             # r->current-state == 1 && c == '*' => print c, then normal text
             print-byte-to-screen c
             col <- increment
-            reset-formatting
-            start-color 0xec, 7  # 236 = darkish gray
+            reset-formatting-on-screen
+            start-color-on-screen 0xec, 7  # 236 = darkish gray
             copy-to *state, 0
             loop $char-loop
           }
@@ -112,8 +112,8 @@ $update-attributes:check-state: {
             # r->current-state == 1 && c == '_' => print c, then normal text
             print-byte-to-screen c
             col <- increment
-            reset-formatting
-            start-color 0xec, 7  # 236 = darkish gray
+            reset-formatting-on-screen
+            start-color-on-screen 0xec, 7  # 236 = darkish gray
             copy-to *state, 0
             loop $char-loop
           }
@@ -138,7 +138,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
diff --git a/prototypes/browse/14.mu b/prototypes/browse/14.mu
index cb76d673..9bcc3751 100644
--- a/prototypes/browse/14.mu
+++ b/prototypes/browse/14.mu
@@ -39,7 +39,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int {
   var leftcol/edx: int <- copy 5  # page-margin
   var rightcol/ebx: int <- copy leftcol
   rightcol <- add 0x40  # page-width = 64 characters
-  start-color 0xec, 7  # 236 = darkish gray
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
   {
     compare rightcol, ncols
     break-if->=
@@ -61,7 +61,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
 $char-loop: {
       compare col, rightcol
       break-if->=
@@ -76,7 +76,7 @@ $change-state: {
           {
             break-if-!=
             # r->current-state == 0 && c == '*' => bold text
-            start-bold
+            start-bold-on-screen
             copy-to *state, 1
             break $change-state
           }
@@ -84,7 +84,7 @@ $change-state: {
           {
             break-if-!=
             # r->current-state == 0 && c == '_' => bold text
-            start-bold
+            start-bold-on-screen
             copy-to *state, 1
             break $change-state
           }
@@ -99,8 +99,8 @@ $change-state: {
             # r->current-state == 1 && c == '*' => print c, then normal text
             print-byte-to-screen c
             col <- increment
-            reset-formatting
-            start-color 0xec, 7  # 236 = darkish gray
+            reset-formatting-on-screen
+            start-color-on-screen 0xec, 7  # 236 = darkish gray
             copy-to *state, 0
             loop $char-loop
           }
@@ -110,8 +110,8 @@ $change-state: {
             # r->current-state == 1 && c == '_' => print c, then normal text
             print-byte-to-screen c
             col <- increment
-            reset-formatting
-            start-color 0xec, 7  # 236 = darkish gray
+            reset-formatting-on-screen
+            start-color-on-screen 0xec, 7  # 236 = darkish gray
             copy-to *state, 0
             loop $char-loop
           }
@@ -136,7 +136,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
diff --git a/prototypes/browse/15-headers-broken.mu b/prototypes/browse/15-headers-broken.mu
index 65fbda44..59566e56 100644
--- a/prototypes/browse/15-headers-broken.mu
+++ b/prototypes/browse/15-headers-broken.mu
@@ -49,7 +49,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int {
   var leftcol/edx: int <- copy 5  # page-margin
   var rightcol/ebx: int <- copy leftcol
   rightcol <- add 0x40  # page-width = 64 characters
-  start-color 0xec, 7  # 236 = darkish gray
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
   {
     compare rightcol, ncols
     break-if->=
@@ -71,7 +71,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
 $char-loop: {
       compare col, rightcol
       break-if->=
@@ -86,7 +86,7 @@ $change-state: {
           {
             break-if-!=
             # r->current-state == 0 && c == '*' => bold text
-            start-bold
+            start-bold-on-screen
             copy-to *state, 1
             break $change-state
           }
@@ -94,7 +94,7 @@ $change-state: {
           {
             break-if-!=
             # r->current-state == 0 && c == '_' => bold text
-            start-bold
+            start-bold-on-screen
             copy-to *state, 1
             break $change-state
           }
@@ -123,8 +123,8 @@ $change-state: {
             # r->current-state == 1 && c == '*' => print c, then normal text
             print-byte-to-screen c
             col <- increment
-            reset-formatting
-            start-color 0xec, 7  # 236 = darkish gray
+            reset-formatting-on-screen
+            start-color-on-screen 0xec, 7  # 236 = darkish gray
             copy-to *state, 0
             loop $char-loop
           }
@@ -134,8 +134,8 @@ $change-state: {
             # r->current-state == 1 && c == '_' => print c, then normal text
             print-byte-to-screen c
             col <- increment
-            reset-formatting
-            start-color 0xec, 7  # 236 = darkish gray
+            reset-formatting-on-screen
+            start-color-on-screen 0xec, 7  # 236 = darkish gray
             copy-to *state, 0
             loop $char-loop
           }
@@ -150,8 +150,8 @@ $change-state: {
         var s/eax: (addr boolean) <- get r, start-of-line?
         copy-to *s, 1  # true
         # switch to normal text
-        reset-formatting
-        start-color 0xec, 7  # 236 = darkish gray
+        reset-formatting-on-screen
+        start-color-on-screen 0xec, 7  # 236 = darkish gray
         # no need to print newlines
         break $char-loop
       }
@@ -178,7 +178,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
diff --git a/prototypes/browse/16-screen-state-broken.mu b/prototypes/browse/16-screen-state-broken.mu
index 089887e7..d0817bdf 100644
--- a/prototypes/browse/16-screen-state-broken.mu
+++ b/prototypes/browse/16-screen-state-broken.mu
@@ -68,8 +68,8 @@ fn render-normal in: (addr buffered-file), state: (addr screen-position-state) {
     # if (c == EOF) break
     compare c, 0xffffffff  # EOF marker
     break-if-=
-    # if (c == '*') start-bold, render-until-asterisk(in, state), reset
-    # else if (c == '_') start-bold, render-until-underscore(in, state), reset
+    # if (c == '*') start-bold-on-screen, render-until-asterisk(in, state), reset
+    # else if (c == '_') start-bold-on-screen, render-until-underscore(in, state), reset
     # else if (c == '#') compute-color, start color, render-header-line(in, state), reset
     # else add-char(state, c)
   }
diff --git a/prototypes/browse/17-file-state-broken/main.mu b/prototypes/browse/17-file-state-broken/main.mu
index fc22d9ea..44eccc2e 100644
--- a/prototypes/browse/17-file-state-broken/main.mu
+++ b/prototypes/browse/17-file-state-broken/main.mu
@@ -44,8 +44,8 @@ fn render-normal fs: (addr file-state), state: (addr screen-position-state) {
     # if (c == EOF) break
     compare c, 0xffffffff  # EOF marker
     break-if-=
-    # if (c == '*') start-bold, render-until-asterisk(fs, state), reset
-    # else if (c == '_') start-bold, render-until-underscore(fs, state), reset
+    # if (c == '*') start-bold-on-screen, render-until-asterisk(fs, state), reset
+    # else if (c == '_') start-bold-on-screen, render-until-underscore(fs, state), reset
     # else if (c == '#' and fs is at start of line) compute-color, start color, render-header-line(fs, state), reset
     # else add-char(state, c)
   }
diff --git a/prototypes/browse/19/screen-position-state.mu b/prototypes/browse/19/screen-position-state.mu
index bd11b551..99d51a4a 100644
--- a/prototypes/browse/19/screen-position-state.mu
+++ b/prototypes/browse/19/screen-position-state.mu
@@ -131,5 +131,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor *r *c
+  move-cursor-on-screen *r *c
 }
diff --git a/prototypes/browse/20/screen-position-state.mu b/prototypes/browse/20/screen-position-state.mu
index a85bc4a5..187b81b6 100644
--- a/prototypes/browse/20/screen-position-state.mu
+++ b/prototypes/browse/20/screen-position-state.mu
@@ -140,5 +140,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor *r *c
+  move-cursor-on-screen *r *c
 }
diff --git a/prototypes/browse/21/screen-position-state.mu b/prototypes/browse/21/screen-position-state.mu
index 2a4b4327..841b70d8 100644
--- a/prototypes/browse/21/screen-position-state.mu
+++ b/prototypes/browse/21/screen-position-state.mu
@@ -139,5 +139,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor *r *c
+  move-cursor-on-screen *r *c
 }
diff --git a/prototypes/browse/22/screen-position-state.mu b/prototypes/browse/22/screen-position-state.mu
index 8c72168d..2201e019 100644
--- a/prototypes/browse/22/screen-position-state.mu
+++ b/prototypes/browse/22/screen-position-state.mu
@@ -159,5 +159,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor *r *c
+  move-cursor-on-screen *r *c
 }
diff --git a/prototypes/browse/23-multiple-pages/screen-position-state.mu b/prototypes/browse/23-multiple-pages/screen-position-state.mu
index 41ad877d..a8faf9fd 100644
--- a/prototypes/browse/23-multiple-pages/screen-position-state.mu
+++ b/prototypes/browse/23-multiple-pages/screen-position-state.mu
@@ -160,5 +160,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor *r *c
+  move-cursor-on-screen *r *c
 }
diff --git a/prototypes/browse/24-bold/main.mu b/prototypes/browse/24-bold/main.mu
index 8dfc2b9d..2362e695 100644
--- a/prototypes/browse/24-bold/main.mu
+++ b/prototypes/browse/24-bold/main.mu
@@ -43,7 +43,7 @@ $render-normal:body: {
     compare c, 0x2a  # '*'
     {
       break-if-!=
-      start-bold
+      start-bold-on-screen
         render-until-asterisk fs, state
       normal-text
       loop $render-normal:body
@@ -52,11 +52,11 @@ $render-normal:body: {
     compare c, 0x5f  # '_'
     {
       break-if-!=
-      start-color 0xec, 7  # 236 = darkish gray
-      start-bold
+      start-color-on-screen 0xec, 7  # 236 = darkish gray
+      start-bold-on-screen
         render-until-underscore fs, state
-      reset-formatting
-      start-color 0xec, 7  # 236 = darkish gray
+      reset-formatting-on-screen
+      start-color-on-screen 0xec, 7  # 236 = darkish gray
       loop $render-normal:body
     }
     #
@@ -115,6 +115,6 @@ fn first-arg args-on-stack: (addr array (addr array byte)) -> out/eax: (addr arr
 }
 
 fn normal-text {
-  reset-formatting
-  start-color 0xec, 7  # 236 = darkish gray
+  reset-formatting-on-screen
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
 }
diff --git a/prototypes/browse/24-bold/screen-position-state.mu b/prototypes/browse/24-bold/screen-position-state.mu
index 41ad877d..a8faf9fd 100644
--- a/prototypes/browse/24-bold/screen-position-state.mu
+++ b/prototypes/browse/24-bold/screen-position-state.mu
@@ -160,5 +160,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor *r *c
+  move-cursor-on-screen *r *c
 }
diff --git a/prototypes/browse/25-soft-newlines/main.mu b/prototypes/browse/25-soft-newlines/main.mu
index 7db4050c..ef1a898f 100644
--- a/prototypes/browse/25-soft-newlines/main.mu
+++ b/prototypes/browse/25-soft-newlines/main.mu
@@ -87,7 +87,7 @@ $render-normal:flush-buffered-newline: {
     compare c, 0x2a  # '*'
     {
       break-if-!=
-      start-bold
+      start-bold-on-screen
         render-until-asterisk fs, state
       normal-text
       loop $render-normal:loop
@@ -96,11 +96,11 @@ $render-normal:flush-buffered-newline: {
     compare c, 0x5f  # '_'
     {
       break-if-!=
-      start-color 0xec, 7  # 236 = darkish gray
-      start-bold
+      start-color-on-screen 0xec, 7  # 236 = darkish gray
+      start-bold-on-screen
         render-until-underscore fs, state
-      reset-formatting
-      start-color 0xec, 7  # 236 = darkish gray
+      reset-formatting-on-screen
+      start-color-on-screen 0xec, 7  # 236 = darkish gray
       loop $render-normal:loop
     }
     #
@@ -159,6 +159,6 @@ fn first-arg args-on-stack: (addr array (addr array byte)) -> out/eax: (addr arr
 }
 
 fn normal-text {
-  reset-formatting
-  start-color 0xec, 7  # 236 = darkish gray
+  reset-formatting-on-screen
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
 }
diff --git a/prototypes/browse/25-soft-newlines/screen-position-state.mu b/prototypes/browse/25-soft-newlines/screen-position-state.mu
index 51f7e7c8..afaf713e 100644
--- a/prototypes/browse/25-soft-newlines/screen-position-state.mu
+++ b/prototypes/browse/25-soft-newlines/screen-position-state.mu
@@ -167,5 +167,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor *r *c
+  move-cursor-on-screen *r *c
 }
diff --git a/prototypes/browse/26-headers/main.mu b/prototypes/browse/26-headers/main.mu
index 8ce29b8e..68b662bf 100644
--- a/prototypes/browse/26-headers/main.mu
+++ b/prototypes/browse/26-headers/main.mu
@@ -96,7 +96,7 @@ $render-normal:flush-buffered-newline: {
     compare c, 0x2a  # '*'
     {
       break-if-!=
-      start-bold
+      start-bold-on-screen
         render-until-asterisk fs, state
       normal-text
       loop $render-normal:loop
@@ -105,11 +105,11 @@ $render-normal:flush-buffered-newline: {
     compare c, 0x5f  # '_'
     {
       break-if-!=
-      start-color 0xec, 7  # 236 = darkish gray
-      start-bold
+      start-color-on-screen 0xec, 7  # 236 = darkish gray
+      start-bold-on-screen
         render-until-underscore fs, state
-      reset-formatting
-      start-color 0xec, 7  # 236 = darkish gray
+      reset-formatting-on-screen
+      start-color-on-screen 0xec, 7  # 236 = darkish gray
       loop $render-normal:loop
     }
     #
@@ -169,32 +169,32 @@ $render-header-line:body: {
 # colors for a light background, going from bright to dark (meeting up with bold-text)
 fn start-heading header-level: int {
 $start-heading:body: {
-  start-bold
+  start-bold-on-screen
   compare header-level, 1
   {
     break-if-!=
-    start-color 0xa0, 7
+    start-color-on-screen 0xa0, 7
     break $start-heading:body
   }
   compare header-level, 2
   {
     break-if-!=
-    start-color 0x7c, 7
+    start-color-on-screen 0x7c, 7
     break $start-heading:body
   }
   compare header-level, 3
   {
     break-if-!=
-    start-color 0x58, 7
+    start-color-on-screen 0x58, 7
     break $start-heading:body
   }
   compare header-level, 4
   {
     break-if-!=
-    start-color 0x34, 7
+    start-color-on-screen 0x34, 7
     break $start-heading:body
   }
-  start-color 0xe8, 7
+  start-color-on-screen 0xe8, 7
 }
 }
 
@@ -247,6 +247,6 @@ fn first-arg args-on-stack: (addr array (addr array byte)) -> out/eax: (addr arr
 }
 
 fn normal-text {
-  reset-formatting
-  start-color 0xec, 7  # 236 = darkish gray
+  reset-formatting-on-screen
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
 }
diff --git a/prototypes/browse/26-headers/screen-position-state.mu b/prototypes/browse/26-headers/screen-position-state.mu
index 51f7e7c8..afaf713e 100644
--- a/prototypes/browse/26-headers/screen-position-state.mu
+++ b/prototypes/browse/26-headers/screen-position-state.mu
@@ -167,5 +167,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor *r *c
+  move-cursor-on-screen *r *c
 }
diff --git a/prototypes/browse/27/main.mu b/prototypes/browse/27/main.mu
index ea471c8b..8f698454 100644
--- a/prototypes/browse/27/main.mu
+++ b/prototypes/browse/27/main.mu
@@ -103,7 +103,7 @@ $render-normal:flush-buffered-newline: {
     compare c, 0x2a  # '*'
     {
       break-if-!=
-      start-bold
+      start-bold-on-screen
         render-until-asterisk fs, state
       normal-text
       loop $render-normal:loop
@@ -112,11 +112,11 @@ $render-normal:flush-buffered-newline: {
     compare c, 0x5f  # '_'
     {
       break-if-!=
-      start-color 0xec, 7  # 236 = darkish gray
-      start-bold
+      start-color-on-screen 0xec, 7  # 236 = darkish gray
+      start-bold-on-screen
         render-until-underscore fs, state
-      reset-formatting
-      start-color 0xec, 7  # 236 = darkish gray
+      reset-formatting-on-screen
+      start-color-on-screen 0xec, 7  # 236 = darkish gray
       loop $render-normal:loop
     }
     #
@@ -176,32 +176,32 @@ $render-header-line:body: {
 # colors for a light background, going from bright to dark (meeting up with bold-text)
 fn start-heading header-level: int {
 $start-heading:body: {
-  start-bold
+  start-bold-on-screen
   compare header-level, 1
   {
     break-if-!=
-    start-color 0xa0, 7
+    start-color-on-screen 0xa0, 7
     break $start-heading:body
   }
   compare header-level, 2
   {
     break-if-!=
-    start-color 0x7c, 7
+    start-color-on-screen 0x7c, 7
     break $start-heading:body
   }
   compare header-level, 3
   {
     break-if-!=
-    start-color 0x58, 7
+    start-color-on-screen 0x58, 7
     break $start-heading:body
   }
   compare header-level, 4
   {
     break-if-!=
-    start-color 0x34, 7
+    start-color-on-screen 0x34, 7
     break $start-heading:body
   }
-  start-color 0xe8, 7
+  start-color-on-screen 0xe8, 7
 }
 }
 
@@ -254,6 +254,6 @@ fn first-arg args-on-stack: (addr array (addr array byte)) -> out/eax: (addr arr
 }
 
 fn normal-text {
-  reset-formatting
-  start-color 0xec, 7  # 236 = darkish gray
+  reset-formatting-on-screen
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
 }
diff --git a/prototypes/browse/27/screen-position-state.mu b/prototypes/browse/27/screen-position-state.mu
index 51f7e7c8..afaf713e 100644
--- a/prototypes/browse/27/screen-position-state.mu
+++ b/prototypes/browse/27/screen-position-state.mu
@@ -167,5 +167,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor *r *c
+  move-cursor-on-screen *r *c
 }
diff --git a/prototypes/browse/28/main.mu b/prototypes/browse/28/main.mu
index 398890f3..f61e80f9 100644
--- a/prototypes/browse/28/main.mu
+++ b/prototypes/browse/28/main.mu
@@ -104,7 +104,7 @@ $render-normal:flush-buffered-newline: {
       compare c, 0x2a  # '*'
       {
         break-if-!=
-        start-bold
+        start-bold-on-screen
           render-until-asterisk fs, state
         normal-text
         break $render-normal:loop-body
@@ -113,11 +113,11 @@ $render-normal:flush-buffered-newline: {
       compare c, 0x5f  # '_'
       {
         break-if-!=
-        start-color 0xec, 7  # 236 = darkish gray
-        start-bold
+        start-color-on-screen 0xec, 7  # 236 = darkish gray
+        start-bold-on-screen
           render-until-underscore fs, state
-        reset-formatting
-        start-color 0xec, 7  # 236 = darkish gray
+        reset-formatting-on-screen
+        start-color-on-screen 0xec, 7  # 236 = darkish gray
         break $render-normal:loop-body
       }
       #
@@ -178,32 +178,32 @@ $render-header-line:body: {
 # colors for a light background, going from bright to dark (meeting up with bold-text)
 fn start-heading header-level: int {
 $start-heading:body: {
-  start-bold
+  start-bold-on-screen
   compare header-level, 1
   {
     break-if-!=
-    start-color 0xa0, 7
+    start-color-on-screen 0xa0, 7
     break $start-heading:body
   }
   compare header-level, 2
   {
     break-if-!=
-    start-color 0x7c, 7
+    start-color-on-screen 0x7c, 7
     break $start-heading:body
   }
   compare header-level, 3
   {
     break-if-!=
-    start-color 0x58, 7
+    start-color-on-screen 0x58, 7
     break $start-heading:body
   }
   compare header-level, 4
   {
     break-if-!=
-    start-color 0x34, 7
+    start-color-on-screen 0x34, 7
     break $start-heading:body
   }
-  start-color 0xe8, 7
+  start-color-on-screen 0xe8, 7
 }
 }
 
@@ -256,6 +256,6 @@ fn first-arg args-on-stack: (addr array (addr array byte)) -> out/eax: (addr arr
 }
 
 fn normal-text {
-  reset-formatting
-  start-color 0xec, 7  # 236 = darkish gray
+  reset-formatting-on-screen
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
 }
diff --git a/prototypes/browse/28/screen-position-state.mu b/prototypes/browse/28/screen-position-state.mu
index 51f7e7c8..afaf713e 100644
--- a/prototypes/browse/28/screen-position-state.mu
+++ b/prototypes/browse/28/screen-position-state.mu
@@ -167,5 +167,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor *r *c
+  move-cursor-on-screen *r *c
 }
diff --git a/prototypes/browse/29/main.mu b/prototypes/browse/29/main.mu
index 5bbb0586..067e21ff 100644
--- a/prototypes/browse/29/main.mu
+++ b/prototypes/browse/29/main.mu
@@ -113,7 +113,7 @@ $render-normal:whitespace-separated-regions: {
         compare c, 0x2a  # '*'
         {
           break-if-!=
-          start-bold
+          start-bold-on-screen
             render-until-asterisk fs, state
           normal-text
           break $render-normal:loop-body
@@ -122,11 +122,11 @@ $render-normal:whitespace-separated-regions: {
         compare c, 0x5f  # '_'
         {
           break-if-!=
-          start-color 0xec, 7  # 236 = darkish gray
-          start-bold
+          start-color-on-screen 0xec, 7  # 236 = darkish gray
+          start-bold-on-screen
             render-until-underscore fs, state
-          reset-formatting
-          start-color 0xec, 7  # 236 = darkish gray
+          reset-formatting-on-screen
+          start-color-on-screen 0xec, 7  # 236 = darkish gray
           break $render-normal:loop-body
         }
       }
@@ -188,32 +188,32 @@ $render-header-line:body: {
 # colors for a light background, going from bright to dark (meeting up with bold-text)
 fn start-heading header-level: int {
 $start-heading:body: {
-  start-bold
+  start-bold-on-screen
   compare header-level, 1
   {
     break-if-!=
-    start-color 0xa0, 7
+    start-color-on-screen 0xa0, 7
     break $start-heading:body
   }
   compare header-level, 2
   {
     break-if-!=
-    start-color 0x7c, 7
+    start-color-on-screen 0x7c, 7
     break $start-heading:body
   }
   compare header-level, 3
   {
     break-if-!=
-    start-color 0x58, 7
+    start-color-on-screen 0x58, 7
     break $start-heading:body
   }
   compare header-level, 4
   {
     break-if-!=
-    start-color 0x34, 7
+    start-color-on-screen 0x34, 7
     break $start-heading:body
   }
-  start-color 0xe8, 7
+  start-color-on-screen 0xe8, 7
 }
 }
 
@@ -266,6 +266,6 @@ fn first-arg args-on-stack: (addr array (addr array byte)) -> out/eax: (addr arr
 }
 
 fn normal-text {
-  reset-formatting
-  start-color 0xec, 7  # 236 = darkish gray
+  reset-formatting-on-screen
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
 }
diff --git a/prototypes/browse/29/screen-position-state.mu b/prototypes/browse/29/screen-position-state.mu
index 51f7e7c8..afaf713e 100644
--- a/prototypes/browse/29/screen-position-state.mu
+++ b/prototypes/browse/29/screen-position-state.mu
@@ -167,5 +167,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor *r *c
+  move-cursor-on-screen *r *c
 }
diff --git a/prototypes/browse/4-render-page.mu b/prototypes/browse/4-render-page.mu
index 2799acc7..57f6063b 100644
--- a/prototypes/browse/4-render-page.mu
+++ b/prototypes/browse/4-render-page.mu
@@ -21,7 +21,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
@@ -44,7 +44,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
diff --git a/prototypes/browse/5.mu b/prototypes/browse/5.mu
index 67a1498e..118325e0 100644
--- a/prototypes/browse/5.mu
+++ b/prototypes/browse/5.mu
@@ -21,7 +21,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
@@ -46,7 +46,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
diff --git a/prototypes/browse/6.mu b/prototypes/browse/6.mu
index 8acccddb..4e1f33db 100644
--- a/prototypes/browse/6.mu
+++ b/prototypes/browse/6.mu
@@ -32,7 +32,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
@@ -57,7 +57,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
diff --git a/prototypes/browse/7.mu b/prototypes/browse/7.mu
index b4118e29..4012eef5 100644
--- a/prototypes/browse/7.mu
+++ b/prototypes/browse/7.mu
@@ -36,7 +36,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
@@ -61,7 +61,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
diff --git a/prototypes/browse/8-multiple-pages.mu b/prototypes/browse/8-multiple-pages.mu
index 01361738..c6453d48 100644
--- a/prototypes/browse/8-multiple-pages.mu
+++ b/prototypes/browse/8-multiple-pages.mu
@@ -52,7 +52,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
@@ -77,7 +77,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
diff --git a/prototypes/browse/9-bold.mu b/prototypes/browse/9-bold.mu
index e9e6f313..aec805c8 100644
--- a/prototypes/browse/9-bold.mu
+++ b/prototypes/browse/9-bold.mu
@@ -39,7 +39,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int {
   var leftcol/edx: int <- copy 5  # page-margin
   var rightcol/ebx: int <- copy leftcol
   rightcol <- add 0x40  # page-width = 64 characters
-  start-color 0xec, 7  # 236 = darkish gray
+  start-color-on-screen 0xec, 7  # 236 = darkish gray
   {
     compare rightcol, ncols
     break-if->=
@@ -59,7 +59,7 @@ $line-loop: {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=
@@ -90,7 +90,7 @@ $check-state: {
       {
         break-if-!=
         # r->current-state == 0 && c == '*' => bold text
-        start-bold
+        start-bold-on-screen
         copy-to *state, 1
       }
       break $check-state
@@ -101,7 +101,7 @@ $check-state: {
       {
         break-if-!=
         # r->current-state == 1 && c == '*' => normal text
-        reset-formatting
+        reset-formatting-on-screen
         copy-to *state, 0
       }
     }
@@ -114,7 +114,7 @@ fn clear toprow: int, leftcol: int, botrow: int, rightcol: int {
     compare row, botrow
     break-if->=
     var col/edx: int <- copy leftcol
-    move-cursor row, col
+    move-cursor-on-screen row, col
     {
       compare col, rightcol
       break-if->=