您只能使用汇编语言制作操作系统吗?

发布于 2025-02-09 05:11:10 字数 1551 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤单情人 2025-02-16 05:11:10

正确但无用的答案是 - 是的,这是可能的。 C/C ++的任何事情都可以做到。如果您的下一个问题是 - 如何,唯一可能的答案是“阅读一本书”。这是一个小问题,书本长度答案。是的,您可以在C/C ++中进行编码的任何内容,您也可以在汇编中代码...但是它将需要您10倍的时间,尤其是在调试中。

除此之外,将工作操作系统放在组装中将是比建立交叉汇编更复杂和耗时的数量级。如果这对您来说是一个挑战,也许您还不应该解决整个操作系统。

The correct but useless answer is - yes, it's possible. Anything C/C++ does, assembly can do, too. If your next question is - how, the only possible answer would be "read a book". This is a small question with a book length answer. Yes, anything you can code in C/C++ you can also code in assembly... but it will take you 10 times longer, especially with debugging.

That aside, putting together a working OS in assembly will be an order of magnitude more complicated and time consuming than setting up cross compilation. If that is a challenge for you, maybe you shouldn't tackle a whole OS just yet.

邮友 2025-02-16 05:11:10

是的。确实,这曾经在UNIX之前常见,它在跨体系结构中引入了操作系统的可移植性。诸如数字设备之类的操作系统 rsx-111 是在汇编器中写的。一个有些著名的学术例子是Alexia Massalin的1992年 >,一个具有UNIX兼容层的小内核。它是用摩托罗拉68020组装写的,代表了针对高级语言OS的小反叛。它的时间很快。

Yes. Indeed, this used to be common before Unix which introduced portability of operating systems across architectures. Operating systems like Digital Equipment's RSX-11 were written in assembler. A somewhat famous academic example is Alexia Massalin's 1992 Synthesis kernel, a small kernel with a Unix compatibility layer. It was written in Motorola 68020 assembly and represented a minor rebellion against high level language OSes. It was very fast for its time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文