开发者

Are there any operating systems that have zero C, zero C++ and zero assembly code? [closed]

开发者 https://www.devze.com 2023-01-18 07:41 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_如何学运维 Closed 12 years ago.

If so, please list some of them. Thanks


The operating system on the Symbolics LISP machine was written in LISP. Now you can claim that this was programming in ASM as the machine code on these machines was a limited form of LISP, but it certainly had zero C or C++ code!


The Xerox Star back in 1977 had an operating system called "Pilot", written entirely in Xerox PARCs in-house language Mesa. Additionally, the CAP Computer had an OS written in ALGOL, and the Oberon OS was written the programming language with the same name.


I don't know of any, and you're highly unlikely to find one any time soon. It also depends on what you call an operating system. A lot of people include high-level tools (commonly written in C) such as compilers as part of an operating system, and many of these tools are written in C. Also, most "higher-level" programming languages require use of a compiler/interpreter, which is typically written in C.

You could though, if you wanted to. A bit of hand-written machine code to replace the initialization assembly code, but I really don't know why you'd want to do that!


I agree with all the posters who have offered an answer (except for the guy who suggested this wasn't a valid question - looks very valid to me).

The answer I would like to propose is that, while theoretically possible, it would be extremely cumbersome to a human being and 100% impractical. However, in the near future, machines could write their own OS directly in their machine language with little or no human interaction. This code would have zero lines of code in Assembly, C and C++.


JavaOS was written mostly in Java. But of course it is built atop a virtual machine which in turn is probably implemented using C/C++/Asm.

On the other hand, every programming environment will somehow rely on libraries which are eventually coded in Assembler...


Zero C or C++ is theoretically possible. But as far as I know all Operating Systems are written in a mix of C and ASM.

However, I don't think you can get away with an OS without assembly code since there are some very low level init instructions in all current platforms that you will definitely need to write in assembly code I guess...


You could bit-bang a bootloader with a text editor, but there are very few people who would actually waste their time doing this today when tools like ASM and C/C++ exist.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号