autopsy: cleaner step output
FossilOrigin-Name: bcb75017fabb255e6b055f7d2b9d730c8f45868b7dcc83cc933078c5374dd3a7
This commit is contained in:
parent
d36bf95ff6
commit
b59c164e1a
1 changed files with 5 additions and 4 deletions
|
@ -239,14 +239,15 @@ This will display output indicating state. It'll provide:
|
||||||
|
|
||||||
E.g.,
|
E.g.,
|
||||||
|
|
||||||
IP:13966 [19,0,0,0] SP:3 RP:1 Stack: 9 3 3 -> 9 9
|
IP:13966 [19,0,0,0] SP:3 RP:1
|
||||||
|
Stack: 9 3 3 -> 9 9
|
||||||
|
|
||||||
So helpers for displaying things:
|
So helpers for displaying things:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
:display-status
|
:display-status
|
||||||
@RP @SP [IP] unpack @IP
|
@RP @SP [IP] unpack @IP
|
||||||
'IP:%n_[%n,%n,%n,%n]\tSP:%n_RP:%n\t s:with-format puts ;
|
'IP:%n\t[%n,%n,%n,%n]\tSP:%n_RP:%n\t s:with-format puts ;
|
||||||
|
|
||||||
:display-data-stack
|
:display-data-stack
|
||||||
#0 @SP [ &DataStack over + fetch putn sp n:inc ] times drop ;
|
#0 @SP [ &DataStack over + fetch putn sp n:inc ] times drop ;
|
||||||
|
@ -262,9 +263,9 @@ And then using the display helpers and instruction processor, a single stepper.
|
||||||
|
|
||||||
:step (-)
|
:step (-)
|
||||||
display-status
|
display-status
|
||||||
'Stack:_ puts display-data-stack '_->_ puts
|
nl '__Stack:_ puts display-data-stack '_->_ puts
|
||||||
[IP] process-packed-opcode &IP v:inc
|
[IP] process-packed-opcode &IP v:inc
|
||||||
display-data-stack nl
|
display-data-stack nl nl
|
||||||
&Steps v:inc ;
|
&Steps v:inc ;
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue