about summary refs log tree commit diff stats
path: root/prototypes/tile/1.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-10-01 20:40:22 -0700
committerKartik Agaram <vc@akkartik.com>2020-10-01 20:40:22 -0700
commitd75b71297426ee2d63d5630d1ef9469de48aca84 (patch)
tree0d4c517526770343822d4f409a8e9c1b7ac0e51e /prototypes/tile/1.mu
parentf3ca0e3cb33d6c34dbe4c6941598d16d140be206 (diff)
downloadmu-d75b71297426ee2d63d5630d1ef9469de48aca84.tar.gz
6923
Diffstat (limited to 'prototypes/tile/1.mu')
-rw-r--r--prototypes/tile/1.mu47
1 files changed, 0 insertions, 47 deletions
diff --git a/prototypes/tile/1.mu b/prototypes/tile/1.mu
deleted file mode 100644
index 4d0a7969..00000000
--- a/prototypes/tile/1.mu
+++ /dev/null
@@ -1,47 +0,0 @@
-# little example program: animate a line in text-mode
-#
-# To run (on Linux and x86):
-#   $ git clone https://github.com/akkartik/mu
-#   $ cd mu
-#   $ ./translate_mu prototypes/tile/1.mu
-#   $ ./a.elf
-# You should see a line drawn on a blank screen. Press a key. You should see
-# the line seem to fall down the screen. Press a second key to quit.
-# https://archive.org/details/akkartik-2min-2020-07-01
-
-fn main -> exit-status/ebx: int {
-  clear-screen 0
-  move-cursor 0, 5, 5
-  print-string 0, "_________"
-  enable-keyboard-immediate-mode
-  var dummy/eax: grapheme <- read-key-from-real-keyboard
-  var row/eax: int <- copy 5
-  {
-    compare row, 0xe  # 15
-    break-if-=
-    animate row
-    row <- increment
-    sleep 0 0x5f5e100  # 100ms
-    loop
-  }
-  var dummy/eax: grapheme <- read-key-from-real-keyboard
-  enable-keyboard-type-mode
-  clear-screen 0
-  exit-status <- copy 0
-}
-
-fn animate row: int {
-  var col/eax: int <- copy 5
-  {
-    compare col, 0xe
-    break-if-=
-    move-cursor 0, row, col
-    print-string 0, " "
-    increment row
-    move-cursor 0, row, col
-    print-string 0, "_"
-    decrement row
-    col <- increment
-    loop
-  }
-}