aboutsummaryrefslogtreecommitdiffstats
path: root/dictionary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dictionary.cpp')
-rw-r--r--dictionary.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/dictionary.cpp b/dictionary.cpp
index ff80957..6432607 100644
--- a/dictionary.cpp
+++ b/dictionary.cpp
@@ -27,6 +27,7 @@ void Dictionary::initialize()
write(Here, Begin);
write(Latest, Begin);
write(Compiling, 0);
+ write(Source, Input + sizeof(Cell));
}
Addr Dictionary::allot(Cell amount) noexcept
@@ -95,10 +96,11 @@ Addr Dictionary::getexec(Addr addr) noexcept
Word Dictionary::input() noexcept
{
auto idx = read(Dictionary::Input);
- auto ch = readbyte(Dictionary::Input + sizeof(Cell) + idx);
+ auto src = read(Dictionary::Source);
+ auto ch = readbyte(src + idx);
if (ch) {
- Addr wordstart = Dictionary::Input + sizeof(Cell) + idx;
+ Addr wordstart = src + idx;
Addr wordend = wordstart;
do {