about summary refs log tree commit diff stats
path: root/tutorial/task4.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-10-20 11:51:24 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-10-20 12:01:55 -0700
commit619dc31dfc565a2f8d76b6ab701b64394506f5ae (patch)
treee6fa4595c885f1582cdf7b6e89e5439aecdd0f68 /tutorial/task4.mu
parent909a0e2530142ea5bf506d66111a6ff75bf645e9 (diff)
downloadmu-619dc31dfc565a2f8d76b6ab701b64394506f5ae.tar.gz
sketching out a slow tutorial
Diffstat (limited to 'tutorial/task4.mu')
-rw-r--r--tutorial/task4.mu15
1 files changed, 15 insertions, 0 deletions
diff --git a/tutorial/task4.mu b/tutorial/task4.mu
new file mode 100644
index 00000000..ca8da8f4
--- /dev/null
+++ b/tutorial/task4.mu
@@ -0,0 +1,15 @@
+fn the-answer -> _/eax: int {
+  var result/eax: int <- copy 0
+  # insert your statement below {
+
+  # }
+  return result
+}
+
+fn test-the-answer {
+  var result/eax: int <- the-answer
+  check-ints-equal result, 0x2a, "F - the-answer should return 42, but didn't."
+}
+
+fn main {
+}