diff options
author | Kartik Agaram <vc@akkartik.com> | 2021-01-12 23:52:24 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2021-01-12 23:52:24 -0800 |
commit | 4413168269ad3d3f31fdc60669bb812f54a3d01e (patch) | |
tree | b9b3c6e7b0852b332f6facf3e8501b44d7dc4050 /baremetal/ex6.mu | |
parent | 8a81faecbe3c4bb2dbcbfc427f694b7932a1c5e5 (diff) | |
download | mu-4413168269ad3d3f31fdc60669bb812f54a3d01e.tar.gz |
7507 - baremetal: drawing text down then right
Diffstat (limited to 'baremetal/ex6.mu')
-rw-r--r-- | baremetal/ex6.mu | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/baremetal/ex6.mu b/baremetal/ex6.mu index 21922dab..00fefe60 100644 --- a/baremetal/ex6.mu +++ b/baremetal/ex6.mu @@ -1,4 +1,4 @@ -# Drawing ASCII text incrementally within a bounding box. +# Drawing ASCII text incrementally. # # To build a disk image: # ./translate_mu_baremetal baremetal/ex6.mu # emits disk.img @@ -10,6 +10,7 @@ # Expected output: a box and text that doesn't overflow it fn main { + # drawing text within a bounding box draw-box 0, 0xf, 0x1f, 0x79, 0x51, 0x4 var x/eax: int <- copy 0x20 var y/ecx: int <- copy 0x20 @@ -17,4 +18,8 @@ fn main { 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 + + # drawing at the cursor in multiple directions + x, y <- draw-text-wrapping-down-then-right-from-cursor-over-full-screen 0, "abc", 0xa + x, y <- draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "def", 0xa } |