add debugging stuff
This commit is contained in:
parent
5c132631b3
commit
5360aef59b
|
@ -0,0 +1,23 @@
|
|||
\ debug.fs contains functions overwritten from the debug.fs in gforth,
|
||||
\ to make debugging floatingpoint stuff easier.
|
||||
|
||||
: (_debug) ( body ip -- )
|
||||
0 Nesting !
|
||||
BEGIN Unnest off
|
||||
cr ." Scanning code..." cr C-Formated on
|
||||
swap scanword dbg-ip !
|
||||
cr ." Nesting debugger ready!" cr
|
||||
BEGIN .s f.s disp-step D-Key
|
||||
WHILE C-Stop @ 0=
|
||||
WHILE 0 get-next set-bp
|
||||
dbg-ip @ jump
|
||||
[ here DebugLoop ! ]
|
||||
restore-bp
|
||||
REPEAT
|
||||
Nesting @ 0= IF EXIT THEN
|
||||
-1 Nesting +! r>
|
||||
ELSE
|
||||
get-next >r 1 Nesting +!
|
||||
THEN
|
||||
dup
|
||||
AGAIN ;
|
Reference in New Issue