From 9d88c996d8e94e7112f4d694f11bc39c4ccba48d Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Mon, 11 Jan 2021 02:27:42 +0900 Subject: [PATCH] fixed a bug of begin-while-repeat loop --- bootstrap.fs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap.fs b/bootstrap.fs index 86292c9..c3f64a5 100644 --- a/bootstrap.fs +++ b/bootstrap.fs @@ -732,21 +732,21 @@ allot-cell : &find! [ ' L , , ] ; \ ( c-addr -- nt ) Throw exception at error here - , \ fill offset ; immediate -\ compile: ( dest -- dest orig ) +\ compile: ( dest -- orig dest ) \ runtime: ( n -- ) \ dest=location of begin \ orig=location of while : while compile 0branch - here 0 , \ save location, fill dummy + here swap + 0 , \ save location, fill dummy ; immediate -\ compile: ( dest orig -- ) +\ compile: ( orig dest -- ) \ runtime: ( -- ) \ dest=location of begin \ orig=location of while : repeat - swap compile branch here - , \ fill offset from here to begin here over - swap ! \ backfill offset from while to here