From 155b0eae07eeab586e6932793980a00fe8c8c399 Mon Sep 17 00:00:00 2001 From: IgorCielniak Date: Mon, 12 Jan 2026 08:47:42 +0100 Subject: [PATCH] added rdump to debug.sl for dumping the return stack --- stdlib/debug.sl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/stdlib/debug.sl b/stdlib/debug.sl index e0755a2..4a3009f 100644 --- a/stdlib/debug.sl +++ b/stdlib/debug.sl @@ -1,3 +1,6 @@ +import stdlib.sl +import io.sl + # : dump ( n -- ) # dump takes the firts element from the stack @@ -14,6 +17,17 @@ word dump drop end +# same but for return stack +word rdump + 1 swap + for + dup rpick + puti cr + 1 + + end + drop +end + # : int3 ( -- ) :asm int3 { int3