TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: A 3K Posix bootstrap kernel written in hex

5 pointsby rmastersabout 3 years ago

1 comment

rmastersabout 3 years ago
This project compliments the stage0 project (featured on the HN front page earlier today) which builds a C compiler using an assembler that is bootstrapped from hex. However, those bootstraps require an existing kernel. You are required to provide your own. I decided, as a challenge, to build a tiny purpose-built x86 32-bit kernel which can run the stage0-posix shells and compilers all the way to the M2-Planet compiler, which is a subset of C. I learned (after starting) that they plan on writing a bootstrap kernel themselves, so I hope this helps in some way. It took three months of very tedious and error-prone work because I avoided, on principle, using an assembler except to check the encoding of individual opcodes. (All jump offsets were hand calculated.) Please see github.com/ironmeld/builder-hex0 for it's history.