diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-03-26 23:05:54 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-03-26 23:07:35 -0700 |
commit | 83c25a03c90e9823be2dc0a7e305b3bb4fab87c8 (patch) | |
tree | 4334e699731906e4e7a685c02e2490a5dfe0b5b4 | |
parent | 1a43d12b15c11c1fb1686369665f48d87f350f37 (diff) | |
download | mu-83c25a03c90e9823be2dc0a7e305b3bb4fab87c8.tar.gz |
fix stale examples
-rw-r--r-- | ex4.mu | 2 | ||||
-rw-r--r-- | ex5.mu | 4 | ||||
-rw-r--r-- | ex6.mu | 20 |
3 files changed, 13 insertions, 13 deletions
diff --git a/ex4.mu b/ex4.mu index eb3fc899..77a89f81 100644 --- a/ex4.mu +++ b/ex4.mu @@ -10,5 +10,5 @@ # Expected output: letter 'A' in green near the top-left corner of screen fn main screen: (addr screen), keyboard: (addr keyboard) { - draw-codepoint screen, 0x41/A, 2/row, 1/col, 0xa/fg, 0/bg + draw-code-point screen, 0x41/A, 2/row, 1/col, 0xa/fg, 0/bg } diff --git a/ex5.mu b/ex5.mu index 287b1148..90bcac2f 100644 --- a/ex5.mu +++ b/ex5.mu @@ -11,6 +11,6 @@ # Expected output: text in green near the top-left corner of screen fn main screen: (addr screen), keyboard: (addr keyboard) { - var dummy/eax: int <- draw-text-rightward screen, "hello from baremetal Mu!", 0x10/x, 0x400/xmax, 0x10/y, 0xa/color - dummy <- draw-text-rightward screen, "you shouldn't see this", 0x10/x, 0xa0/xmax, 0x30/y, 0x3/color # xmax is too narrow + var dummy/eax: int <- draw-text-rightward screen, "hello from baremetal Mu!", 0x10/x, 0x400/xmax, 0x10/y, 0xa/fg, 0/bg + dummy <- draw-text-rightward screen, "you shouldn't see this", 0x10/x, 0xa0/xmax, 0x30/y, 3/fg, 0/bg # xmax is too narrow } diff --git a/ex6.mu b/ex6.mu index 65a5da7a..64607678 100644 --- a/ex6.mu +++ b/ex6.mu @@ -14,19 +14,19 @@ fn main screen: (addr screen), keyboard: (addr keyboard) { 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 screen, "hello ", 0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/color - x, y <- draw-text-wrapping-right-then-down screen, "from ", 0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/color - x, y <- draw-text-wrapping-right-then-down screen, "baremetal ", 0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/color - x, y <- draw-text-wrapping-right-then-down screen, "Mu!", 0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/color + x, y <- draw-text-wrapping-right-then-down screen, "hello ", 0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/fg, 0/bg + x, y <- draw-text-wrapping-right-then-down screen, "from ", 0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/fg, 0/bg + x, y <- draw-text-wrapping-right-then-down screen, "baremetal ", 0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/fg, 0/bg + x, y <- draw-text-wrapping-right-then-down screen, "Mu!", 0x10/xmin, 0x20/ymin, 0x78/xmax, 0x50/ymax, x, y, 0xa/fg, 0/bg # drawing at the cursor in multiple directions - draw-text-wrapping-down-then-right-from-cursor-over-full-screen screen, "abc", 0xa - draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, "def", 0xa + draw-text-wrapping-down-then-right-from-cursor-over-full-screen screen, "abc", 0xa/fg, 0/bg + draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, "def", 0xa/fg, 0/bg # test drawing near the edge - x <- draw-text-rightward screen, "R", 0x3f8/x, 0x400/xmax=screen-width, 0x100/y, 0xa/color - draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, "wrapped from R", 0xa + x <- draw-text-rightward screen, "R", 0x7f/x, 0x80/xmax=screen-width, 0x18/y, 0xa/fg, 0/bg + draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, "wrapped from R", 0xa/fg, 0/bg - x <- draw-text-downward screen, "D", 0x100/x, 0x2f0/y, 0x300/ymax=screen-height, 0xa/color - draw-text-wrapping-down-then-right-from-cursor-over-full-screen screen, "wrapped from D", 0xa + x <- draw-text-downward screen, "D", 0x20/x, 0x2f/y, 0x30/ymax=screen-height, 0xa/fg, 0/bg + draw-text-wrapping-down-then-right-from-cursor-over-full-screen screen, "wrapped from D", 0xa/fg, 0/bg } |