From a17e38b16d7e707aebbdc5ed3bee7ac8d775a96d Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Mon, 11 Jan 2021 02:06:39 +0900 Subject: [PATCH] fixed a bug --- bootstrap.fs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap.fs b/bootstrap.fs index 75fd4f2..9270f19 100644 --- a/bootstrap.fs +++ b/bootstrap.fs @@ -623,11 +623,6 @@ allot-cell : &find! [ ' L , , ] ; \ ( c-addr -- nt ) Throw exception at error : sp0 [ sp@ ] literal ; : rp0 [ rp@ ] literal ; -\ ( -- n ) -\ Number of elemtns in the stack -: depth sp0 sp@ - cell- cell / ; -: rdepth rp0 rp@ - cell / ; - \ === Integer Arithmetic === : 1+ 1 + ; @@ -1486,6 +1481,11 @@ do-stack 16 cells + do-sp ! ( === Dump of data stack === ) +\ ( -- n ) +\ Number of elemtns in the stack +: depth sp0 sp@ - cell- cell / ; +: rdepth rp0 rp@ - cell / ; + : .s ( -- ) sp0 sp@ - cell- cell / ( depth of the stack ) '<' emit 0 u.r '>' emit space