diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-20 17:32:35 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-20 17:32:35 -0500 |
commit | 6ef7f7ce8548f6e6c60d3b444a087722f354a53f (patch) | |
tree | b091ae88a3e92bcd1058f6fa6a00772462f9faa8 /dictionary.hpp | |
parent | 2bf1634aa4861a291eba9bfc88ae80a81bf9f8fb (diff) |
create, does>, variables
Diffstat (limited to 'dictionary.hpp')
-rw-r--r-- | dictionary.hpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/dictionary.hpp b/dictionary.hpp index b7d318f..fa081cb 100644 --- a/dictionary.hpp +++ b/dictionary.hpp @@ -29,14 +29,17 @@ class Dictionary { public: constexpr static Addr Base = 0; - constexpr static Addr Compiling = sizeof(Cell); - constexpr static Addr Postpone = sizeof(Cell) * 2; - constexpr static Addr Input = sizeof(Cell) * 3; // len data... + 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 InputCells = 80; // bytes! - constexpr static Addr Begin = sizeof(Cell) * 4 + InputCells; + constexpr static Addr Begin = sizeof(Cell) * 5 + InputCells; Addr here = Begin; - Addr latest = Begin; + + Addr latest() { return read(Latest); } + void latest(Addr l) { write(Latest, l); } virtual Cell read(Addr) const = 0; virtual void write(Addr, Cell) = 0; |