about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--apps/tile/environment.mu14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index 09a0b434..e8221a34 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -786,6 +786,14 @@ fn bound-function? w: (addr word), functions-ah: (addr handle function) -> resul
   subresult <- word-equal? w, "read"
   compare subresult, 0  # false
   break-if-!=
+  # if w == "dup" return true
+  subresult <- word-equal? w, "dup"
+  compare subresult, 0  # false
+  break-if-!=
+  # if w == "swap" return true
+  subresult <- word-equal? w, "swap"
+  compare subresult, 0  # false
+  break-if-!=
   # return w in functions
   var out-h: (handle function)
   var out/eax: (addr handle function) <- address out-h
@@ -1542,13 +1550,15 @@ fn clear-canvas _env: (addr environment) {
   start-col <- subtract 0x18
   move-cursor screen, 1, start-col
   print-string screen, "primitives:"
-  move-cursor screen, 4, start-col
+  move-cursor screen, 5, start-col
   print-string screen, "functions:"
   start-col <- add 2
   move-cursor screen, 2, start-col
   print-string screen, "+ - * len open read"
+  move-cursor screen, 3, start-col
+  print-string screen, "dup swap"
   # currently defined functions
-  var row/ebx: int <- copy 5
+  var row/ebx: int <- copy 6
   var functions/esi: (addr handle function) <- get env, functions
   {
     var curr/eax: (addr function) <- lookup *functions