BASIC
From Maze
(Difference between revisions)
| Line 25: | Line 25: | ||
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). | + | 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. |
| − | |||
| − | 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. | ||
During the first decade of electronic computing, programming was still crawling toward the ideal of Lovelace's "programs" that specified algorithms in high-level, human-readable form. To reach a level of programming more appropriate for mathematical and scientific tasks, FORTRAN (Formula Translation) was outlined in 1954 and first implemented in 1957. This language, and particularly the next version of it (FORTRAN II, which appeared in 1958), had a very strong influence on BASIC. Just as FORTRAN was designed with mathematics in mind, COBOL (Common Business-Oriented Language) was introduced in 1960 to address business uses. FORTRAN and COBOL both allowed for more intelligible code, improving on assembly. But both were also developed in the context of batch processing, for use with stacks of punched cards that would be processed by the machine one at a time. Punch cards were first used in the 18th century to define patterns in mechanical textile looms, but the concept was adopted in computing in the 20th century. The paragon of the punched card became known as simply "the IBM card," IBM's 80-column punched card, introduced in 1928. As explained in the chapter "Regularity," the Commodore 64's 80-column logical line, which appears as two 40-column lines on the screen, is one legacy of this early material medium for computing. | During the first decade of electronic computing, programming was still crawling toward the ideal of Lovelace's "programs" that specified algorithms in high-level, human-readable form. To reach a level of programming more appropriate for mathematical and scientific tasks, FORTRAN (Formula Translation) was outlined in 1954 and first implemented in 1957. This language, and particularly the next version of it (FORTRAN II, which appeared in 1958), had a very strong influence on BASIC. Just as FORTRAN was designed with mathematics in mind, COBOL (Common Business-Oriented Language) was introduced in 1960 to address business uses. FORTRAN and COBOL both allowed for more intelligible code, improving on assembly. But both were also developed in the context of batch processing, for use with stacks of punched cards that would be processed by the machine one at a time. Punch cards were first used in the 18th century to define patterns in mechanical textile looms, but the concept was adopted in computing in the 20th century. The paragon of the punched card became known as simply "the IBM card," IBM's 80-column punched card, introduced in 1928. As explained in the chapter "Regularity," the Commodore 64's 80-column logical line, which appears as two 40-column lines on the screen, is one legacy of this early material medium for computing. | ||
