As of kernel 0.7.0, KnightOS supports userspace programs written in C.
Currently, C support is very experimental. Support is provided via
kcc is our fork of
sdcc and serves as our C compiler.
scas is our
new assembler and linker, which is compatible with the ASxxxx syntax that SDCC
uses, as well as the classical KnightOS syntax. There are several limitations on
C in KnightOS right now:
We hope to reduce some of these problems as C support matures, but consider yourself warned. Here’s what a simple “Hello world” program looks like in C for KnightOS:
If you’re feeling adventerous enough to give it a try, install kcc and scas and
knightos init --template=c your_project to get started. To get help
and to help us improve C support, join