In Part 1, I explained why my Scheme interpreter, Schetoo, has the ability to fail or restart any instruction. In Part 2, I showed how it automatically checks that instructions do all necessary checks before they have any side effects. Those two posts described raising exceptions with longjmp, but didn’t really explain how the interpreter catches exceptions.
Posts Tagged ‘computers’
Posted by kernelbob on January 4, 2011
Posted by kernelbob on January 3, 2011
Posted by kernelbob on January 2, 2011
In the first half of 2010, I wrote a Scheme interpreter which I called Schetoo. It is a sequel to an interpreter called kbscheme, which I worked on off-and-on in 2008 and 2009. Both are written in C.
I undertook these projects to learn more about Scheme, interpreters, and garbage collection. Along the way, I came up with an interesting technique to make interpreter implementation less error-prone. That’s what I want to write about today.
Posted by kernelbob on November 15, 2009
I got to work on my Scheme interpreter this weekend. Real life had interfered for about three weeks straight.
Posted by kernelbob on June 25, 2008
That was a load of fun. I finished all the class projects in The Elements of Computing Systems. The projects got more involved as they got higher-level.
Posted by kernelbob on June 9, 2008
First, I told all my friends about this textbook. Last night, I started doing the exercises. I’ve done about half the course now, including all the hardware sections. It’s been a lot of fun. I’ve never designed a CPU before, and it was fun seeing how all the pieces fit together.
The machine the class uses has a weird architecture. It’s definitely more pedagogical than useful. For example, there are no shift instructions. It reminds me of the old bit slice processors — the instruction set is a lot like microcode.
Posted by kernelbob on June 7, 2008
If you haven’t seen this, you should go see it.
From NAND Gates to Tetris in 14 Weeks.
It’s an undergraduate class that starts by building simple logic circuits, uses those to build sequential circuits, then registers, CPUs, VMs, compilers, OSes, and applications. Every project builds on the last one, and at the end, the student has a game (Tetris) every part of which he has constructed himself, down to the NAND gates. Okay, not really, but he’s been exposed to every level of technology and should have good comprehension of how each layer is implemented.
The whole textbookSelected chapters of the book, the problem sets, the simulator software, and the unit tests are available free at the above URL.
Pretty amazing stuff!