about summary refs log tree commit diff stats
path: root/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-05-30 08:44:46 -0700
committerKartik Agaram <vc@akkartik.com>2020-05-30 08:44:46 -0700
commit39234e89e13269e2154dd2e39088ac6b7f940ffd (patch)
tree85629c9c7d16362104c49c2d8c929bb4070257bf /apps
parent7bdd25fa397219c0952878fcd6f9bfb1e4f194ce (diff)
downloadmu-39234e89e13269e2154dd2e39088ac6b7f940ffd.tar.gz
6447
Diffstat (limited to 'apps')
-rw-r--r--apps/browse.mu8
-rw-r--r--apps/ex2.2.mu9
-rw-r--r--apps/ex3.mu9
-rw-r--r--apps/tui.mu6
4 files changed, 30 insertions, 2 deletions
diff --git a/apps/browse.mu b/apps/browse.mu
index 5a490848..c50a619f 100644
--- a/apps/browse.mu
+++ b/apps/browse.mu
@@ -1,4 +1,10 @@
-# render text with word-wrap
+# Render text with word-wrap.
+#
+# To run:
+#   $ ./translate_mu apps/browse.mu
+#   $ ./a.elf __text_file__
+#
+# Press 'q' to quit. All other keys scroll down.
 
 fn main args: (addr array (addr array byte)) -> exit-status/ebx: int {
   var filename/eax: (addr array byte) <- first-arg args
diff --git a/apps/ex2.2.mu b/apps/ex2.2.mu
index dce1fe3f..b177e770 100644
--- a/apps/ex2.2.mu
+++ b/apps/ex2.2.mu
@@ -1,3 +1,12 @@
+# Increment a number, and return the result in the exit code.
+#
+# To run:
+#   $ ./translate_mu apps/ex2.2.mu
+#   $ ./a.elf
+# Expected result:
+#   $ echo $?
+#   7
+
 fn main -> result/ebx: int {
   result <- foo
 }
diff --git a/apps/ex3.mu b/apps/ex3.mu
index aaef1175..efe6a317 100644
--- a/apps/ex3.mu
+++ b/apps/ex3.mu
@@ -1,3 +1,12 @@
+# Add the first 10 numbers, and return the result in the exit code.
+#
+# To run:
+#   $ ./translate_mu apps/browse.mu
+#   $ ./a.elf
+# Expected result:
+#   $ echo $?
+#   55
+
 fn main -> result/ebx: int {
   result <- copy 0
   var i/eax: int <- copy 1
diff --git a/apps/tui.mu b/apps/tui.mu
index e2f97609..07d3147e 100644
--- a/apps/tui.mu
+++ b/apps/tui.mu
@@ -1,4 +1,8 @@
-# test some primitives for text-mode 
+# Test some primitives for text-mode.
+#
+# To run:
+#   $ ./translate_mu apps/tui.mu
+#   $ ./a.elf
 
 fn main -> exit-status/ebx: int {
   var nrows/eax: int <- copy 0