|
|
|
|
|
by jdswain
2 days ago
|
|
I also had the goal of self hosting, and that is working, although I have made it a little easier on myself by extending the 65C816 in some small ways. The most significant for the compiler is a small extension to the registers so that the direct page and stack can be located anywhere in memory. This is primarily to allow larger operating system and app images, the compiler is quite large now so it needs this. I have a limit of 64k for each module. One breakthrough in the compiler was when I could start to use AI to interpret instruction traces, before that I was doing it by hand and it took a very long time. Now the AI pinpoints my errors very quickly, although I'm past that stage now and don't often come across compiler errors. I do this with an emulator, also written in Oberon. |
|
So I uplifted it to a full boat ‘816 core. Once I had that, compiler development accelerated since the testing was much better. The AI and unit tests could generate the code, run the code, and analyze CPU state and memory.
Real game changer.
My proto compiler is in Java, but not idiomatic Java by any means. It’s limited to static allocation and constructs available in the new language to make porting it later, ideally, mostly mechanical.