Jump to content

IBM BASIC

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Derek Ross (talk | contribs) at 16:33, 3 August 2002. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Microsoft BASICA is a simple disk-based BASIC interpreter written by Microsoft for the IBM-PC to be distributed with PC-DOS. The name "BASICA" is short for "Advanced BASIC". The interpreter required the presence of ROM BASIC on the PC's BIOS chip. ROM BASIC is a program which was loaded by the BIOS on early PC's when no disk operating system could be found. BASICA was launched under DOS by the user. Once running it relied heavily on the ROM BASIC interpreter to parse the program source code. BASICA does add some features to the language which the ROM by itself would not be capable of such as filesystem access statements and the ability to save your work at the end of a session. In a technical sence, BASICA is a wrapper for ROM BASIC to allow use of the embedded ROM BASIC interpreter even while an operating system was installed.

The BASICA development environment was very similar to the integrated development environment used by Dartmouth BASIC. The user was given a prompt for entering program instructions. Statements beginning with a line number were inserted into the user's program at the appropriate position so that the statements would execute in numerical order at run-time. Statements which did not contain a line number were interpreted immediately at design-time. Some commands were intended to be used at run-time (such as LET, INPUT, WHILE and FOR) while others were intended to be used at design-time (such as SAVE, LOAD, NEW and RUN) but BASICA did not enforce these restrictions.

Samples

The following is an example of a session with BASICA:

The IBM Personal Computer Basic Version A2.00 Copyright IBM Corp. 1981, 1982, 1983
Ready.
> list
Ready.
> 10 print "please type your name"
Ready.
> 20 input a$
Ready.
> 30 for t = 1 to 10
Ready.
> 40 print "hello "; a$;
Ready.
> 50 next t
Ready.
> 60 print a$; " you have "; str$(len(a$)); " letters in your name!"
Ready.
> run 
please type you name
john hancock
hello john hancockjohn hancockjohn hancockjohn hancockjohn hancockjohn
hancockjohn hancockjohn hancockjohn hancockjohn hancockjohn hancock yo
u have 12 letters in your name!
Ready.
> system 

Successors

A similar BASIC interpreter was Microsoft GW-BASIC except that it shipped with MS-DOS and didn't rely on the embedded ROM BASIC interpreter. Eventually IBM and other PC clone manufacturers removed ROM BASIC from the BIOS to make room on the small chip for more advanced features such as Plug and Play and Advanced power management. In 1983 GW-BASIC was replaced with an even more advanced product from Microsoft called QBASIC or QuickBASIC. While Microsoft sold QuickBASIC seperately from DOS, a subset of the language called QBASIC continued to be included with DOS and later Windows.