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
20082026
-
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 -
…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]…
comment by seansh · 2024-01-06 · in A tiny hand crafted CPU emulator, C compiler, and Operating System -
…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
comment by seansh · 2024-01-06 · in A tiny hand crafted CPU emulator, C compiler, and Operating System -
▲ 186
A tiny hand crafted CPU emulator, C compiler, and Operating Systemstory by seansh · 2024-01-06 · 10 comments
-
…(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 -
…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 -
▲ 2
Swieros: A tiny hand crafted CPU emulator, C compiler, and Operating Systemstory by peter_d_sherman · 2018-09-10 · 0 comments
-
…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
comment by rswier · 2017-03-03 · in Selfie: tiny self-compiling C compiler, MIPS emulator and MIPS hypervisor -
…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 -
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
comment by lamacase · 2014-11-17 · in Xv6 – A Simple Unix-Like Teaching Operating System -
…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
comment by fernly · 2014-11-05 · in Swieros: A tiny hand crafted CPU emulator, C compiler, and Operating System -
▲ 14
Swieros: A tiny hand crafted CPU emulator, C compiler, and Operating Systemstory by adamnemecek · 2014-11-04 · 1 comment
-
…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