From 39234e89e13269e2154dd2e39088ac6b7f940ffd Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 30 May 2020 08:44:46 -0700 Subject: 6447 --- html/apps/ex3.mu.html | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'html/apps/ex3.mu.html') diff --git a/html/apps/ex3.mu.html b/html/apps/ex3.mu.html index eb4de019..3c68aed1 100644 --- a/html/apps/ex3.mu.html +++ b/html/apps/ex3.mu.html @@ -14,10 +14,11 @@ pre { white-space: pre-wrap; font-family: monospace; color: #000000; background- body { font-size:12pt; font-family: monospace; color: #000000; background-color: #c6c6c6; } a { color:inherit; } * { font-size:12pt; font-size: 1em; } -.muFunction { color: #af5f00; text-decoration: underline; } .LineNr { } +.muFunction { color: #af5f00; text-decoration: underline; } +.SpecialChar { color: #d70000; } +.Comment { color: #005faf; } .Constant { color: #008787; } -.Special { color: #ff6060; } .Delimiter { color: #c000c0; } .PreProc { color: #c000c0; } --> @@ -55,17 +56,26 @@ if ('onhashchange' in window) { https://github.com/akkartik/mu/blob/master/apps/ex3.mu
- 1 fn main -> result/ebx: int {
- 2   result <- copy 0
- 3   var i/eax: int <- copy 1
- 4   {
- 5     compare i, 0xa
- 6     break-if->
- 7     result <- add i
- 8     i <- increment
- 9     loop
-10   }
-11 }
+ 1 # Add the first 10 numbers, and return the result in the exit code.
+ 2 #
+ 3 # To run:
+ 4 #   $ ./translate_mu apps/browse.mu
+ 5 #   $ ./a.elf
+ 6 # Expected result:
+ 7 #   $ echo $?
+ 8 #   55
+ 9 
+10 fn main -> result/ebx: int {
+11   result <- copy 0
+12   var i/eax: int <- copy 1
+13   {
+14     compare i, 0xa
+15     break-if->
+16     result <- add i
+17     i <- increment
+18     loop
+19   }
+20 }
 
-- cgit 1.4.1-2-gfad0