This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "System programming language" – news ·newspapers ·books ·scholar ·JSTOR(April 2022) (Learn how and when to remove this message) |
Asystem programming language is aprogramming language used forsystem programming; such languages are designed for writingsystem software, which usually requires different development approaches when compared with application software.Edsger Dijkstra referred to these languages asmachine oriented high order languages, ormohol.[1]
General-purpose programming languages tend to focus on generic features to allow programs written in the language to use the same code on differentcomputing platforms. Examples of such languages includeALGOL andPascal. 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 underlyingcomputer hardware while still providinghigh-level programming concepts likestructured programming. Examples includeExecutive Systems Problem Oriented Language (ESPOL) andSystems Programming Language (SPL), both of which are ALGOL-like insyntax but tuned to their respective platforms. Others arecross-platform software, but designed to work close to the hardware, likeBLISS,JOVIAL, andBCPL.
Some languages straddle the system and application domains, bridging the gap between these uses. The canonical example isC, which is used widely for both system and application programming.PL/I was an early example. Some modern languages also do this such asRust andSwift.
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 wasBCPL. System programming languages often lack built-ininput/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 ofPL/I,C andPascal.
The earliest system software was written inassembly language mostly because no alternative existed, but also for reasons including efficiency ofobject code,compiling time, and ease of debugging. Application languages such asFORTRAN were used for system programming, although they usually still required some routines to be written in assembly language.[2]
Mid-level languages "have much of thesyntax 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 wasESPOL on Burroughs mainframes in about 1960, followed byNiklaus Wirth'sPL360 (first written on a Burroughs system as across compiler), which had the general syntax ofALGOL 60 but whose statements directly manipulated CPU registers and memory. Other languages in this category includeMOL-360 andPL/S.
As an example, a typical PL360 statement isR9 := 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]
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 acompiler 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'sasm statement, is often used for this purpose. Although many such languages were developed,[1] C andC++ are the ones which survived.