diff options
Diffstat (limited to 'source/core.hpp')
-rw-r--r-- | source/core.hpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/core.hpp b/source/core.hpp index 8b220e4..935fc0c 100644 --- a/source/core.hpp +++ b/source/core.hpp @@ -1,5 +1,5 @@ // sprit-forth: A portable subroutine-threaded Forth. -// Copyright (C) 2023 Clyne Sullivan <clyne@bitgloo.com> +// Copyright (C) 2024 Clyne Sullivan <clyne@bitgloo.com> // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Library General Public License as published by @@ -18,7 +18,8 @@ #ifndef CORE_HPP #define CORE_HPP -#include "types.hpp" +#include "executor.hpp" +#include "state.hpp" /** * To be implemented by the user: Adds available input to the source buffer. @@ -30,9 +31,7 @@ extern void getinput(); * "Function exit" word, analagous to a function's return statement. */ constexpr auto fexit = WordWrap<[] { - extern FuncList IP; - extern Cell rpop(); - IP = reinterpret_cast<FuncList>(rpop()); + Exec.ip = reinterpret_cast<FuncList>(Forth.rpop()); }>; void jump(FuncList ip); /** Jumps to the given instruction pointer. */ |