Table of Contents

TinyC-1

This page is about bootstrapping TinyC-1, a typical bootstrapping C compiler, in assembly language, on your own custom architecture – in this case, the SD-8516

The Plan

Well, I wrote the SD-8516, I spent a long time trying to implement BASIC on it, and then I did Forth. Forth was a lot easier than BASIC. In any case I learned quite a bit, and I think i'm up to the task of tackling C now. Pound for pound, it is not terribly difficult as long as you start with some very basic goals.

  int main(void) { return 0; }

The first goal is simply to compile int main(void) { return 0; } and iterate from there. This at first glance seems simple, but if you attempt to do it “seriously” it may suddenly seem not-so-simple. But, it is. You just have to lay it all out. Right?

The REPL

Based on BASIC's. Its not intended to be a language. This way is very easy for me to add new commands.