4 ms·
"token-threaded" Forth, which instead of storing direct execution addresses for each instruction in a Forth word executes using smaller tokens which are looked
by userbinator 2y ago
"token-threaded" Forth, which instead of storing direct execution addresses for each instruction in a Forth word executes using smaller tokens which are looked up instead. This exchanges the cost of an indirect lookup in a table for substantially greater code density.
In other words, like a bytecode VM?
The "ROM" at IC11 is actually an 8K 150ns static RAM, an NEC D4364C with specific support for battery backup. The service manual calls this the SV-RAM. This is what the CR2032 battery powers at the southeast (lower right) corner.
A CR2032 is surprising for a computer from 1987, given that AFAIK PC mobos didn't have them until the 90s at the earliest.
- classichasclass 2y ago(author) > In other words, like a bytecode VM? Kind of, but it's still Forth of the era, so it's still threaded execution. You're still jumping from execution address to execution address (either native 68000 code or another set of Forth words heralded by a JMP to the nesting subroutine); you just have a layer of indirection by having to look them up in the token table first.
- p_l 2y agoForth style threaded code was used not just for Forth - it was popular strategy for implementing higher level languages at one point, especially to reduce size of resulting binaries. Funnily enough, some later more advanced compiler systems could be considered to have bits resembling that in code generation, with Virtual OPerations that abstracted CPU instructions (often more than one). And indeed, threaded interpreters are one of the efficient ways to implement VMs in resource constrained setups.
- datpiff 2y ago> A CR2032 is surprising for a computer from 1987, given that AFAIK PC mobos didn't have them until the 90s at the earliest. Nintendo Famicom cartridges started using them the same year, 87. PCs probably didn't need the space-saving advantage until a few years later.
- abruzzi 2y agoYamaha used a CR2032 with legs as battery backup for sounds in most of their synthesizers starting at least with the DX7 that launched in 1983. So there is precedent.
- deleted 2y ago[deleted]