Hacker GitHub

← All repos

rswier/swieros

View on GitHub ↗ ★ 1,121 C

A tiny hand crafted CPU emulator, C compiler, and Operating System

13 mentions on Hacker News by 10 people: 3 stories, 10 comments · first 2014-11-04 · latest 2025-03-22

Mentions per year 13 mentions · busiest year 2014 (4)
20082026
  1. https://github.com/rswier/swieros is a cool project that uses it's own VM (with a C compiler included). I was surprised by all the capabilities it has.
    comment by PhilipRoman · 2025-03-22 · in The little book about OS development
  2. …seems much more extensive and even includes #define as the other comment mentioned and va_args. [1] https://github.com/rswier/swieros/blob/master/root/bin/c.c [2] https://github.com/rswier/c4/blob/master/c4.c [3]…
  3. …although the #include keyword is allowed supporting a single level of file inclusion." [1] https://github.com/rswier/swieros/blob/master/root/bin/c.c
  4. …(like GCC or JIT compilers, for example). But there's a more realistic compiler inside swieros: https://github.com/rswier/swieros/blob/master/root/bin/c.c that emits actual "binaries" for the emulated toy CPU. It's hard to tell what…
    comment by tom_mellior · 2019-10-10 · in Small C Compilers
  5. …very readable and simple code. I recommend trying out swieros as well “a tiny Unix like kernel”: https://github.com/rswier/swieros
    comment by codezero · 2019-10-10 · in Small C Compilers
  6. …seems to fill a niche between c4 and my other more full featured compiler/os swieros. Very cool! https://github.com/rswier/swieros/blob/master/00README.txt
  7. …in looking at a compiler and OS mostly from scratch based on C check this out. It's pretty amazing. https://github.com/rswier/swieros It comes from the author of the c4 compiler. (Interpreter?)
    comment by codezero · 2015-07-07 · in Project Oberon
  8. The guy who did the C4 compiler also has a more fully featured one that does support structures: https://github.com/rswier/swieros/blob/master/root/bin/c.c It's part of an OS he's building based on xv6
  9. …or its derivation, how much is borrowed and how much original, and generally why it exists. [0] https://github.com/rswier/swieros/blob/master/00README.txt
  10. …other C compiler in his Github account, which does have better variable names and some comments. https://github.com/rswier/swieros/blob/master/root/bin/c.c
    comment by mappu · 2014-11-04 · in C4 – C in 4 functions