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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: OSle – A 510 bytes OS in x86 assembly

160 点作者 shikaan14 天前
(sorry about double posting, I forgot to put Show HN in front in the original <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43863689">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43863689</a> thread)<p>Hey all, As a follow up to my relatively successful series in x86 Assembly of last year[1], I started making an OS that fits in a boot sector. I am purposefully not doing chain loading or multi-stage to see how much I can squeeze out of 510bytes.<p>It comes with a file system, a shell, and a simple process management. Enough to write non-trivial guest applications, like a text editor and even some games. It&#x27;s a lot of fun!<p>It comes with an SDK and you can play around with it in the browser to see what it looks like.<p>The aim is, as always, to make Assembly less scary and this time around also OS development.<p>[1]: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41571971">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41571971</a>

9 条评论

nathell14 天前
Some related stuff:<p>In 2004, Gavin Barraclough’s mini-OS [0] won the IOCCC, packing a 32-bit multitasking operating system for x86 computers, with GUI and filesystem, support for loading and executing user applications in ELF binary format, with PS&#x2F;2 mouse and keyboard drivers, VESA graphics, a command shell, and an application into 3.5 KB of highly obfuscated C code.<p>In 2021, Justine Tunney wrote SectorLISP [1], a Lisp implementation that fits into a bootsector and is able to run McCarthy’s metacircular evaluator.<p>[0]: <a href="https:&#x2F;&#x2F;www.ioccc.org&#x2F;2004&#x2F;gavin&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;www.ioccc.org&#x2F;2004&#x2F;gavin&#x2F;index.html</a> [1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;jart&#x2F;sectorlisp">https:&#x2F;&#x2F;github.com&#x2F;jart&#x2F;sectorlisp</a>
90s_dev14 天前
Two questions:<p>1. I just saw how str_print is implemented. It&#x27;s so short even though it&#x27;s asm. Is this why nul-terminated strings were so popular and became the default in C? Would pascal strings be much longer&#x2F;uglier&#x2F;harder in asm?<p>2. Why is str_print repeated in multiple files? How would you do code sharing in asm? I assume str_print is currently not &quot;static&quot; and you&#x27;d have to make it so via linking or something, and then be able to get its address using an asm macro or something?
评论 #43869410 未加载
评论 #43869417 未加载
mycatisblack14 天前
Very cool! I have to ask: what would the total size be if the package included the bios functions?<p>Also: what could be done if the size limit were 8kbyte like the mask-rom bios days?<p>Thanks for pointing me towards the bosh emulator.
评论 #43867625 未加载
评论 #43868185 未加载
djaychela14 天前
I have a more general question - what is the minimum that is needed to qualify as an operating system? Is there something agreed on generally? Searching operating system minimum requirements leads to the wrong kind of info for me....
评论 #43878174 未加载
musicale13 天前
BIOS is underrated. Basically the driver portion of a DOS- (or CP&#x2F;M)-like operating system. As demonstrated, you don&#x27;t need to add too much to it (program loader, simple file system, maybe a command shell and system utilities if you are ambitious) to get a functional mini-DOS.
yjftsjthsd-h14 天前
Well that&#x27;s cool. Does the name stand for something?
评论 #43867440 未加载
fuzzfactor14 天前
On projects like this, where the IMG is small enough, I would think it was ideal to include osle.img with the zip.
sim7c0014 天前
cool stuff, like you still fit quite a bit in there too, 510 bytes can be tricky.<p>if you want an ahci controller to &#x27;see&#x27; it, it will need partition table too, which will make it even less bytes (or maybe cleverly encoded)
评论 #43867516 未加载
评论 #43867564 未加载
revskill14 天前
All professors should be doing this decades ago right ?
评论 #43872414 未加载