Bytecode interpreters are so interesting because they are so low level and therefore so powerful. An example that probably everyone knows is Steve Wozniak’s SWEET16 - an interpreter that enabled 16-bit operations on 8-bit CPUs.
Yet a bytecode interpreter is just a set of additional instructions on top of an existing instruction set. But the space of possibilities on machine code level is extended almost arbitrarily. On limited CPUs you can easily create your own ISA extensions, use memory as additional registers, implement preemptive scheduling with a simple switch after each instruction or realize any other form of magic. 🧙
Curious? Then you should definitely take a look at this article.
What Kragen Javier Sitaker has put together here is definitely a long read.
But the content is as good and compressed as the bytecode that will come out of your brain afterwards. I feel ideas coming …
Read the full newsletter Issue #38 of 8bitnews.io: BASIC in JS
Don't want to miss updates like that? Subscribe below and receive regular content that we only share with our subscribers.