about summary refs log tree commit diff stats
path: root/baremetal/501draw-text.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-02-07 23:45:31 -0800
committerKartik Agaram <vc@akkartik.com>2021-02-07 23:45:31 -0800
commitbfcf5c7252302c27c2b07b900063fdb547de7987 (patch)
tree9f396159c0ebfc3b1e6886cd86cfa389fe381a73 /baremetal/501draw-text.mu
parent0be63b75c29306ecf70eb8024a6a3b1711f4a225 (diff)
downloadmu-bfcf5c7252302c27c2b07b900063fdb547de7987.tar.gz
7698 - starting to test-drive baremetal shell
Diffstat (limited to 'baremetal/501draw-text.mu')
-rw-r--r--baremetal/501draw-text.mu11
1 files changed, 11 insertions, 0 deletions
diff --git a/baremetal/501draw-text.mu b/baremetal/501draw-text.mu
index 395aff0b..b9fc274f 100644
--- a/baremetal/501draw-text.mu
+++ b/baremetal/501draw-text.mu
@@ -499,3 +499,14 @@ fn draw-text-wrapping-down-then-right-from-cursor-over-full-screen screen: (addr
   width, height <- screen-size screen
   draw-text-wrapping-down-then-right-from-cursor screen, text, 0/xmin, 0/ymin, width, height, color, background-color
 }
+
+# hacky error-handling
+# just go into an infinite loop
+fn abort e: (addr array byte) {
+  var dummy1/eax: int <- copy 0
+  var dummy2/ecx: int <- copy 0
+  dummy1, dummy2 <- draw-text-wrapping-right-then-down-over-full-screen 0/screen, e, 0/x, 0x2f/y, 0xf/fg=white, 0xc/bg=red
+  {
+    loop
+  }
+}