BASIC

From Maze

(Difference between revisions)
Jump to: navigation, search
Line 21:Line 21:
The computer programs that followed in the electro-mechanical 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 electro-mechanical 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 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.
+
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 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 more comprehensible to a human than a machine language program. 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 financial processes.
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 more comprehensible to a human than a machine language program. 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 financial processes.

Revision as of 09:01, 16 July 2011

View this revision of BASIC.

Personal tools