From 8bbafb13974bbfd7223e8c69156493a123702c0d Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Thu, 2 Jan 2020 14:12:46 -0800 Subject: 5872 --- apps/ex1.mu | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 apps/ex1.mu (limited to 'apps/ex1.mu') diff --git a/apps/ex1.mu b/apps/ex1.mu new file mode 100644 index 00000000..f6d67001 --- /dev/null +++ b/apps/ex1.mu @@ -0,0 +1,13 @@ +# First example: return the answer to the Ultimate Question of Life, the +# Universe, and Everything. +# +# To run: +# $ ./translate_mu apps/ex1.mu +# $ ./a.elf +# Expected result: +# $ echo $? +# 42 + +fn main -> result/ebx: int { + result <- copy 0x2a # Mu requires hexadecimal +} -- cgit 1.4.1-2-gfad0