Home > Root > Log book > More about compilers

More about compilers

Thursday 2 February 2023, by Mathieu Brèthes

All the versions of this article: [Deutsch] [English] [français]

In my previous post I wrote about my documentation research on other compilers. I checked SmallC more closely and I think it won’t be adapted to my project for the following reasons:

  • it has been closely designed for the Z80, and in particular it does not have a dynamic register allocator, which means it won’t make good code for the TLCS900H and its 20 registers
  • it only compiles a subset of C, missing are structures, 2D arrays...
  • it does not support long integers, and the standard int type is only 16 bit
  • it does not support unsigned integers

This means well I won’t use it. And I’ll actually say something opposite of what I wrote in my previous post, inso that GCC is actually very well documented. It’s just that it requires a very technical vocabulary to understand all this. But if I find a good tutorial...

First and foremost tho, I think I should do a test assembly program for the TLCS900H to learn the language of this machine. It is probably hard to get started with a compiler project, without knowing the architecture of the processor for which we create a program! So I guess I’ll move this project aside for now...