BASIC

 Beginners All-purpose Symbolic Instruction Code

BASIC is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College in 1963. They wanted to enable students in non-scientific fields to use computers. At the time, nearly all computers required writing custom software, which only scientists and mathematicians tended to learn.

The first microcomputer version of BASIC was co-written by Bill Gates, Paul Allen and Monte Davidoff for their newly formed company, Micro-Soft. This was released by MITS in punch tape format for the Altair 8800 shortly after the machine itself, immediately cementing BASIC as the primary language of early microcomputers. Members of the Homebrew Computer Club began circulating copies of the program, causing Gates to write his Open Letter to Hobbyists, complaining about this early example of software piracy.

Microsoft sold a CP/M BASIC compiler (known as BASCOM) which used a similar source language to MBASIC. A program debugged under MBASIC could be compiled with BASCOM. Since program text was no longer in memory and the run-time elements of the compiler were smaller than the interpreter, more memory was available for user data. Speed of real program execution increased about 3 fold.

Developers welcomed BASCOM as an alternative to the popular but slow and clumsy CBASIC. Unlike CBASIC, BASCOM did not need a preprocessor for MBASIC source code so could be debugged interactively. While approving of its superior edit-compile-run-debug loop compared to CBASIC, and stating that binaries ran far faster.

Growing up in the 1970s the BASIC I was first exposed to BASIC on an HP 9830A. It was introduced in 1972 and was the top of the 9800 line, with the addition of a BASIC interpreter in read-only memory (ROM). HP itself referred to it as a "calculator."  This system also had a flatbed plotter that could take an 11x17 sheet of paper.  I could write small plotting programs and save them to cassette tape.  It also had serial access to the University’s PDP-11/40 Running RSTS/E (Resource Sharing Time Sharing / Extended) with BASIC-PLUS.  

The high schools in the county all had ASR-33 teletypes with acoustic couplers and could dial into the same PDP-11.  This meant I had access to the system during the school year.  I managed to get myself an internship at the computer center the summer after my sophomore year of highschool.  This got me better access to the system and its manuals.  I wrote and managed so many BASIC-Plus applications over my college days.  Writing system utilities for RSTS/E was a favorite pastime.

Professionally, MBASIC on CP/M and GWBASIC on MS-DOS would be the main BASIC variants until QBasic and Visual Basic for Windows.  I am no longer writing BASIC applications in a professional capacity.

Sample Code

The sample program for BASIC is a looped take on the classic Hello World program using CP/M MBASIC and BASCOM.

F>MBASIC
BASIC-85 Rev. 5.29
[CP/M Version]
Copyright 1985-1986  �  by Microsoft
Created: 28-Jul-85
34872 Bytes free
Ok

LOAD "HELLO.BAS"
Ok

LIST
10 FOR I = 1 TO 10
20 PRINT "Hello World! From BASIC line";I
30 NEXT I
40 END
Ok

RUN
Hello World! From BASIC line 1 
Hello World! From BASIC line 2 
Hello World! From BASIC line 3 
Hello World! From BASIC line 4 
Hello World! From BASIC line 5 
Hello World! From BASIC line 6 
Hello World! From BASIC line 7 
Hello World! From BASIC line 8 
Hello World! From BASIC line 9 
Hello World! From BASIC line 10 
Ok

SYSTEM
F>

Now, let us use BASCOM to compile the BASIC file into an executable COM file.

F>TYPE HELLO.BAS
10 FOR I = 1 TO 10
20 PRINT "Hello World! From BASIC line";I
30 NEXT I
40 END
F>BASCOM =HELLO /E

00000 Fatal Error(s)
24196 Bytes Free

F>L80 HELLO,HELLO/N/E

Link-80  3.44  09-Dec-81  Copyright (c) 1981 Microsoft

Data    4000    4210    <  528>

37990 Bytes Free
[4015   4210       66]

F>HELLO
Hello World! From BASIC line 1 
Hello World! From BASIC line 2 
Hello World! From BASIC line 3 
Hello World! From BASIC line 4 
Hello World! From BASIC line 5 
Hello World! From BASIC line 6 
Hello World! From BASIC line 7 
Hello World! From BASIC line 8 
Hello World! From BASIC line 9 
Hello World! From BASIC line 10 
F>

References

This article uses material from the Wikipedia article BASIC which is released under the Creative Commons Attribution-Share-Alike License 4.0.

Comments

Popular posts from this blog

Still Working on the New Home Page

A New Home Page is in the works!

Old Quizzes that have been taken down