Hello everyone,
I've been working for quite some time on a small systems programming language and compiler called P32.
The project targets:
- x86 32-bit
- native code generation
- no runtime
- no garbage collector
- Pascal-inspired syntax
- low-level/system programming
The compiler currently generates x86 code directly through an internal IR/backend pipeline.
The language intentionally stays simple and explicit:
- manual memory management
- structured types
- pointers
- procedural types
- inline assembler
- separate compilation planned
- no hidden behavior/syntax sugar
Current work mainly focuses on:
- integrated assembler
- testing and stabilization
- object file emitters (COFF/ELF)
- diagnostics/documentation
One thing I'm particularly interested in is feedback from people who have already written compilers, kernels or low-level tooling:
- what were your biggest mistakes in backend/codegen design?
- what usually becomes painful during large-scale compiler testing?
- what optimization passes brought the best value/complexity ratio for small compilers?
The project is not open-source yet, but I’m considering publishing it once the testing phase is mature enough.
I'd be happy to discuss architecture/design choices with other OS developers.