diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-19 11:52:18 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-19 11:52:18 -0500 |
commit | 171b82dab0d6e35ad7b57a4c750333c95b802b0e (patch) | |
tree | 3be66f5d834ba3f1ead15bb644b841918834a28a /state.cpp | |
parent | 12cb6b9e5607e9db2255afd977814cbb0e3fceae (diff) |
fundamental compiling words
Diffstat (limited to 'state.cpp')
-rw-r--r-- | state.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -40,13 +40,18 @@ void State::compiling(bool yes) void State::execute(Addr addr) { - pushr(0); - ip = addr - sizeof(Cell); - - do { - ip += sizeof(Cell); - CoreWords::run(dict.read(ip), *this); - } while (ip); + if (addr < Dictionary::Begin) { + // Must be a core-word + CoreWords::run(addr, *this); + } else { + pushr(0); + ip = addr - sizeof(Cell); + + do { + ip += sizeof(Cell); + CoreWords::run(dict.read(ip), *this); + } while (ip); + } } Cell State::beyondip() const |