about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--apps/cat.mu7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/cat.mu b/apps/cat.mu
index 13bf007c..5010bafb 100644
--- a/apps/cat.mu
+++ b/apps/cat.mu
@@ -4,7 +4,7 @@
 fn main _args: (addr array (addr array byte)) -> exit-status/ebx: int {
   var args/eax: (addr array (addr array byte)) <- copy _args
 $main-body: {
-    var n/eax: int <- length args
+    var n/ecx: int <- length args
     compare n, 1
     {
       break-if->
@@ -13,7 +13,10 @@ $main-body: {
     }
     {
       break-if-<=
-      print-string "success\n"
+      var filename/edx: (addr addr array byte) <- index args 1
+      print-string "filename: "
+      print-string *filename
+      print-string "\n"
     }
   }
   exit-status <- copy 0