Minimum Stack Machines for Forth
Created on 2022-09-26T02:33:11-05:00
Look at F21 as an example. It has 2ns stack access and compare that to its 40ns to 140ns access to DRAM or its 18ns access to SRAM. We think of stacks as being smaller, cheaper, and faster than general purpose registers because that's what they are in our designs. Consider how different stacks are in Forth and "C" by noting that the MuP21 had a total of ten cells in its two stacks. Chuck wrote that it was about the minimal size to allow one to write good Forth code. Compare that to the bug report I found in Bugzilla for GCC bugs. "C" programmers complained that there was bug in their compiler when you specified stack frames larger than 4 gigabytes!
Ten cells is considered the minimum needed to write good Forth code (Moore.)