We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
正确但无用的答案是 - 是的,这是可能的。 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.
是的。确实,这曾经在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.