C 之前用于操作系统开发的语言
我知道 C 是操作系统开发的标准编程语言,但出于好奇,我想知道它之前是什么。在 C 之前,用于操作系统开发的主要编程语言是什么?
I know that C is the standard programming language for operating system development, but out of curiosity I was wondering what preceded it. What was the main programming language used for operating system development before C?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
在 C 被用于 Unix 之前,有很多系统(1969 年......)。 这是一个稀疏的时间线。单击每个系统以获取详细信息。大多数早期的系统都是用汇编程序实现的。一个值得注意的例外(未在时间轴中列出)是超前的 1961 年 B5000带有用 ALGOL 编写的操作系统。
There were a lot of systems before C was used for Unix (1969...). Here's a sparse timeline. Click on each system for details. Most early systems would be implemented in assembler. A notable exception (not listed in the timeline) was the ahead-of-its-time 1961 B5000 with an O/S written in ALGOL.
Burroughs 是最早使用汇编程序以外的工具进行操作系统开发的人之一。他们选择了大陵五方言。
1965年Multics(Project MAC,由ARPA资助)设计开始,并选择PL/I来开发操作系统。 1969 年,Multics 在麻省理工学院开放使用,但由于遭遇挫折,贝尔实验室退出了 MAC 项目。 Ken Thompson、Dennis Ritchie、Doug McIlroy 和 JF Ossanna 继续寻求圣杯,Unics(后来的 Unix)开发开始了。
Multics 历史
Multics 失败?
Unix 与 Multics >
Burroughs was one of the first to use something other than assembler for OS development. They chose a dialect of Algol.
In 1965 Multics(Project MAC, funded by ARPA) design began and PL/I was chosen to develop the OS. In 1969 Multics was opened for use at MIT, but there were frustrations and Bell Labs withdrew from Project MAC. Ken Thompson, Dennis Ritchie, Doug McIlroy, and J. F. Ossanna continued to seek the holy grail and Unics (later Unix) development began.
Multics History
Multics Failure?
Unix v. Multics
在 1970 年代的“冷战”期间,人们尝试使用 ALGOL 68 的数据安全性和并行处理功能来创建 基于安全/功能的操作系统:
剑桥 CAP 计算机 - 所有过程构成操作系统的程序是用 ALGOL 68C 编写的,尽管许多其他密切相关的受保护程序 -例如分页器 - 用 BCPL 编写。 参考微软
Flex 机器 - 硬件是定制的、可微编程的,带有操作系统、(模块化)编译器、编辑器、垃圾收集器和文件系统,全部用 Algol 68RS 编写。该Algol68RS的Linux端口可以从编译下载,可以从Sourceforge:algol68toc下载。
/* 有趣的是 DRA 代数指定的抽象机 Ten15 仍然可用,也来自 Sourceforge:TenDRA(用于 minux)。 Ten15 是 DRA 编译器的中间语言,并不断发展以支持 C 和 Ada。显然有人尝试使用 FreeBSD/Unix 进行移植/en.wikipedia.org/wiki/TenDRA" rel="nofollow noreferrer">TenDRA C 编译器 */
ICL VME - S3 编程语言 是 < a href="http://en.wikipedia.org/wiki/operating_system" rel="nofollow noreferrer">操作系统 VME。 S3 基于 ALGOL 68,但数据类型和运算符与 ICL 2900 系列。该操作系统仍在用作 Linux VM,并拥有大约 100,000 个用户。
苏联时代的计算机 Эльбрус-1 (Elbrus-1) 和 Эльбрус-2是使用高级语言 uЭль-76 (AL-76) 创建的,而不是传统的组装。 uЭль-76 类似于 Algol-68,主要区别在于 uЭль-76 在硬件级别支持的动态绑定类型。 uЭль-76 用于应用程序、作业控制、系统编程 cf e2k-spec。
也许美国军方也在某个地方做类似的事情。有人吗?
During the 1970's "Cold War" there was an effort to use the data security and parallel processing features of ALGOL 68 to create Secure/Capability based operating systems:
Cambridge CAP computer - All procedures constituting the operating system were written in ALGOL 68C, although a number of other closely associated protected procedures - such as a paginator - are written in BCPL. c.f. microsoft
Flex machine - The hardware was custom and microprogrammable, with an operating system, (modular) compiler, editor, garbage collector and filing system all written in Algol 68RS. A Linux port of this Algol68RS can be downloaded from compile can be downloaded from Sourceforge:algol68toc.
/* Interestingly portions of DRA's algebraically specified abstract machine Ten15 is still available, also from Sourceforge:TenDRA (for minux). Ten15 serves as DRA's intermediate language for compilers, and evolved to support C and Ada. Apparently an attempt was made to port FreeBSD/Unix using the TenDRA C compiler */
ICL VME - S3 programming language was the implementation language of the operating system VME. S3 was based on ALGOL 68 but with data types and operators aligned to those offered by the ICL 2900 Series. This OS is still in use as a Linux VM, and has some 100,000 users.
The Soviet Era computers Эльбрус-1 (Elbrus-1) and Эльбрус-2 were created using high-level language uЭль-76 (AL-76), rather than the traditional assembly. uЭль-76 resembles Algol-68, The main difference is the dynamic binding types in uЭль-76 supported at the hardware level. uЭль-76 is used for application, job control, system programming c.f. e2k-spec.
Maybe the US military was doing something similar somewhere. Anyone?
有许多 16 位 Forth 系统,其中解释器和(相当原始的)操作系统层都是用 Forth 编写的。
最初的 Mac 操作系统是用 68k ASM 和稍微扩展的 Pascal 混合编写的。
ADA 已被用来编写多种操作系统。
但我猜测,在 C 之前用于操作系统开发的主导语言是 IBM 360 汇编语言。
There were many 16-bit Forth systems where the interpreter and (fairly primitive) OS layer were written in Forth.
The original Mac OS was written in a mix of 68k ASM and a slightly extended Pascal.
ADA has been used to write several OS's.
But I'd guess that the dominant language used for OS development prior to C was IBM 360 assembly language.
这要看情况。例如,Amiga OS 最初在一定程度上是用 BCPL 编写的,您可以想象许多古老的操作系统是用纯汇编语言编写的。
CP/M(MS-DOS 的前身)是用 PL/M 编写的,但出于性能原因,MS-DOS 是用汇编语言编写的。以下是 MS-DOS 上的内容: http://www.patersontech.com/Dos/ Byte/InsideDos.htm
(已编辑,不确定我在哪里找到了这个 Fortran 垃圾。)
That depends. The Amiga OS for example was originally written to a certain extent in BCPL, and you would imagine that many ancient operating systems were written in pure assembly language.
CP/M (which is kind of MS-DOS' predecessor) was written in PL/M, but MS-DOS was written in assembly for performance reasons. Here is something on MS-DOS: http://www.patersontech.com/Dos/Byte/InsideDos.htm
(Edited, not sure where I picked up this Fortran garbage.)
操作系统“希望”用汇编程序编写。如果您从头开始,一旦完成了中断例程,您就可以继续前进,而不必绕过高级语言接口。
此外,组装商喜欢不断发展。一旦您了解了指定的指令集,就可以方便地为具有多种用途的指令添加别名。接下来是可以为几个机器指令起别名的伪指令。然后,最好有一个可扩展的工具来编写宏子例程,以生成看起来像指令的任意代码部分。 (与 C 宏不同,这通常可以允许流程控制和类似脚本的编程。)然后,有范围规则来确保标识符仅在特定上下文中使用。
语言一点一点地演变。 C并不是凭空出现的。它之前有一代或两代语言(Algol、BCPL )从高级汇编程序演变而来。许多特定于平台的汇编语言实际上相当不错。 IBM 的汇编程序仍然很差劲。 (当然,在那之前是不太好的汇编程序,更早的是打孔卡和拨动开关。)
最近,GNU as 因相对原始而给汇编带来了一些坏名声 。 。不过,不要相信恐吓策略。
Operating systems "want" to be written in assembler. If you're starting from scratch, once you have the interrupt routines done, you can just keep on going and not get around to a high-level language interface.
Furthermore, assemblers like to evolve. Once you've covered the specified instruction set, it's convenient to add alias names for instructions that serve multiple purposes. Next come pseudo-instructions that can alias a couple machine instructions. Then it's nice to have an extensible facility for writing macro subroutines, to generate arbitrary sections of code that look like instructions. (Unlike C macros, this often may allow flow control and script-like programming.) Then, there are scoping rules to ensure identifiers are only used in a particular context.
Bit by bit, languages evolve. C didn't pop out of thin air. It was preceded by a generation or two of languages (Algol, BCPL) that evolved from high-level assemblers. Many platform-specific assembly languages were in fact reasonably nice. IBM still makes a mean assembler. (Of course, before that were not-so-nice assemblers, and before that were punch cards and toggle switches.)
More recently, GNU
as
has given assembly a bit of a bad name by being relatively primitive. Don't believe the scare tactics, though.