autopsy: work on output for trace

FossilOrigin-Name: 2c0385c9f7b03ee57d15b441352a825efe60077d7e694f995818c5368a8559f5
This commit is contained in:
crc 2018-02-07 21:33:42 +00:00
parent b59c164e1a
commit b58304960d

View file

@ -239,15 +239,17 @@ This will display output indicating state. It'll provide:
E.g.,
IP:13966 [19,0,0,0] SP:3 RP:1
IP:13966 SP:3 RP:1
[19,0,0,0] - mu......
Stack: 9 3 3 -> 9 9
So helpers for displaying things:
~~~
:display-status
@RP @SP [IP] unpack @IP
'IP:%n\t[%n,%n,%n,%n]\tSP:%n_RP:%n\t s:with-format puts ;
@RP @SP @IP 'IP:%n_SP:%n_RP:%n\n s:with-format puts
[IP] [ unpack ] sip '__%n_->_[%n,%n,%n,%n]_->_ s:with-format puts
[IP] unpack #4 [ name-for<counting-li> putc putc ] times nl ;
:display-data-stack
#0 @SP [ &DataStack over + fetch putn sp n:inc ] times drop ;
@ -263,7 +265,7 @@ And then using the display helpers and instruction processor, a single stepper.
:step (-)
display-status
nl '__Stack:_ puts display-data-stack '_->_ puts
'__Stack:_ puts display-data-stack '_->_ puts
[IP] process-packed-opcode &IP v:inc
display-data-stack nl nl
&Steps v:inc ;