From ca8f5a191f70e66c20e5e6df88227660d7a2e399 Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Mon, 4 Jan 2021 09:32:16 +0900 Subject: [PATCH] Add .s --- bootstrap.fs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bootstrap.fs b/bootstrap.fs index 56e3ec7..c7c9a0b 100644 --- a/bootstrap.fs +++ b/bootstrap.fs @@ -1291,3 +1291,13 @@ create word-buffer s" 63" >number drop cell+ allot drop ; main + +( === Dump of data stack === ) +: .s ( -- ) + sp0 sp@ - cell- cell / ( depth of the stack ) + '<' emit 0 u.r '>' emit space + sp@ sp0 ( beg end ) + begin 2dup < while + cell- dup @ . + repeat 2drop +;