diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-17 08:15:30 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-17 08:15:30 -0500 |
commit | 24a61f3c99125c97ca79ea173c959d7bd89f1a48 (patch) | |
tree | 4d89ad660335f718f32482f49f985747de4e5c5f /state.cpp | |
parent | e45926fa2a1bc332214f0467de6020529d91b7ba (diff) |
some cleanup
Diffstat (limited to 'state.cpp')
-rw-r--r-- | state.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -16,6 +16,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ +#include "corewords.hpp" #include "state.hpp" #include <iterator> @@ -37,6 +38,17 @@ void State::compiling(bool yes) dict.write(Dictionary::Compiling, yes); } +void State::execute(Addr addr) +{ + pushr(0); + ip = addr - sizeof(Cell); + + do { + ip += sizeof(Cell); + CoreWords::run(dict.read(ip), *this); + } while (ip); +} + Cell State::beyondip() const { return dict.read(ip + sizeof(Cell)); |