about summary refs log tree commit diff stats
path: root/apps/ex1.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-07-16 08:09:42 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-07-16 08:28:56 -0700
commit44d26b77c45668c9b0c99894a4294cec004361fe (patch)
tree68a5dcd4971873efd4ce184e9bf9a531c2161813 /apps/ex1.mu
parentac45f097153afd3a89f43886e4124c5b2c26b98a (diff)
downloadmu-44d26b77c45668c9b0c99894a4294cec004361fe.tar.gz
.
Diffstat (limited to 'apps/ex1.mu')
-rw-r--r--apps/ex1.mu14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/ex1.mu b/apps/ex1.mu
new file mode 100644
index 00000000..a96bed07
--- /dev/null
+++ b/apps/ex1.mu
@@ -0,0 +1,14 @@
+# The simplest possible bare-metal program.
+#
+# To build a disk image:
+#   ./translate apps/ex1.mu        # emits code.img
+# To run:
+#   qemu-system-i386 code.img
+# Or:
+#   bochs -f bochsrc               # bochsrc loads code.img
+#
+# Expected output: blank screen with no errors
+
+fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
+  loop
+}