diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-25 13:39:04 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-25 13:39:04 -0500 |
commit | 4af14b8c3e2b8c0ef230158b91e8a890dc34e523 (patch) | |
tree | 994ee5655739c51c66a3986f4af490733769cf6c /dictionary.hpp | |
parent | fc0d3ed9cfebd853db2a2ab26993a186a29180b1 (diff) |
reduce built-in word count
Diffstat (limited to 'dictionary.hpp')
-rw-r--r-- | dictionary.hpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/dictionary.hpp b/dictionary.hpp index 9987e8f..1321875 100644 --- a/dictionary.hpp +++ b/dictionary.hpp @@ -28,14 +28,16 @@ class Dictionary { public: constexpr static Addr Base = 0; - constexpr static Addr Latest = sizeof(Cell); - constexpr static Addr Compiling = sizeof(Cell) * 2; - constexpr static Addr Postpone = sizeof(Cell) * 3; - constexpr static Addr Input = sizeof(Cell) * 4; // len data... + constexpr static Addr Here = sizeof(Cell); + constexpr static Addr Latest = sizeof(Cell) * 2; + constexpr static Addr Compiling = sizeof(Cell) * 3; + constexpr static Addr Postpone = sizeof(Cell) * 4; + constexpr static Addr Input = sizeof(Cell) * 5; // len data... constexpr static Addr InputCells = 80; // bytes! - constexpr static Addr Begin = sizeof(Cell) * 5 + InputCells; + constexpr static Addr Begin = sizeof(Cell) * 6 + InputCells; - Addr here = Begin; + Addr here() const noexcept { return read(Here); } + void here(Addr l) noexcept { write(Here, l); } Addr latest() const noexcept { return read(Latest); } void latest(Addr l) noexcept { write(Latest, l); } |