System programming language explained

A system programming language is a programming language used for system programming; such languages are designed for writing system software, which usually requires different development approaches when compared with application software. Edsger Dijkstra referred to these languages as machine oriented high order languages, or mohol.[1]

General-purpose programming languages tend to focus on generic features to allow programs written in the language to use the same code on different computing platforms. Examples of such languages include ALGOL and Pascal. This generic quality typically comes at the cost of denying direct access to the machine's internal workings, and this often has negative effects on performance.

System languages, in contrast, are designed not for compatibility, but for performance and ease of access to the underlying computer hardware while still providing high-level programming concepts like structured programming. Examples include Executive Systems Problem Oriented Language (ESPOL) and Systems Programming Language (SPL), both of which are ALGOL-like in syntax but tuned to their respective platforms. Others are cross-platform software, but designed to work close to the hardware, like BLISS, JOVIAL, and BCPL.

Some languages straddle the system and application domains, bridging the gap between these uses. The canonical example is C, which is used widely for both system and application programming. PL/I was an early example. Some modern languages also do this such as Rust and Swift.

Features

In contrast with application languages, system programming languages typically offer more-direct access to the physical hardware of the machine: an archetypical system programming language in this sense was BCPL. System programming languages often lack built-in input/output (I/O) facilities because a system-software project usually develops its own I/O mechanisms or builds on basic monitor I/O or screen management facilities. The distinction between languages used for system programming and application programming became blurred over time with the widespread popularity of PL/I, C and Pascal.

History

The earliest system software was written in assembly language mostly because no alternative existed, but also for reasons including efficiency of object code, compiling time, and ease of debugging. Application languages such as FORTRAN were used for system programming, although they usually still required some routines to be written in assembly language.[2]

Mid-level languages

Mid-level languages "have much of the syntax and facilities of a higher level language, but also provide direct access in the language (and often an assembly language) to machine features."[2] The earliest of these was ESPOL on Burroughs mainframes in about 1960, followed by Niklaus Wirth's PL360 (first written on a Burroughs system as a cross compiler), which had the general syntax of ALGOL 60 but whose statements directly manipulated CPU registers and memory. Other languages in this category include MOL-360 and PL/S.

As an example, a typical PL360 statement is R9 := R8 and R7 shll 8 or R6, signifying that registers 8 and 7 should be and'ed together, the result shifted left 8 bits, the result of that or'ed with the contents of register 6, and the final result placed into register 9.[3]

Higher-level languages

While PL360 is at the semantic level of assembly language, another kind of system programming language operates at a higher semantic level, but has specific extensions designed to make the language suitable for system programming. An early example of this kind of language is LRLTRAN,[4] which extended Fortran with features for character and bit manipulation, pointers, and directly addressed jump tables.

Subsequently, languages such as C were developed, where the combination of features was sufficient to write system software, and a compiler could be developed that generated efficient object programs on modest hardware. Such a language generally omits features that cannot be implemented efficiently, and adds a small number of machine-dependent features needed to access specific hardware abilities; inline assembly code, such as C's statement, is often used for this purpose. Although many such languages were developed,[1] C and C++ are the ones which survived.

Major languages

Language Originator Birth date Influenced by Used for
1960 Many systems, mostly military
1961 MCP
1964 ALGOL, FORTRAN, some COBOL Multics, Stratus VOS. Dialects used in PRIMOS, IBM CPF, IBM OS/400.
1960s OS/360 and successors
1966 Edinburgh Multiple Access System
1967 Xerox Alto Executive, TRIPOS
1968 ALGOL 60 ALGOL W
1970 Apollo AEGIS, MacApp, UCSD p-System, VAXELN, Lisa OS, PERQ OS
1970 ALGOL, PL/I[5] OpenVMS (portions), Hydra
Language for Systems Development (LSD or LSyD) R. Daniel Bergeron, et al. (Brown University) 1971
1972 Many operating system kernels, including most Unix-like systems; SQLite
System Programming Language (SPL) 1972 HP 3000 system software, including MPE
1973 CP/M, ISIS, iRMX
Burroughs 1970s ESPOL, ALGOL MCP
1970s compiler development, AIX (versions 1 and 2 only), IBM mainframe firmware
1970s CP-6
1970s NOS subsystems, most compilers, FSE editor
Transaction Application Language (TAL) 1970s NonStop OS
1976 Pilot, GlobalView
1978 Medos-2, portions of IBM OS/400 and PRIMOS. Modula-2+ variant used in ARX, Topaz.
C++1979 BeOS, Haiku, Serenity OS, Symbian. Portions of IBM i, macOS, Microsoft Windows.
1980s ICL VME
Jean Ichbiah, S. Tucker Taft 1983 Military,[6] aerospace[7] mass transportation, high-integrity computation, operating system kernels,[8] [9] [10] iMAX 432, BiiN/OS
1987 Oberon System
1988 SPIN
2001
Andreas Rumpf 2008
2009 Kubernetes, Docker
Mozilla Research[11] 2010 Servo, RedoxOS. Portions of the Linux kernel and of Microsoft Windows.
2014 macOS, iOS, watchOS, and tvOS app development
ZigAndrew Kelley2016C, C++, LLVM IR, Go, RustBun, TigerBeetle, Mach engine,[12] Ghostty
MojoModular Inc.[13] 2023C, C++, Python, Rust, Swift, Zig

See also

External links

Notes and References

  1. van der Poel . W. L. . Maarssen . L. A. . 27–31 August 1973 . Machine oriented higher level languages . IFIP Working Conference on Machine Oriented Higher Level Languages (MOHL) . International Federation for Information Processing . Trondheim, Norway. Proceedings published 1974.
  2. Sammet . Jean . October 1971 . Brief Survey of Languages Used for Systems Implementation . ACM SIGPLAN Notices . 6 . 9 . 1–19 . 10.1145/942596.807055 . free.
  3. Wirth . Niklaus . Niklaus Wirth . 1968 . PL360, A Programming Language for the 360 Computers . Journal of the ACM . 15 . 1 . 37–74 . 10.1145/321439.321442.
  4. Mendicino . Sam F. . Hughes . Robert A. . Martin . Jeanne T. . McMahon . Frank H. . Ranelletti . John E. . Zwakenberg . Richard G. . The LRLTRAN Compiler . Communications of the ACM . 1968 . 11 . 11 . 747–755. 10.1145/364139.364154.
  5. Wulf . W. A. . Russell . D. B. . Haberman . A. N. . BLISS: A Language for Systems Programming . Communications of the ACM . December 1971 . 14 . 12 . 780–790 . 10.1145/362919.362936 . 10.1.1.691.9765.
  6. Web site: Case Study, BAE Systems Eurofighter Typhoon.
  7. Web site: What programming languages are used for equipment onboard aircraft?.
  8. Web site: Ironclad.
  9. Web site: M2OS. RTOS with simple tasking support for small microcontrollers.
  10. Web site: Jgrivera67/HiRTOS . GitHub.
  11. Web site: Mozilla Research Projects . https://web.archive.org/web/20140104070627/https://www.mozilla.org/en-US/research/projects/ . 2014-01-04 . dead.
  12. Web site: Mach: Zig game engine & graphics toolkit.
  13. Web site: Modular Inc.. . 2024-03-25 . www.modular.com . en.