Second-generation programming language

From Wikipedia, the free encyclopedia

Second-generation programming language is a generational way to categorize assembly languages. The term was coined to provide a distinction from higher level third-generation programming languages (3GL) such as COBOL and earlier machine code languages. 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.[1] This conversion process is a simple one-to-one mapping of the assembly language mnemonics into binary machine code consisting of opcodes and operands. The language is specific to a particular processor family and environment. Since it is a one-to-one mapping to the native language of the target processor it has significant speed advantages but requires more programming effort than 3GLs.[2]

Second-generation languages are sometimes used in kernels and device drivers (though C is generally employed for this in modern kernels), but more often find use in extremely intensive processing such as games, video editing, graphic manipulation/rendering, emulation/virtualization, simulation, encryption and compression.[citation needed]

Often, the "skeleton" of such programs is constructed in a higher-level language and individual functions are implemented in lower-level language. These functions typically exist at the core of the tightest loops, being executed many times per second. This assures the greatest gain from the painstaking hand optimization process, as every bit of time shaved off is multiplied.[citation needed]

One method for creating such code is by allowing a compiler to generate a machine-optimized assembly language version of a particular function. This code is then hand-tuned, gaining both the brute-force insight of the machine optimizing algorithm and the intuitive abilities of the human optimizer.[citation needed]

[edit] References