embedded systems developers tools, cross compilers
  Home  |   SwiftX Archive  |   SwiftForth Archive  |

Re: RDEPTH Before Call

From: Bulgrien, Dennis <Dennis.Bulgrien_at_TripointGlobal.com>
Date: Fri, 29 Mar 2002 19:29:21 -0600

Yeah, debugging! I like the unoptimize idea; that will make stepping back
through the call history a lot easier. In an unoptimized world, one more 1-
really needs to be done on RDEPTH's return to exclude the address an EXIT in
RDEPTH would return to. In an optimized world I guess Leon's privately
communicated idea is best, include the following in RDEPTH's comment :-)

RDEPTH returns the depth of the return stack as it was when RDEPTH was
called.
Warning: Be sure that RDEPTH is not the last word in a definition!

: RDEPTH ( -- n ) STATUS RP@ - CELL / 2 - ;
: NOP ;

: test1 RDEPTH NOP ; ok
test1 . 4 ok
: test2 RDEPTH . ; ok
test2 4 ok
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/swiftx -- check them out!
----------------------------------------------------------------------
THIS LIST IS NOT FOR BUG REPORTS! Send bug reports to support_at_forth.com.
Received on Fri Mar 29 2002 - 17:30:08 PST

This archive was generated by hypermail 2.2.0 : Wed Jan 07 2009 - 03:04:23 PST