about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-02-11 02:38:13 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-02-11 02:38:13 -0800
commit4356f9d2478fc89b0bc3fc214870f58c29f28937 (patch)
tree9be302d874079661e34fee93865e793351f1d70d
parent6195ab7d55a2f5dfe1dcd9fb5172b48b6ac6e74e (diff)
downloadmu-4356f9d2478fc89b0bc3fc214870f58c29f28937.tar.gz
743
-rw-r--r--trace.arc.t29
1 files changed, 20 insertions, 9 deletions
diff --git a/trace.arc.t b/trace.arc.t
index e8f561cd..17b3ff32 100644
--- a/trace.arc.t
+++ b/trace.arc.t
@@ -68,22 +68,19 @@ schedule:  done with routine")
       (s:stream-address <- init-stream x:string-address)
       (traces:instruction-trace-address-array-address <- parse-traces s:stream-address)
       (len:integer <- length traces:instruction-trace-address-array-address/deref)
-      (screen:terminal-address <- init-fake-terminal 70:literal 15:literal)
+      (1:terminal-address/raw <- init-fake-terminal 70:literal 15:literal)
       ; position the cursor away from top of screen
-      (cursor-down screen:terminal-address)
-      (cursor-down screen:terminal-address)
+      (cursor-down 1:terminal-address/raw)
+      (cursor-down 1:terminal-address/raw)
       (screen-state:space-address <- screen-state)
-      (print-traces-collapsed screen-state:space-address screen:terminal-address traces:instruction-trace-address-array-address)
-      (1:string-address/raw <- get screen:terminal-address/deref data:offset)
+      (print-traces-collapsed screen-state:space-address 1:terminal-address/raw traces:instruction-trace-address-array-address)
+      (2:string-address/raw <- get 1:terminal-address/raw/deref data:offset)
     ])))
-;? (set dump-trace*)
-;? (= dump-trace* (obj whitelist '("run")))
 (run 'main)
 (each routine completed-routines*
   (awhen rep.routine!error
     (prn "error - " it)))
-;? (prn memory*.1)
-(when (~memory-contains-array memory*.1
+(when (~memory-contains-array memory*.2
          (+ "                                                                      "
             "                                                                      "
             "+ main/ 0 : (((1 integer)) <- ((copy)) ((1 literal)))                 "
@@ -94,4 +91,18 @@ schedule:  done with routine")
             "+ main/ 2 : 4 => ((3 integer))                                        "))
   (prn "F - print-traces-collapsed works"))
 
+(run-code main2
+  (print-character 1:terminal-address/raw ((#\* literal))))
+(when (~memory-contains-array memory*.2
+         (+ "                                                                      "
+            "                                                                      "
+            "+ main/ 0 : (((1 integer)) <- ((copy)) ((1 literal)))                 "
+            "+ main/ 0 : 1 => ((1 integer))                                        "
+            "+ main/ 1 : (((2 integer)) <- ((copy)) ((3 literal)))                 "
+            "+ main/ 1 : 3 => ((2 integer))                                        "
+            "+ main/ 2 : (((3 integer)) <- ((add)) ((1 integer)) ((2 integer)))    "
+            "+ main/ 2 : 4 => ((3 integer))                                        "
+            "*                                                                     "))
+  (prn "F - print-traces-collapsed leaves cursor at next line"))
+
 (reset)