diff options
-rw-r--r-- | trace.arc.t | 17 | ||||
-rw-r--r-- | trace.mu | 5 |
2 files changed, 7 insertions, 15 deletions
diff --git a/trace.arc.t b/trace.arc.t index a2971b31..2e7faa93 100644 --- a/trace.arc.t +++ b/trace.arc.t @@ -22,21 +22,12 @@ run: main 2: 4 => ((3 integer)) mem: ((3 integer)): 3 <= 4 schedule: done with routine") (s:stream-address <- init-stream x:string-address) - (arr:instruction-trace-address-array-address <- parse-traces s:stream-address) - (len:integer <- length arr:instruction-trace-address-array-address/deref) + (traces:instruction-trace-address-array-address <- parse-traces s:stream-address) + (len:integer <- length traces:instruction-trace-address-array-address/deref) ; fake screen (screen:terminal-address <- init-fake-terminal 70:literal 15:literal) (screen-state:space-address <- screen-state) - ; print trace collapsed - (i:integer <- copy 0:literal) - { begin - (done?:boolean <- greater-or-equal i:integer len:integer) - (break-if done?:boolean) - (tr:instruction-trace-address <- index arr:instruction-trace-address-array-address/deref i:integer) - (print-instruction-trace-collapsed screen:terminal-address tr:instruction-trace-address screen-state:space-address) - (i:integer <- add i:integer 1:literal) - (loop) - } + (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) ]))) ;? (set dump-trace*) @@ -53,6 +44,6 @@ schedule: done with routine") "+ main/ 1 : 3 => ((2 integer)) " "+ main/ 2 : (((3 integer)) <- ((add)) ((1 integer)) ((2 integer))) " "+ main/ 2 : 4 => ((3 integer)) ")) - (prn "F - print-instruction-trace-collapsed works")) + (prn "F - print-traces-collapsed works")) (reset) diff --git a/trace.mu b/trace.mu index 51cf58ad..7bce1e8d 100644 --- a/trace.mu +++ b/trace.mu @@ -270,6 +270,7 @@ (function print-traces-collapsed [ (default-space:space-address <- new space:literal 30:literal/capacity) (0:space-address/names:screen-state <- next-input) + (screen:terminal-address <- next-input) (traces:instruction-trace-address-array-address <- next-input) (len:integer <- length traces:instruction-trace-address-array-address/deref) (i:integer <- copy 0:literal) @@ -277,7 +278,7 @@ (done?:boolean <- greater-or-equal i:integer len:integer) (break-if done?:boolean) (tr:instruction-trace-address <- index traces:instruction-trace-address-array-address/deref i:integer) - (print-instruction-trace-collapsed nil:literal/terminal tr:instruction-trace-address 0:space-address/screen-state) + (print-instruction-trace-collapsed screen:terminal-address tr:instruction-trace-address 0:space-address/screen-state) (i:integer <- add i:integer 1:literal) (loop) } @@ -355,7 +356,7 @@ schedule: done with routine") ;? ($print len:integer) ;? 1 ;? ($print (("\n" literal))) ;? 1 (cursor-mode) - (print-traces-collapsed 0:space-address/screen-state traces:instruction-trace-address-array-address) + (print-traces-collapsed 0:space-address/screen-state nil:literal/terminal traces:instruction-trace-address-array-address) { begin (quit?:boolean <- process-key 0:space-address/screen-state nil:literal/keyboard nil:literal/terminal traces:instruction-trace-address-array-address) (break-if quit?:boolean) |