BASIC

From Maze

(Difference between revisions)
Jump to: navigation, search
Line 29:Line 29:
Programs written in early versions of COBOL and FORTRAN were specific to the punched card in definite ways: COBOL reserved columns 1-6 for the line number and column 7 for a continuation mark if the card's code ran on from the previous one. FORTRAN was similar, with columns 1-5 indicating the statement number. "Comments" (usually the program name) went in columns 73-80 in both languages; a "C" in the first column indicated that the whole FORTRAN card was to be considered a comment. Unless a programmer wrote a one-liner -- which in this case means writing a program that fits on a single card -- a COBOL or FORTRAN program would take the form of a stack, often a massive stack, of punched cards. These had to be punched on a keypunch machine and fed into a card reader by an operator. Line numbers were essential should a greatly feared random act occur: if someone dropped the stack of cards and they needed to be resorted into order.
Programs written in early versions of COBOL and FORTRAN were specific to the punched card in definite ways: COBOL reserved columns 1-6 for the line number and column 7 for a continuation mark if the card's code ran on from the previous one. FORTRAN was similar, with columns 1-5 indicating the statement number. "Comments" (usually the program name) went in columns 73-80 in both languages; a "C" in the first column indicated that the whole FORTRAN card was to be considered a comment. Unless a programmer wrote a one-liner -- which in this case means writing a program that fits on a single card -- a COBOL or FORTRAN program would take the form of a stack, often a massive stack, of punched cards. These had to be punched on a keypunch machine and fed into a card reader by an operator. Line numbers were essential should a greatly feared random act occur: if someone dropped the stack of cards and they needed to be resorted into order.
−
FORTRAN's GOTO command was the basis for the GOTO in the original BASIC (MoP 86), which of course was carried over into Commodore 64 BASIC. GOTO functions in the same way the assembly language JMP does, shifting the interpreter to a specific location of the program. If one were simply interested in easily writing JMP statements, BASIC offers little advantage. Where BASIC shone, though, were in commands such as PRINT. What would take many steps in machine language is efficiently accomplished by a single command in BASIC. The drawback, which becomes more apparent with larger programs, is that every act of translation from a BASIC command to the multiple machine language steps evoked by that command results in a greater time drag.
+
FORTRAN's GOTO command was the basis for the GOTO in the original BASIC (MoP 86), which was carried over into Commodore 64 BASIC. GOTO functions in the same way the assembly language JMP does, shifting the interpreter to a specific location of the program. If one were simply interested in easily writing JMP statements, BASIC offers little advantage. Where BASIC shone, though, were in commands such as PRINT. What would take many steps in machine language is efficiently accomplished by a single command in BASIC. The drawback, which becomes more apparent with larger programs, is that every act of translation from a BASIC command to the multiple machine language steps evoked by that command results in a greater time drag. Still, the time delay inherent in the act of translation from human language to machine language amounted to very little compared to the time saved by using a language specifically designed for the next computing revolution, one that would go beyond punched cards and batch processing to allow numerous users interactive access to a system simultaneously. This revolution was time-sharing.
−
 
−
Still, the time delay inherent in the act of translation from human language to machine language amounted to very little compared to the time saved by using a language specifically designed for the next computing revolution, one that would go beyond punched cards and batch processing to allow numerous users interactive access to a system simultaneously. This revolution was time-sharing.
 
== Dartmouth BASIC and Time-Sharing Minicomputers ==
== Dartmouth BASIC and Time-Sharing Minicomputers ==

Revision as of 08:55, 16 July 2011

View this revision of BASIC.

Personal tools