836
This commit is contained in:
parent
89933230fc
commit
4e64c5418b
12
trace.arc.t
12
trace.arc.t
|
@ -25,7 +25,7 @@ schedule: done with routine")
|
|||
(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)
|
||||
(screen-state:space-address <- screen-state traces:instruction-trace-address-array-address)
|
||||
(screen-state:space-address <- screen-state traces:instruction-trace-address-array-address 30:literal/screen-height)
|
||||
(print-traces-collapsed screen-state:space-address screen:terminal-address)
|
||||
(1:string-address/raw <- get screen:terminal-address/deref data:offset)
|
||||
])))
|
||||
|
@ -73,7 +73,7 @@ schedule: done with routine")
|
|||
; position the cursor away from top of screen
|
||||
(cursor-down 1:terminal-address/raw)
|
||||
(cursor-down 1:terminal-address/raw)
|
||||
(screen-state:space-address <- screen-state traces:instruction-trace-address-array-address)
|
||||
(screen-state:space-address <- screen-state traces:instruction-trace-address-array-address 30:literal/screen-height)
|
||||
(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)
|
||||
])))
|
||||
|
@ -132,7 +132,7 @@ schedule: done with routine")
|
|||
; position the cursor away from top of screen
|
||||
(cursor-down 2:terminal-address/raw)
|
||||
(cursor-down 2:terminal-address/raw)
|
||||
(3:space-address/raw <- screen-state 1:instruction-trace-address-array-address/raw)
|
||||
(3:space-address/raw <- screen-state 1:instruction-trace-address-array-address/raw 30:literal/screen-height)
|
||||
; draw trace
|
||||
(print-traces-collapsed 3:space-address/raw/screen-state 2:terminal-address/raw 1:instruction-trace-address-array-address/raw)
|
||||
; move cursor up
|
||||
|
@ -281,7 +281,7 @@ schedule: done with routine")
|
|||
; position the cursor away from top of screen
|
||||
(cursor-down 2:terminal-address/raw)
|
||||
(cursor-down 2:terminal-address/raw)
|
||||
(3:space-address/raw <- screen-state 1:instruction-trace-address-array-address/raw)
|
||||
(3:space-address/raw <- screen-state 1:instruction-trace-address-array-address/raw 30:literal/screen-height)
|
||||
; draw trace
|
||||
(print-traces-collapsed 3:space-address/raw/screen-state 2:terminal-address/raw 1:instruction-trace-address-array-address/raw)
|
||||
(4:string-address/raw <- get 2:terminal-address/raw/deref data:offset)
|
||||
|
@ -366,7 +366,7 @@ schedule: done with routine")
|
|||
; position the cursor away from top of screen
|
||||
(cursor-down 2:terminal-address/raw)
|
||||
(cursor-down 2:terminal-address/raw)
|
||||
(3:space-address/raw <- screen-state 1:instruction-trace-address-array-address/raw)
|
||||
(3:space-address/raw <- screen-state 1:instruction-trace-address-array-address/raw 30:literal/screen-height)
|
||||
; draw trace
|
||||
(print-traces-collapsed 3:space-address/raw/screen-state 2:terminal-address/raw 1:instruction-trace-address-array-address/raw)
|
||||
; expand penultimate line
|
||||
|
@ -422,7 +422,7 @@ schedule: done with routine")
|
|||
; position the cursor away from top of screen
|
||||
(cursor-down 2:terminal-address/raw)
|
||||
(cursor-down 2:terminal-address/raw)
|
||||
(3:space-address/raw <- screen-state 1:instruction-trace-address-array-address/raw)
|
||||
(3:space-address/raw <- screen-state 1:instruction-trace-address-array-address/raw 30:literal/screen-height)
|
||||
; draw trace
|
||||
(print-traces-collapsed 3:space-address/raw/screen-state 2:terminal-address/raw 1:instruction-trace-address-array-address/raw)
|
||||
; expand penultimate line, then move one line down and draw cursor
|
||||
|
|
4
trace.mu
4
trace.mu
|
@ -225,6 +225,7 @@
|
|||
(function screen-state [
|
||||
(default-space:space-address <- new space:literal 30:literal/capacity)
|
||||
(traces:instruction-trace-address-array-address <- next-input)
|
||||
(screen-height:integer <- next-input) ; 'hardware' limitation
|
||||
(app-height:integer <- copy 0:literal) ; area of the screen we're responsible for; can't be larger than screen-height
|
||||
(printed-height:integer <- copy 0:literal) ; part of screen that currently has text; can't be larger than app-height
|
||||
(cursor-row:integer <- copy 0:literal) ; position of cursor on screen; can't be larger than printed-height + 1
|
||||
|
@ -505,6 +506,7 @@
|
|||
(function browse-trace [
|
||||
(default-space:space-address <- new space:literal 30:literal/capacity)
|
||||
(x:string-address <- next-input)
|
||||
(screen-height:integer <- next-input)
|
||||
;? ($start-tracing) ;? 1
|
||||
;? (x:string-address <- new
|
||||
;? "schedule: main
|
||||
|
@ -522,7 +524,7 @@
|
|||
;? schedule: done with routine")
|
||||
(s:stream-address <- init-stream x:string-address)
|
||||
(traces:instruction-trace-address-array-address <- parse-traces s:stream-address)
|
||||
(0:space-address/names:screen-state <- screen-state traces:instruction-trace-address-array-address)
|
||||
(0:space-address/names:screen-state <- screen-state traces:instruction-trace-address-array-address screen-height:integer)
|
||||
(cursor-mode)
|
||||
(print-traces-collapsed 0:space-address/screen-state nil:literal/terminal)
|
||||
{ begin
|
||||
|
|
Loading…
Reference in New Issue