aboutsummaryrefslogtreecommitdiffstats
path: root/source/state.hpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2023-11-24 19:58:11 -0500
committerClyne Sullivan <clyne@bitgloo.com>2023-11-24 19:58:11 -0500
commit649785d46603182132209b64791f6c996497110e (patch)
treed8df15aca9e95fa75ab59772feeee7a8b69c2897 /source/state.hpp
parent6e6b6841ec509549dcb5ed621342cbf21ae1ec94 (diff)
add text processing words
Diffstat (limited to 'source/state.hpp')
-rw-r--r--source/state.hpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/state.hpp b/source/state.hpp
index 2a4668e..17d8e69 100644
--- a/source/state.hpp
+++ b/source/state.hpp
@@ -22,15 +22,16 @@
constexpr Addr DS = 16; /** Data stack size */
constexpr Addr RS = 16; /** Return stack size */
-constexpr auto DictSize = 2048u; /** Dictionary size */
+constexpr auto DictSize = 4096u; /** Dictionary size */
constexpr Addr DIdxBase = 0;
constexpr Addr DIdxHere = 1;
constexpr Addr DIdxLatest = 2;
constexpr Addr DIdxState = 3;
-constexpr Addr DIdxSource = 4;
-constexpr Addr DIdxSrcLen = 5;
-constexpr Addr DIdxInBuf = 6;
+constexpr Addr DIdxCompXt = 4;
+constexpr Addr DIdxSource = 5;
+constexpr Addr DIdxSrcLen = 6;
+constexpr Addr DIdxInBuf = 7;
constexpr Addr DIdxBegin = DIdxInBuf + 80 * sizeof(char);
/**
@@ -52,9 +53,10 @@ extern FuncList IP; /** Instruction pointer */
*/
inline void initialize(const auto& wordset)
{
- LATEST = (Cell)wordset.latest;
- HERE = (Cell)&DICT[DIdxBegin];
- STATE = 0;
+ DICT[DIdxBase] = 10;
+ DICT[DIdxHere] = (Cell)&DICT[DIdxBegin];
+ DICT[DIdxLatest] = (Cell)wordset.latest;
+ DICT[DIdxState] = 0;
}
/**