From d360c6eaf97bae59ed936c32a12a84a13ec6586d Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Sat, 9 Jan 2021 06:59:05 -0800 Subject: [PATCH] Fix FOR..NEXT --- ueforth/common/opcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ueforth/common/opcodes.h b/ueforth/common/opcodes.h index bf5affd..2afe2e2 100644 --- a/ueforth/common/opcodes.h +++ b/ueforth/common/opcodes.h @@ -57,7 +57,7 @@ typedef uint64_t udcell_t; X("BRANCH", BRANCH, ip = (cell_t *) (*ip | 0)) \ X("0BRANCH", ZBRANCH, if (!tos) ip = (cell_t *) (*ip | 0); else ++ip; DROP) \ X("DONEXT", DONEXT, *rp = ((*rp|0) - 1) | 0; \ - if ((*rp|0)) ip = (cell_t *) (*ip | 0); else (--rp, ++ip)) \ + if (~(*rp|0)) ip = (cell_t *) (*ip | 0); else (--rp, ++ip)) \ X("DOLIT", DOLIT, DUP; tos = (*ip | 0); ++ip) \ X("ALITERAL", ALITERAL, COMMA(g_sys.DOLIT_XT | 0); COMMA(tos | 0); DROP) \ X("CELL", CELL, DUP; tos = sizeof(cell_t)) \