Abstract
A fast-paced dive into the rudiments of virtual machine and emulator implementation. If you’ve played games or worked in any one of a number of popular programming languages you’re likely to have relied on a software machine written by a small but dedicated team of virtual machine enthusiasts. And unless you’ve taken a course in programming language implementation you probably have only a loose idea of what software machines are, how they work, or how easy it is to write your own. My interest in this field was sparked during the era of home micros when I chanced upon an article in a programming magazine on how to implement Forth in Basic. That article with its inscrutable magic became an obsession that lead to a career in coding and much else beyond. In this fast-paced introduction I’ll use code written in C and Go to explain the basic building-blocks with which we can model computing machines in software, covering as many of the main architectural features as possible in the time: stacks; heaps; dispatchers; clocks; registers; instruction sets. This talk contains a lot of code (including some mildly gnarly C) but regardless of you current skill level it will reveal a little of the magic underneath many of the tools you probably use daily. The examples should also be sufficient to kickstart your own adventures in this fascinating field.