From 7cd9d29cd8117037fb6714d0ee1065816641443d Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Mon, 6 Apr 2020 16:54:56 -0400 Subject: [PATCH] core: fix MOVE so it copies the right number of bytes It copied one too much. --- forth/core.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forth/core.fs b/forth/core.fs index 5896d24..183722a 100644 --- a/forth/core.fs +++ b/forth/core.fs @@ -122,8 +122,8 @@ ( a1 a2 u -- ) : MOVE ( u ) 0 DO - SWAP DUP I + @ ( a2 a1 x ) + SWAP DUP I + C@ ( a2 a1 x ) ROT SWAP OVER I + ( a1 a2 x a2 ) - ! ( a1 a2 ) + C! ( a1 a2 ) LOOP ;