From 4d9876da62e46c2b2f7f676142b4bd349db968de Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Mon, 11 Jan 2021 08:20:50 +0900 Subject: [PATCH] Add unloop --- bootstrap.fs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap.fs b/bootstrap.fs index 9a3dfc7..e8c1de5 100644 --- a/bootstrap.fs +++ b/bootstrap.fs @@ -1486,6 +1486,11 @@ do-stack 16 cells + do-sp ! compile rdrop ; immediate +: unloop ( R:a b -- ) + compile rdrop + compile rdrop +; immediate + : i 2 rpick ; : j 4 rpick ; : k 6 rpick ; @@ -2477,7 +2482,7 @@ need-defined (read) if else then unless begin until again while repeat recurse case of rangeof endof endcase - do loop +loop leave i j k + do loop +loop unloop leave i j k char [char] key .s . .r u. u.r dec. hex. type