TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

186 点作者 seansh超过 1 年前

4 条评论

nathan_douglas超过 1 年前
Ooh, this is super cool!<p>I love this sort of miniaturization in virtualization. In college, I did an independent study where I created a stack-based VM in C -- designed the ISA, wrote an assembler, etc. It wasn&#x27;t very good, but I was able to write simple programs and run them. It felt like magic to me. I wrote a Sudoku solver in MIPS assembly [1] a while before that, and I wanted to port it over but I was missing some features. And now that&#x27;s gone. #LikeTearsInRain<p>I haven&#x27;t really revisited virtualization. Sad thing about my career is that I don&#x27;t really get to spend half my time working on indendependent study.[2] All of my side projects tend to just be spurts of inspiration that fizzle out quickly.<p>Anyway, I&#x27;m gonna dig into this. It looks awesome!<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;ndouglas&#x2F;MIPS-Sudoku-Solver&#x2F;blob&#x2F;main&#x2F;mips-sudoku-solver.asm">https:&#x2F;&#x2F;github.com&#x2F;ndouglas&#x2F;MIPS-Sudoku-Solver&#x2F;blob&#x2F;main&#x2F;mip...</a><p>[2] &quot;I&#x27;ve been in the private sector. They expect results.&quot; – Dr. Raymond Stantz
seansh超过 1 年前
There&#x27;s a very interesting C interpreter&#x2F;compiler there [1]. From the header:<p>&quot;c is the c compiler. It takes a single source file and creates an executable file or else executes the compiled code immediately. The compiler does not reach full standards compliance, so some programs need minor adjustment.<p>There is no preprocessor, although the #include keyword is allowed supporting a single level of file inclusion.&quot;<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;rswier&#x2F;swieros&#x2F;blob&#x2F;master&#x2F;root&#x2F;bin&#x2F;c.c">https:&#x2F;&#x2F;github.com&#x2F;rswier&#x2F;swieros&#x2F;blob&#x2F;master&#x2F;root&#x2F;bin&#x2F;c.c</a>
评论 #38892527 未加载
评论 #38893315 未加载
评论 #38892189 未加载
sitkack超过 1 年前
See also <a href="https:&#x2F;&#x2F;github.com&#x2F;cksystemsteaching&#x2F;selfie">https:&#x2F;&#x2F;github.com&#x2F;cksystemsteaching&#x2F;selfie</a>
wtracy超过 1 年前
Reminds me of one of my project ideas that will probably never happen: Build a mini bare-metal Minecraft clone and then build a CPU inside it capable of self-hosting the whole thing.