about summary refs log tree commit diff stats
path: root/linux/raytracing/1.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-07-16 08:09:42 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-07-16 08:28:56 -0700
commit44d26b77c45668c9b0c99894a4294cec004361fe (patch)
tree68a5dcd4971873efd4ce184e9bf9a531c2161813 /linux/raytracing/1.mu
parentac45f097153afd3a89f43886e4124c5b2c26b98a (diff)
downloadmu-44d26b77c45668c9b0c99894a4294cec004361fe.tar.gz
.
Diffstat (limited to 'linux/raytracing/1.mu')
-rw-r--r--linux/raytracing/1.mu31
1 files changed, 0 insertions, 31 deletions
diff --git a/linux/raytracing/1.mu b/linux/raytracing/1.mu
deleted file mode 100644
index 8c92710f..00000000
--- a/linux/raytracing/1.mu
+++ /dev/null
@@ -1,31 +0,0 @@
-# Listing 1 of https://raytracing.github.io/books/RayTracingInOneWeekend.html
-# (simplified)
-#
-# To run (on Linux):
-#   $ git clone https://github.com/akkartik/mu
-#   $ cd mu
-#   $ ./translate raytracing/1.mu
-#   $ ./a.elf > 1.ppm
-
-fn main -> _/ebx: int {
-  print-string 0, "P3\n256 256\n255\n"
-  var j/ecx: int <- copy 0xff
-  {
-    compare j, 0
-    break-if-<
-    var i/eax: int <- copy 0
-    {
-      compare i, 0xff
-      break-if->
-      print-int32-decimal 0, i
-      print-string 0, " "
-      print-int32-decimal 0, j
-      print-string 0, " 64\n"
-      i <- increment
-      loop
-    }
-    j <- decrement
-    loop
-  }
-  return 0
-}