Wikipedia

Second-generation programming language

Second-generation programming language (2GL) is a generational way to categorize assembly languages.[1][2][3]

The term was coined to provide a distinction from higher level machine independent third-generation programming languages (3GL) such as COBOL and earlier first-generation programming languages (machine code)[2][4]

Second-generation programming language

Second-generation programming languages have the following properties:

  • Lines within a program correspond directly to processor commands, essentially acting as a mnemonic device overlaying a first generation programming language.
  • The code can be read and written by a programmer. To run on a computer it must be converted into a machine readable form, a process called assembly.[4]
  • The language is specific to a particular processor family and environment.[2]

Second-generation languages are sometimes used for parts of kernels or device drivers, and are sometimes used in video games, graphics programs, and other intensive programs.[1]

In modern programs, second generation assembly languages are rarely used.[5] Programming in second generation languages may yield speed benefits, but several disadvantages have lead to its decline:

  • Programming is expressed in terms of individual processor instructions, rather than higher level logic.[2][3]
  • Low-level memory and hardware details must be manually managed which is often bug-prone.[2]
  • Programs are machine-dependent, so different versions must be written for every target machine architecture.[3]

The vast majority of programs are written in a third-generation programming language or a fourth-generation programming language. Assembly's main advantage, speed, has degraded by the fact that well written C code can often be as fast or even faster than hand written assembly[2][6]

Second generation languages are perhaps most significant in their place in computing history. For a long time, Second generation assembly languages were the only good option for development for many machines, such as the NES or the Commodore 64.[7][8] Second generation languages represented a massive step away from the tradition of programmers conforming to the needs of a machine, and the first step towards the machine accommodating for the programmer, a phenomenon that would be repeated in all subsequent programming language generations.[2][3]

See also

References

  1. ^ a b "Computer Hope, Generation languages"
  2. ^ a b c d e f g Brookshear, J. Glenn. Computer science : an overview (11th ed.). Addison-Wesley. pp. 240–241. ISBN 0-13-256903-5.
  3. ^ a b c d Vass, Péter. "Programming Language generations and Programming Paradigms" (PDF).
  4. ^ a b "What Are Programming Language Generations?". wiseGEEK. Retrieved 2019-06-11.
  5. ^ "Top Computer Languages 2019 - StatisticsTimes.com". statisticstimes.com. Archived from the original on 2019-06-12. Retrieved 2019-06-11.
  6. ^ Walls, Colin. "Why C is faster than assembly". Mentor, a Sieman's Business. Mentor Inc. Retrieved 11 June 2019.
  7. ^ Commodore corporation. "C64 programmer's reference" (PDF). Commodore corporation. Retrieved 11 June 2019.
  8. ^ Wikibooks contributors. "NES assembly". Wikibooks: NES Assembly. Retrieved 11 June 2019.
This article is copied from an article on Wikipedia® - the free encyclopedia created and edited by its online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of Wikipedia® encyclopedia articles provide accurate and timely information, please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.

Copyright © 2003-2025 Farlex, Inc Disclaimer
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional.