about summary refs log tree commit diff stats
path: root/baremetal/ex6.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-02-07 00:17:17 -0800
committerKartik Agaram <vc@akkartik.com>2021-02-07 00:20:29 -0800
commit74f1512ff113cf35706af57e9d40c78b7d77f49e (patch)
tree7c7acb23e1a26387117e464ec6ab01126dbc8ae8 /baremetal/ex6.mu
parent6c4c25555c7df0d78ad41c813345f63cae1819de (diff)
downloadmu-74f1512ff113cf35706af57e9d40c78b7d77f49e.tar.gz
7690
Convert comments about magic constants into metadata.
Diffstat (limited to 'baremetal/ex6.mu')
-rw-r--r--baremetal/ex6.mu20
1 files changed, 10 insertions, 10 deletions
diff --git a/baremetal/ex6.mu b/baremetal/ex6.mu
index 304867f6..d209e3f6 100644
--- a/baremetal/ex6.mu
+++ b/baremetal/ex6.mu
@@ -14,19 +14,19 @@ fn main {
   draw-box-on-real-screen 0xf, 0x1f, 0x79, 0x51, 0x4
   var x/eax: int <- copy 0x20
   var y/ecx: int <- copy 0x20
-  x, y <- draw-text-wrapping-right-then-down 0, "hello ",     0x10, 0x20, 0x78, 0x50, x, y, 0xa  # (0x10, 0x20) -> (0x78, 0x50)
-  x, y <- draw-text-wrapping-right-then-down 0, "from ",      0x10, 0x20, 0x78, 0x50, x, y, 0xa
-  x, y <- draw-text-wrapping-right-then-down 0, "baremetal ", 0x10, 0x20, 0x78, 0x50, x, y, 0xa
-  x, y <- draw-text-wrapping-right-then-down 0, "Mu!",        0x10, 0x20, 0x78, 0x50, x, y, 0xa
+  x, y <- draw-text-wrapping-right-then-down 0/screen, "hello ",     0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/color
+  x, y <- draw-text-wrapping-right-then-down 0/screen, "from ",      0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/color
+  x, y <- draw-text-wrapping-right-then-down 0/screen, "baremetal ", 0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/color
+  x, y <- draw-text-wrapping-right-then-down 0/screen, "Mu!",        0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/color
 
   # drawing at the cursor in multiple directions
-  draw-text-wrapping-down-then-right-from-cursor-over-full-screen 0, "abc", 0xa
-  draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "def", 0xa
+  draw-text-wrapping-down-then-right-from-cursor-over-full-screen 0/screen, "abc", 0xa
+  draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "def", 0xa
 
   # test drawing near the edge
-  x <- draw-text-rightward 0, "R", 0x3f8, 0x400, 0x100, 0xa  # 0x400 = screen-width
-  draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "wrapped from R", 0xa
+  x <- draw-text-rightward 0/screen, "R", 0x3f8/x, 0x400/xmax=screen-width, 0x100/y, 0xa/color
+  draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "wrapped from R", 0xa
 
-  x <- draw-text-downward 0, "D", 0x100, 0x2f0, 0x300, 0xa  # 0x300 = screen-height
-  draw-text-wrapping-down-then-right-from-cursor-over-full-screen 0, "wrapped from D", 0xa
+  x <- draw-text-downward 0/screen, "D", 0x100/x, 0x2f0/y, 0x300/ymax=screen-height, 0xa/color
+  draw-text-wrapping-down-then-right-from-cursor-over-full-screen 0/screen, "wrapped from D", 0xa
 }