Second-generation programming language

Way to categorize assembly languages


title: "Second-generation programming language" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["programming-language-classification"] description: "Way to categorize assembly languages" topic_path: "general/programming-language-classification" source: "https://en.wikipedia.org/wiki/Second-generation_programming_language" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Way to categorize assembly languages ::

The label of second-generation programming language (2GL) is a generational way to categorize assembly languages. They belong to the low-level programming languages.

The term was coined to provide a distinction from higher level machine independent third-generation programming languages (3GLs) (such as COBOL, C, or Java) and earlier first-generation programming languages (machine code)

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.
  • The language is specific to a particular processor family and environment.

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.

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

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

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 handwritten assembly.

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. 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.

References

References

  1. [http://www.computerhope.com/jargon/num/1gl.htm "Computer Hope, Generation languages"]
  2. (2012). "Computer science : an overview". Addison-Wesley.
  3. Vass, Péter. "Programming Language generations and Programming Paradigms".
  4. "What Are Programming Language Generations?".
  5. "Top Computer Languages 2019 - StatisticsTimes.com".
  6. "Why C is faster than assembly". Mentor Inc..
  7. "C64 programmer's reference". Commodore corporation.
  8. "NES assembly".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

programming-language-classification