1st Generation of Programming Language
Essay by review • December 11, 2010 • Essay • 488 Words (2 Pages) • 2,569 Views
A first-generation programming language is a machine-level programming language. It consists of 1s and 0s.
Originally, no translator was used to compile or assemble the first-generation language. The first-generation programming instructions were entered through the front panel switches of the computer system.
The main benefit of programming in a first-generation programming language is that code a user writes can run very fast and efficiently since it is directly executed by the CPU, but machine language is somewhat more difficult to learn than higher generational programming languages, and it is somewhat more difficult to edit if errors occur, or, for example, if instructions need to be added into memory at some location, then all the instructions after the insertion point need to be moved down to make room in memory to accommodate the new instructions. Doing so on a front panel with switches can be very difficult. Furthermore portability is significantly reduced - in order to transfer code to a different computer it needs to be completely rewritten since the machine language for one computer could be significantly different from another computer. Architectural considerations make portability difficult too. For example, the number of registers on one CPU architecture could differ from those of another.
Current uses
1GL is mainly used on now very ancient computers, machine level programming still finds a use in several areas of modern programming. First and foremost, any native-code compiler creates machine language. This is done without user interaction, usually from a higher-level language as Fortran, C/[[C++]] or Pascal, often with intermediate byte code or assembly code.
Another use is for so-called virtual machines. In essence, each virtual machine just creates a translation bridge between machine code and byte code. The byte code is the same across all platforms and the translator module of the virtual machine then translates just-in-time each byte to the corresponding native machine instruction.
Computer viruses often inject code in a certain spot in memory. When tracing the logs of your internet server, you may find several entries of very long urls. Often, the encoded part of the url is equal to a certain set of machine level instructions to be executed on the computer. It is notoriously
...
...