BASIC

From Maze

(Difference between revisions)
Jump to: navigation, search
(→A Brief History of Programming)
(→A Brief History of Programming)
Line 25:Line 25:
The computer programs that followed in the electromechanical and early electronic age of computing were less intelligible than Lovelace's algorithm, bearing little relationship to any kind of written word -- or numbers. For example, the ENIAC, a fully electronic computer built at the University of Pennsylvania from 1943 to 1945, was programmed initially by plugging in an elaborate set of cables (da Cruz). To run particular calculations, constants were then set using dials.
The computer programs that followed in the electromechanical and early electronic age of computing were less intelligible than Lovelace's algorithm, bearing little relationship to any kind of written word -- or numbers. For example, the ENIAC, a fully electronic computer built at the University of Pennsylvania from 1943 to 1945, was programmed initially by plugging in an elaborate set of cables (da Cruz). To run particular calculations, constants were then set using dials.
−
The next step in programming was machine language. A program in machine language is simply a sequence of numbers. On the ENIAC, these were decimal (base 10) numbers, but different bases were used on other significant early systems. The EDVAC used binary; the ORDVAC, octal; and the BRLESC, sexadecimal (Bergin 62). In all of these cases, programmers needed to arduously determine the sequence of numbers that would constitute a program, writing something that did not look remotely like human language. Each operation the computer was to perform corresponded to a number, while the operands, if there were any, were provided as similar numbers. For instance, to jump unconditionally to a particular absolute address, an opcode such as "76" (in base 10) is used, followed by two bytes specifying the address. In fact, this is the opcode used for an unconditional branch to an absolute address on the Commodore 64.
+
The next step in programming was machine language. A program in machine language was simply a sequence of numbers that spoke, as it were, to the machine in the machine's own language. Each number corresponded to a particular machine operation, while the operands, if there were any, were similarly provided as numbers. On the ENIAC, these numbers were decimal (base 10), but different bases were used on other early systems. The EDVAC used binary; the ORDVAC, octal; and the BRLESC, sexadecimal (Bergin 62). In all of these cases, programmers arduously determined the sequence of numbers that would constitute a program, resulting in code that did not remotely resemble any spoken human language. For instance, to jump unconditionally to a particular absolute address, an opcode such as "76" (in base 10) is used, followed by two bytes specifying the address. In fact, this is the opcode used for an unconditional branch to an absolute address on the Commodore 64 -- though one would never know from looking at it.
−
A more legible form of code arose in the second generation programming languages, assembly languages. Assembly allows the use of mnemonics for operators such as LDA ("load accumulator"), JMP ("jump"), and INC ("increment memory") to stand in for the less easily remembered numeric codes. On the Commodore 64, the letters JMP followed by an absolute address are converted by the assembler to "76" in a machine language program. The first assembler ran on Cambridge University's EDSAC, the first stored-program computer, in 1949 (Campbell-Kelly and Aspray 184).
+
A more legible form of code arose in the second generation of programming languages, called assembly languages. Assembly allows mnemonics for operators such as LDA ("load accumulator"), JMP ("jump"), and INC ("increment memory") to stand in for the more esoteric numerical codes. On the Commodore 64, the letters JMP followed by an absolute address are converted by the assembler to "76," in effect translating the human-legible mnemonic into machine language. The first assembler ran on Cambridge University's EDSAC in 1949. EDSAC was, incidentally, the first computer capable of storing programs, a feature modern computer users have taken for granted for decades (Campbell-Kelly and Aspray 184).
Although cryptic compared to a high-level language such as BASIC, an assembler program is nevertheless much more comprehensible to a human than a machine language program is. While assembly is still used today in, for instance, programming firmware and in the demoscene, there are usually significant disadvantages to programming at this level. Programming in assembly highlights technical details of platforms and the transfer of values between memory locations and registers. Higher-level languages allow the programmer to concentrate on other matters, such as solving mathematical and scientific problems or modeling business processes.
Although cryptic compared to a high-level language such as BASIC, an assembler program is nevertheless much more comprehensible to a human than a machine language program is. While assembly is still used today in, for instance, programming firmware and in the demoscene, there are usually significant disadvantages to programming at this level. Programming in assembly highlights technical details of platforms and the transfer of values between memory locations and registers. Higher-level languages allow the programmer to concentrate on other matters, such as solving mathematical and scientific problems or modeling business processes.

Revision as of 01:01, 15 July 2011

View this revision of BASIC.

Personal tools