From ea026f8d67c411fc4a0d8b255a2653753258175e Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 2 Nov 2023 20:50:47 -0400 Subject: running on the devboard --- libalee/corewords.cpp | 7 ++----- libalee/state.hpp | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'libalee') diff --git a/libalee/corewords.cpp b/libalee/corewords.cpp index 8f903e1..e3ba6b3 100644 --- a/libalee/corewords.cpp +++ b/libalee/corewords.cpp @@ -180,13 +180,10 @@ execute: cell = state.pop(); dcell = cell - state.dict.latest(); if (dcell > (1 << (sizeof(Cell) * 8 - 6)) - 1) { - state.dict.write(cell, - (state.dict.read(cell) & 0x1F) | static_cast(((1 << (sizeof(Cell) * 8 - 6)) - 1) << 6)); state.dict.write(static_cast(cell) + sizeof(Cell), static_cast(dcell)); - } else { - state.dict.write(cell, - (state.dict.read(cell) & 0x1F) | static_cast(dcell << 6)); + dcell = ((1 << (sizeof(Cell) * 8 - 6)) - 1); } + state.dict.write(cell, (state.dict.read(cell) & 0x1F) | static_cast(dcell << 6)); state.dict.latest(cell); break; case 27: // _jmp0 diff --git a/libalee/state.hpp b/libalee/state.hpp index 12a3aeb..e77a223 100644 --- a/libalee/state.hpp +++ b/libalee/state.hpp @@ -25,8 +25,8 @@ #include #include -constexpr unsigned DataStackSize = 16; -constexpr unsigned ReturnStackSize = 16; +constexpr unsigned DataStackSize = 64; +constexpr unsigned ReturnStackSize = 64; class State { -- cgit v1.2.3