<s>
A	O
BASIC	B-Language
interpreter	I-Language
is	O
an	O
interpreter	B-Application
that	O
enables	O
users	O
to	O
enter	O
and	O
run	O
programs	O
in	O
the	O
BASIC	O
language	O
and	O
was	O
,	O
for	O
the	O
first	O
part	O
of	O
the	O
microcomputer	B-Architecture
era	O
,	O
the	O
default	O
application	B-Application
that	O
computers	O
would	O
launch	O
.	O
</s>
<s>
Users	O
were	O
expected	O
to	O
use	O
the	O
BASIC	B-Language
interpreter	I-Language
to	O
type	O
in	O
programs	O
or	O
to	O
load	O
programs	O
from	O
storage	O
(	O
initially	O
cassette	B-Device
tapes	I-Device
then	O
floppy	B-Device
disks	I-Device
)	O
.	O
</s>
<s>
BASIC	B-Language
interpreters	I-Language
are	O
of	O
historical	O
importance	O
.	O
</s>
<s>
Microsoft	O
's	O
first	O
product	O
for	O
sale	O
was	O
a	O
BASIC	B-Language
interpreter	I-Language
(	O
Altair	B-Language
BASIC	I-Language
)	O
,	O
which	O
paved	O
the	O
way	O
for	O
the	O
company	O
's	O
success	O
.	O
</s>
<s>
Before	O
Altair	B-Language
BASIC	I-Language
,	O
microcomputers	B-Architecture
were	O
sold	O
as	O
kits	O
that	O
needed	O
to	O
be	O
programmed	O
in	O
machine	B-Language
code	I-Language
(	O
for	O
instance	O
,	O
the	O
Apple	B-Device
I	I-Device
)	O
.	O
</s>
<s>
During	O
the	O
Altair	O
period	O
,	O
BASIC	B-Language
interpreters	I-Language
were	O
sold	O
separately	O
,	O
becoming	O
the	O
first	O
software	O
sold	O
to	O
individuals	O
rather	O
than	O
to	O
organizations	O
;	O
Apple	B-Language
BASIC	I-Language
was	O
Apple	O
's	O
first	O
software	O
product	O
.	O
</s>
<s>
After	O
the	O
MITS	B-Architecture
Altair	I-Architecture
8800	I-Architecture
,	O
microcomputers	B-Architecture
were	O
expected	O
to	O
ship	O
bundled	O
with	O
BASIC	B-Language
interpreters	I-Language
of	O
their	O
own	O
(	O
e.g.	O
,	O
the	O
Apple	B-Device
II	I-Device
,	O
which	O
had	O
multiple	O
implementations	O
of	O
BASIC	O
)	O
.	O
</s>
<s>
A	O
backlash	O
against	O
the	O
price	O
of	O
Microsoft	O
's	O
Altair	B-Language
BASIC	I-Language
also	O
led	O
to	O
early	O
collaborative	O
software	O
development	O
,	O
for	O
Tiny	B-Language
BASIC	I-Language
implementations	O
in	O
general	O
and	O
Palo	O
Alto	O
Tiny	B-Language
BASIC	I-Language
specifically	O
.	O
</s>
<s>
BASIC	B-Language
interpreters	I-Language
fell	O
from	O
use	O
as	O
computers	O
grew	O
in	O
power	O
and	O
their	O
associated	O
programs	O
grew	O
too	O
long	O
for	O
typing	O
them	O
in	O
to	O
be	O
a	O
reasonable	O
distribution	O
format	O
.	O
</s>
<s>
Software	O
increasingly	O
came	O
pre-compiled	O
and	O
transmitted	O
on	O
floppy	B-Device
disk	I-Device
or	O
via	O
bulletin	B-Application
board	I-Application
systems	I-Application
,	O
making	O
the	O
need	O
for	O
source	O
listings	O
less	O
important	O
.	O
</s>
<s>
Additionally	O
,	O
increasingly	O
sophisticated	O
command	B-Operating_System
shells	I-Operating_System
like	O
MS-DOS	B-Application
and	O
the	O
Apple	B-Device
Macintosh	I-Device
GUI	B-Application
became	O
the	O
primary	O
user	B-Application
interface	I-Application
,	O
and	O
the	O
need	O
for	O
BASIC	O
to	O
act	O
as	O
the	O
shell	O
disappeared	O
.	O
</s>
<s>
The	O
use	O
of	O
BASIC	B-Language
interpreters	I-Language
as	O
the	O
primary	O
language	O
and	O
interface	O
to	O
systems	O
had	O
largely	O
disappeared	O
by	O
the	O
mid-1980s	O
.	O
</s>
<s>
BASIC	O
helped	O
jumpstart	O
the	O
time-sharing	B-General_Concept
era	O
,	O
became	O
mainstream	O
in	O
the	O
microcomputer	B-Architecture
era	O
,	O
then	O
faded	O
to	O
become	O
just	O
another	O
application	B-Application
in	O
the	O
DOS	O
and	O
GUI	B-Application
era	O
,	O
and	O
today	O
survives	O
in	O
a	O
few	O
niches	O
related	O
to	O
game	O
development	O
,	O
retrocomputing	O
,	O
and	O
teaching	O
.	O
</s>
<s>
First	O
implemented	O
as	O
a	O
compile-and-go	O
system	O
rather	O
than	O
an	O
interpreter	B-Application
,	O
BASIC	O
emerged	O
as	O
part	O
of	O
a	O
wider	O
movement	O
towards	O
time-sharing	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
General	O
Electric	O
,	O
having	O
worked	O
on	O
the	O
Dartmouth	B-Operating_System
Time	I-Operating_System
Sharing	I-Operating_System
System	I-Operating_System
and	O
its	O
associated	O
Dartmouth	B-Language
BASIC	I-Language
,	O
wrote	O
their	O
own	O
underlying	O
operating	B-General_Concept
system	I-General_Concept
and	O
launched	O
an	O
online	O
time-sharing	B-General_Concept
system	I-General_Concept
known	O
as	O
Mark	O
I	O
featuring	O
a	O
BASIC	O
compiler	B-Language
(	O
not	O
an	O
interpreter	B-Application
)	O
as	O
one	O
of	O
its	O
primary	O
selling	O
points	O
.	O
</s>
<s>
By	O
the	O
early	O
1970s	O
,	O
BASIC	O
was	O
largely	O
universal	O
on	O
general-purpose	O
mainframe	B-Architecture
computers	I-Architecture
.	O
</s>
<s>
BASIC	O
,	O
as	O
a	O
streamlined	O
language	O
designed	O
with	O
integrated	O
line	O
editing	O
in	O
mind	O
,	O
was	O
naturally	O
suited	O
to	O
porting	O
to	O
the	O
minicomputer	B-Architecture
market	O
,	O
which	O
was	O
emerging	O
at	O
the	O
same	O
time	O
as	O
the	O
time-sharing	B-General_Concept
services	O
.	O
</s>
<s>
These	O
machines	O
had	O
very	O
small	O
main	O
memory	O
,	O
perhaps	O
as	O
little	O
as	O
4KB	O
in	O
modern	O
terminology	O
,	O
and	O
lacked	O
the	O
high-performance	O
storage	O
like	O
hard	B-Device
drives	I-Device
that	O
make	O
compilers	B-Language
practical	O
.	O
</s>
<s>
In	O
contrast	O
,	O
an	O
interpreter	B-Application
would	O
take	O
fewer	O
computing	O
resources	O
,	O
at	O
the	O
expense	O
of	O
performance	O
.	O
</s>
<s>
In	O
1968	O
,	O
Hewlett	O
Packard	O
introduced	O
the	O
HP	O
2000	O
,	O
a	O
system	O
that	O
was	O
based	O
around	O
its	O
HP	B-Language
Time-Shared	I-Language
BASIC	I-Language
interpreter	B-Application
.	O
</s>
<s>
In	O
1969	O
,	O
Dan	O
Paymar	O
and	O
Ira	O
Baxter	O
wrote	O
another	O
early	O
BASIC	B-Language
interpreter	I-Language
for	O
the	O
Data	B-Device
General	I-Device
Nova	I-Device
.	O
</s>
<s>
One	O
holdout	O
was	O
Digital	O
Equipment	O
Corporation	O
(	O
DEC	O
)	O
,	O
the	O
leading	O
minicomputer	B-Architecture
vendor	O
.	O
</s>
<s>
They	O
had	O
released	O
a	O
new	O
language	O
known	O
as	O
FOCAL	B-Language
,	O
based	O
on	O
the	O
earlier	O
JOSS	B-Language
developed	O
on	O
a	O
DEC	O
machine	O
at	O
the	O
Stanford	O
Research	O
Institute	O
in	O
the	O
early	O
1960s	O
.	O
</s>
<s>
JOSS	B-Language
was	O
similar	O
to	O
BASIC	O
in	O
many	O
respects	O
,	O
and	O
FOCAL	B-Language
was	O
a	O
version	O
designed	O
to	O
run	O
in	O
very	O
small	O
memory	O
systems	O
,	O
notably	O
the	O
PDP-8	B-Device
,	O
which	O
often	O
shipped	O
with	O
4KB	O
of	O
main	O
memory	O
.	O
</s>
<s>
By	O
the	O
late	O
1960s	O
,	O
DEC	O
salesmen	O
,	O
especially	O
in	O
the	O
educational	O
sales	O
department	O
,	O
found	O
that	O
their	O
potential	O
customers	O
were	O
not	O
interested	O
in	O
FOCAL	B-Language
and	O
were	O
looking	O
elsewhere	O
for	O
their	O
systems	O
.	O
</s>
<s>
This	O
prompted	O
David	O
H	O
.	O
Ahl	O
to	O
hire	O
a	O
programmer	O
to	O
produce	O
a	O
BASIC	O
for	O
the	O
PDP-8	B-Device
and	O
other	O
DEC	O
machines	O
.	O
</s>
<s>
Within	O
the	O
year	O
,	O
all	O
interest	O
in	O
alternatives	O
like	O
JOSS	B-Language
and	O
FOCAL	B-Language
had	O
disappeared	O
.	O
</s>
<s>
The	O
introduction	O
of	O
the	O
first	O
microcomputers	B-Architecture
in	O
the	O
mid-1970s	O
continued	O
the	O
explosive	O
growth	O
of	O
BASIC	O
,	O
which	O
had	O
the	O
advantage	O
that	O
it	O
was	O
fairly	O
well	O
known	O
to	O
the	O
young	O
designers	O
and	O
computer	O
hobbyists	O
who	O
took	O
an	O
interest	O
in	O
microcomputers	B-Architecture
,	O
many	O
of	O
whom	O
had	O
seen	O
BASIC	O
on	O
minis	O
or	O
mainframes	B-Architecture
.	O
</s>
<s>
BASIC	O
was	O
one	O
of	O
the	O
few	O
languages	O
that	O
was	O
both	O
high-level	B-Language
enough	O
to	O
be	O
usable	O
by	O
those	O
without	O
training	O
and	O
small	O
enough	O
to	O
fit	O
into	O
the	O
microcomputers	B-Architecture
of	O
the	O
day	O
.	O
</s>
<s>
In	O
1972	O
,	O
HP	O
introduced	O
the	O
HP	O
9830A	O
programmable	O
desktop	O
calculator	O
with	O
a	O
BASIC	B-Language
Plus	I-Language
interpreter	B-Application
in	O
read-only	B-Device
memory	I-Device
(	O
ROM	B-Device
)	O
.	O
</s>
<s>
In	O
June	O
1974	O
,	O
Alfred	O
Weaver	O
,	O
Michael	O
Tindall	O
,	O
and	O
Ronald	O
Danielson	O
of	O
the	O
University	O
of	O
Illinois	O
at	O
Urbana-Champaign	O
proved	O
it	O
was	O
possible	O
to	O
produce	O
"	O
A	O
BASIC	O
Language	O
Interpreter	B-Application
for	O
the	O
Intel	B-General_Concept
8008	I-General_Concept
Microprocessor	O
,	O
"	O
in	O
their	O
paper	O
of	O
the	O
same	O
name	O
,	O
though	O
their	O
application	B-Application
was	O
deployed	O
to	O
an	O
8008	B-General_Concept
simulator	O
for	O
the	O
IBM	B-Application
360/75	I-Application
and	O
required	O
16KB	O
.	O
</s>
<s>
In	O
January	O
1975	O
,	O
the	O
Altair	B-Architecture
8800	I-Architecture
was	O
announced	O
and	O
sparked	O
the	O
microcomputer	B-Architecture
revolution	O
.	O
</s>
<s>
One	O
of	O
the	O
first	O
microcomputer	B-Architecture
versions	O
of	O
BASIC	O
was	O
co-written	O
by	O
Gates	O
,	O
Allen	O
,	O
and	O
Monte	O
Davidoff	O
for	O
their	O
newly	O
formed	O
company	O
,	O
Micro-Soft	O
.	O
</s>
<s>
This	O
was	O
released	O
by	O
MITS	O
in	O
punch	O
tape	O
format	O
for	O
the	O
Altair	B-Architecture
8800	I-Architecture
shortly	O
after	O
the	O
machine	O
itself	O
,	O
showcasing	O
BASIC	O
as	O
the	O
primary	O
language	O
for	O
early	O
microcomputers	B-Architecture
.	O
</s>
<s>
Club	O
members	O
were	O
excited	O
by	O
Altair	B-Language
BASIC	I-Language
.	O
</s>
<s>
At	O
the	O
time	O
he	O
was	O
working	O
at	O
Hewlett	O
Packard	O
and	O
used	O
their	O
minicomputer	B-Architecture
dialect	O
,	O
HP	B-Language
Time-Shared	I-Language
BASIC	I-Language
,	O
as	O
the	O
basis	O
for	O
his	O
own	O
version	O
.	O
</s>
<s>
Integer	B-Language
BASIC	I-Language
was	O
released	O
on	O
cassette	O
for	O
the	O
Apple	B-Device
I	I-Device
,	O
and	O
was	O
supplied	O
in	O
ROM	B-Device
when	O
the	O
Apple	B-Device
II	I-Device
shipped	O
in	O
the	O
summer	O
of	O
1977	O
.	O
</s>
<s>
Other	O
members	O
of	O
the	O
Homebrew	O
Computer	O
Club	O
began	O
circulating	O
copies	O
of	O
Altair	B-Language
BASIC	I-Language
on	O
paper	O
tape	O
,	O
causing	O
Gates	O
to	O
write	O
his	O
Open	O
Letter	O
to	O
Hobbyists	O
,	O
complaining	O
about	O
this	O
early	O
example	O
of	O
software	O
piracy	O
.	O
</s>
<s>
How	O
to	O
design	O
and	O
implement	O
a	O
stripped-down	O
version	O
of	O
an	O
interpreter	B-Application
for	O
the	O
BASIC	O
language	O
was	O
covered	O
in	O
articles	O
by	O
Allison	O
in	O
the	O
first	O
three	O
quarterly	O
issues	O
of	O
the	O
People	O
's	O
Computer	O
Company	O
newsletter	O
published	O
in	O
1975	O
and	O
implementations	O
with	O
source	O
code	O
published	O
in	O
Dr.	O
Dobb	O
's	O
Journal	O
of	O
Tiny	B-Language
BASIC	I-Language
Calisthenics	O
&	O
Orthodontia	O
:	O
Running	O
Light	O
Without	O
Overbyte	O
.	O
</s>
<s>
This	O
led	O
to	O
a	O
wide	O
variety	O
of	O
Tiny	B-Language
BASICs	I-Language
with	O
added	O
features	O
or	O
other	O
improvements	O
,	O
with	O
well-known	O
versions	O
from	O
Tom	O
Pittman	O
and	O
Li-Chen	O
Wang	O
,	O
both	O
members	O
of	O
the	O
Homebrew	O
Computer	O
Club	O
.	O
</s>
<s>
Tiny	B-Language
BASIC	I-Language
was	O
published	O
openly	O
and	O
Wang	O
coined	O
the	O
term	O
"	O
copyleft	O
"	O
to	O
encourage	O
others	O
to	O
copy	O
his	O
source	O
code	O
.	O
</s>
<s>
Hobbyists	O
and	O
professionals	O
created	O
their	O
own	O
implementations	O
,	O
making	O
Tiny	B-Language
BASIC	I-Language
an	O
example	O
of	O
a	O
free	B-Application
software	I-Application
project	O
that	O
existed	O
before	O
the	O
free	B-Application
software	I-Application
movement	O
.	O
</s>
<s>
Many	O
firms	O
developed	O
BASIC	B-Language
interpreters	I-Language
.	O
</s>
<s>
In	O
1976	O
,	O
SCELBI	B-Device
introduced	O
SCELBAL	B-Language
for	O
the	O
8008	B-General_Concept
and	O
the	O
University	O
of	O
Idaho	O
and	O
Lawrence	O
Livermore	O
Laboratory	O
announced	O
that	O
they	O
would	O
be	O
publishing	O
to	O
the	O
public	O
domain	O
LLL	O
BASIC	O
,	O
which	O
included	O
floating-point	B-Algorithm
support	O
.	O
</s>
<s>
In	O
1977	O
,	O
the	O
Apple	B-Device
II	I-Device
and	O
TRS-80	B-Device
Model	I-Device
I	I-Device
each	O
had	O
two	O
versions	O
of	O
BASIC	O
,	O
a	O
smaller	O
version	O
introduced	O
with	O
the	O
initial	O
releases	O
of	O
the	O
machines	O
and	O
a	O
licensed	O
Microsoft	O
version	O
introduced	O
later	O
as	O
interest	O
in	O
the	O
platforms	O
increased	O
.	O
</s>
<s>
Microsoft	O
ported	O
its	O
interpreter	B-Application
to	O
the	O
MOS	B-General_Concept
6502	I-General_Concept
,	O
which	O
quickly	O
became	O
one	O
of	O
the	O
most	O
popular	O
microprocessors	O
of	O
the	O
8-bit	O
era	O
.	O
</s>
<s>
When	O
new	O
microcomputers	B-Architecture
began	O
to	O
appear	O
,	O
such	O
as	O
the	O
Commodore	B-Device
PET	I-Device
,	O
their	O
manufacturers	O
licensed	O
a	O
Microsoft	B-Language
BASIC	I-Language
,	O
customized	O
to	O
the	O
hardware	O
capabilities	O
.	O
</s>
<s>
By	O
1978	O
,	O
MS	B-Language
BASIC	I-Language
was	O
a	O
de	O
facto	O
standard	O
and	O
practically	O
every	O
home	O
computer	O
of	O
the	O
1980s	O
included	O
it	O
in	O
ROM	B-Device
.	O
</s>
<s>
In	O
1980	O
,	O
as	O
part	O
of	O
a	O
larger	O
licensing	O
deal	O
that	O
included	O
other	O
languages	O
and	O
PC	B-Operating_System
DOS	I-Operating_System
,	O
IBM	O
rejected	O
an	O
overture	O
from	O
Atari	O
and	O
instead	O
licensed	O
MS-BASIC	O
over	O
its	O
own	O
implementation	O
,	O
eventually	O
releasing	O
four	O
versions	O
of	O
IBM	B-Language
BASIC	I-Language
,	O
each	O
much	O
larger	O
than	O
prior	O
interpreters	B-Application
(	O
for	O
instance	O
,	O
Cartridge	O
BASIC	O
took	O
40KB	O
)	O
.	O
</s>
<s>
Don	O
Estridge	O
,	O
leader	O
of	O
the	O
IBM	B-Device
PC	I-Device
team	O
,	O
said	O
,	O
"	O
IBM	O
has	O
an	O
excellent	O
BASIC--it	O
'	O
s	O
well	O
received	O
,	O
runs	O
fast	O
on	O
mainframe	B-Architecture
computers	I-Architecture
,	O
and	O
it	O
's	O
a	O
lot	O
more	O
functional	O
than	O
micro-computer	B-Architecture
BASICs	O
...	O
</s>
<s>
But	O
 [ its ] 	O
number	O
of	O
users	O
were	O
infinitesimal	O
compared	O
to	O
the	O
number	O
of	O
Microsoft	B-Language
BASIC	I-Language
users	O
.	O
</s>
<s>
Microsoft	B-Language
BASIC	I-Language
had	O
hundreds	O
of	O
thousands	O
of	O
users	O
around	O
the	O
world	O
.	O
</s>
<s>
(	O
See	O
Microsoft	B-Language
BASIC	I-Language
for	O
the	O
subsequent	O
history	O
of	O
these	O
different	O
implementations	O
.	O
)	O
</s>
<s>
Many	O
vendors	O
did	O
"	O
argue	O
with	O
that	O
"	O
and	O
used	O
other	O
firms	O
or	O
wrote	O
their	O
own	O
interpreters	B-Application
.	O
</s>
<s>
In	O
September	O
1978	O
,	O
Shepardson	B-Device
Microsystems	I-Device
was	O
finishing	O
Cromemco	O
16K	O
Structured	O
BASIC	O
for	O
the	O
Z80-based	O
Cromemco	O
S-100	B-Architecture
bus	I-Architecture
machines	O
.	O
</s>
<s>
Paul	O
Laughton	O
and	O
Kathleen	O
O'Brien	O
then	O
created	O
Atari	B-Language
BASIC	I-Language
as	O
essentially	O
a	O
pared-down	O
version	O
of	O
Cromemco	O
BASIC	O
ported	O
to	O
the	O
6502	B-General_Concept
.	O
</s>
<s>
In	O
1979	O
,	O
Warren	O
Robinett	O
developed	O
the	O
BASIC	B-Language
Programming	I-Language
cartridge	O
for	O
Atari	O
,	O
Inc.	O
,	O
even	O
though	O
it	O
only	O
supported	O
programs	O
with	O
9	O
lines	O
of	O
code	O
(	O
64	O
characters	O
in	O
total	O
)	O
.	O
</s>
<s>
Also	O
in	O
1979	O
,	O
Texas	O
Instruments	O
released	O
TI	B-Language
BASIC	I-Language
with	O
its	O
TI-99/4	B-Device
,	O
which	O
would	O
sell	O
nearly	O
3	O
million	O
systems	O
when	O
revamped	O
as	O
the	O
TI-99/4A	B-Device
.	O
</s>
<s>
Sinclair	B-Language
BASIC	I-Language
was	O
developed	O
for	O
the	O
ZX-80	B-Operating_System
by	O
John	O
Grant	O
and	O
Steve	O
Vickers	O
of	O
Nine	O
Tiles	O
.	O
</s>
<s>
In	O
1980	O
,	O
Sophie	O
Wilson	O
of	O
Acorn	O
Computers	O
developed	O
Atom	O
BASIC	O
,	O
which	O
she	O
later	O
evolved	O
into	O
BBC	B-Language
BASIC	I-Language
,	O
one	O
of	O
the	O
first	O
interpreters	B-Application
to	O
offer	O
structured	O
BASIC	B-Language
programming	I-Language
,	O
with	O
named	O
DEF	O
PROC/DEF	O
FN	O
procedures	O
and	O
functions	O
,	O
REPEAT	O
UNTIL	O
loops	O
,	O
and	O
IF	O
THEN	O
ELSE	O
structures	O
inspired	O
by	O
COMAL	B-Language
.	O
</s>
<s>
Jan	O
Jones	O
developed	O
SuperBASIC	B-Language
,	O
another	O
British	O
BASIC	O
supporting	O
structured	B-Language
programming	I-Language
,	O
for	O
the	O
Sinclair	B-Device
QL	I-Device
.	O
</s>
<s>
In	O
1983	O
,	O
Randall	O
Hyde	O
developed	O
SmartBASIC	O
for	O
the	O
Coleco	B-Device
Adam	I-Device
.	O
</s>
<s>
Richard	O
Clayton	O
,	O
Chris	O
Hall	O
,	O
and	O
Paul	O
Overell	O
developed	O
Mallard	B-Language
BASIC	I-Language
for	O
the	O
BBC	B-Device
Micro	I-Device
and	O
Locomotive	B-Language
BASIC	I-Language
for	O
the	O
Amstrad	B-Device
CPC	I-Device
,	O
both	O
supporting	O
commands	O
for	O
an	O
ISAM	B-Application
indexed	O
file	O
system	O
.	O
</s>
<s>
In	O
1985	O
,	O
MetaComCo	B-Device
released	O
ABasiC	O
for	O
the	O
Amiga	B-Device
and	O
ST	B-Language
BASIC	I-Language
for	O
the	O
Atari	B-Device
ST	I-Device
.	O
</s>
<s>
By	O
1981	O
,	O
the	O
second	O
edition	O
documented	O
keywords	O
from	O
over	O
250	O
different	O
computers	O
,	O
showcasing	O
the	O
explosive	O
growth	O
of	O
the	O
microcomputer	B-Architecture
era	O
.	O
</s>
<s>
With	O
the	O
rise	O
of	O
disk	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
and	O
later	O
graphical	B-Application
user	I-Application
interfaces	I-Application
,	O
BASIC	B-Language
interpreters	I-Language
became	O
just	O
one	O
application	B-Application
among	O
many	O
,	O
rather	O
than	O
providing	O
the	O
first	O
prompt	O
a	O
user	O
might	O
see	O
when	O
turning	O
on	O
a	O
computer	O
.	O
</s>
<s>
In	O
1983	O
,	O
the	O
TRS-80	B-Operating_System
Model	I-Operating_System
100	I-Operating_System
portable	B-Device
computer	I-Device
debuted	O
,	O
with	O
its	O
Microsoft	B-Language
BASIC	I-Language
implementation	O
noteworthy	O
for	O
two	O
reasons	O
.	O
</s>
<s>
First	O
,	O
programs	O
were	O
edited	O
using	O
the	O
simple	O
text	B-Application
editor	I-Application
,	O
TEXT	O
,	O
rather	O
than	O
typed	O
in	O
line	O
by	O
line	O
(	O
but	O
line	B-Application
numbers	I-Application
were	O
still	O
required	O
)	O
.	O
</s>
<s>
Also	O
in	O
1983	O
,	O
Microsoft	O
began	O
bundling	O
GW-BASIC	B-Language
with	O
DOS	O
.	O
</s>
<s>
Functionally	O
identical	O
to	O
IBM	O
BASICA	O
,	O
its	O
BASIC	B-Language
interpreter	I-Language
was	O
a	O
fully	O
self-contained	O
executable	O
and	O
did	O
not	O
need	O
the	O
Cassette	O
BASIC	O
ROM	B-Device
found	O
in	O
the	O
original	O
IBM	B-Device
PC	I-Device
.	O
</s>
<s>
According	O
to	O
Mark	O
Jones	O
Lorenzo	O
,	O
given	O
the	O
scope	O
of	O
the	O
language	O
,	O
"	O
GW-BASIC	B-Language
is	O
arguably	O
the	O
ne	O
plus	O
ultra	O
of	O
Microsoft	O
's	O
family	O
of	O
line-numbered	O
BASICs	O
stretching	O
back	O
to	O
the	O
Altair--and	O
perhaps	O
even	O
of	O
line-numbered	O
BASIC	O
in	O
general.	O
"	O
</s>
<s>
With	O
the	O
release	O
of	O
MS-DOS	B-Application
5.0	O
,	O
GW-BASIC	B-Language
'	O
s	O
place	O
was	O
taken	O
by	O
QBasic	B-Language
.	O
</s>
<s>
MacBASIC	B-Language
featured	O
a	O
fully	O
interactive	B-Application
development	I-Application
environment	I-Application
for	O
the	O
original	B-Device
Macintosh	I-Device
computer	O
and	O
was	O
developed	O
by	O
Donn	O
Denman	O
,	O
Marianne	O
Hsiung	O
,	O
Larry	O
Kenyon	O
,	O
and	O
Bryan	O
Stearns	O
.	O
</s>
<s>
MacBASIC	B-Language
was	O
released	O
as	O
beta	O
software	O
in	O
1985	O
and	O
was	O
adopted	O
for	O
use	O
in	O
places	O
such	O
as	O
the	O
Dartmouth	O
College	O
computer	O
science	O
department	O
,	O
for	O
use	O
in	O
an	O
introductory	O
programming	O
course	O
.	O
</s>
<s>
It	O
was	O
doomed	O
to	O
be	O
the	O
second	O
Apple-developed	O
BASIC	O
killed	O
in	O
favor	O
of	O
a	O
Microsoft	B-Language
BASIC	I-Language
.	O
</s>
<s>
In	O
November	O
1985	O
,	O
Apple	O
abruptly	O
ended	O
the	O
project	O
as	O
part	O
of	O
a	O
deal	O
with	O
Microsoft	O
to	O
extend	O
the	O
license	O
for	O
BASIC	O
on	O
the	O
Apple	B-Device
II	I-Device
.	O
</s>
<s>
BASIC	B-Language
interpreters	I-Language
were	O
not	O
just	O
an	O
American/British	O
development	O
.	O
</s>
<s>
In	O
1984	O
,	O
Hudson	O
Soft	O
released	O
Family	B-Language
BASIC	I-Language
in	O
the	O
Japanese	O
market	O
for	O
Nintendo	O
's	O
Family	O
Computer	O
video	O
game	O
console	O
,	O
an	O
integer-only	O
implementation	O
designed	O
for	O
game	O
programming	O
,	O
based	O
on	O
Hudson	O
Soft	O
BASIC	O
for	O
the	O
Sharp	O
MZ80	O
(	O
with	O
English	O
keywords	O
)	O
.	O
</s>
<s>
Turbo-Basic	B-Language
XL	I-Language
is	O
a	O
compatible	O
superset	O
of	O
Atari	B-Language
BASIC	I-Language
,	O
developed	O
by	O
Frank	O
Ostrowski	O
and	O
published	O
in	O
the	O
December	O
1985	O
issue	O
of	O
German	O
computer	O
magazine	O
Happy	O
Computer	O
,	O
making	O
it	O
one	O
of	O
the	O
last	O
interpreters	B-Application
published	O
as	O
a	O
type-in	O
program	O
.	O
</s>
<s>
The	O
language	O
included	O
a	O
compiler	B-Language
in	O
addition	O
to	O
the	O
interpreter	B-Application
and	O
featured	O
structured	B-Language
programming	I-Language
commands	O
.	O
</s>
<s>
In	O
France	O
,	O
François	O
Lionet	O
and	O
Constantin	O
Sotiropoulos	O
developed	O
two	O
BASIC	B-Language
interpreters	I-Language
with	O
a	O
focus	O
on	O
multimedia	O
:	O
STOS	B-Language
BASIC	I-Language
for	O
the	O
Atari	B-Device
ST	I-Device
,	O
in	O
1988	O
,	O
and	O
AMOS	B-Language
BASIC	I-Language
for	O
the	O
Amiga	B-Device
,	O
in	O
1990	O
.	O
</s>
<s>
In	O
May	O
1991	O
,	O
Microsoft	O
released	O
Visual	B-Language
Basic	I-Language
,	O
a	O
third-generation	O
event-driven	B-Application
programming	I-Application
language	I-Application
known	O
for	O
its	O
Component	B-Application
Object	I-Application
Model	I-Application
(	O
COM	O
)	O
programming	O
model	O
.	O
</s>
<s>
Visual	B-Language
Basic	I-Language
supported	O
the	O
rapid	O
application	B-Application
development	O
(	O
RAD	O
)	O
of	O
graphical	B-Application
user	I-Application
interface	I-Application
(	O
GUI	B-Application
)	O
applications	O
,	O
access	O
to	O
databases	O
using	O
Data	B-Library
Access	I-Library
Objects	I-Library
,	O
Remote	B-Device
Data	I-Device
Objects	I-Device
,	O
or	O
ActiveX	B-Library
Data	I-Library
Objects	I-Library
,	O
and	O
creation	O
of	O
ActiveX	B-Application
controls	I-Application
and	O
objects	O
.	O
</s>
<s>
Visual	B-Language
Basic	I-Language
was	O
used	O
to	O
develop	O
proprietary	O
in-house	O
applications	O
as	O
well	O
as	O
published	O
applications	O
.	O
</s>
<s>
In	O
1993	O
,	O
Microsoft	O
released	O
Visual	B-Language
Basic	I-Language
for	I-Language
Applications	I-Language
,	O
a	O
scripting	O
language	O
for	O
Microsoft	B-Application
Office	I-Application
applications	O
,	O
which	O
supersedes	O
and	O
expands	O
on	O
the	O
abilities	O
of	O
earlier	O
application-specific	O
macro	O
programming	O
languages	O
such	O
as	O
Word	B-Application
's	I-Application
WordBASIC	B-Language
(	O
which	O
had	O
been	O
introduced	O
in	O
1989	O
)	O
.	O
</s>
<s>
In	O
1996	O
,	O
Microsoft	O
released	O
VBScript	B-Application
as	O
an	O
alternative	O
to	O
JavaScript	B-Language
for	O
adding	O
interactive	O
client-side	B-Operating_System
functionality	O
to	O
web	O
pages	O
viewed	O
with	O
Internet	B-Application
Explorer	I-Application
.	O
</s>
<s>
In	O
1999	O
,	O
Benoît	O
Minisini	O
released	O
Gambas	B-Language
as	O
an	O
alternative	O
for	O
Visual	B-Language
Basic	I-Language
developers	O
who	O
had	O
decided	O
to	O
migrate	O
to	O
Linux	B-Application
.	O
</s>
<s>
In	O
2000	O
,	O
Lee	O
Bamber	O
and	O
Richard	O
Vanner	O
released	O
DarkBASIC	O
,	O
a	O
game	O
creation	O
system	O
for	O
Microsoft	B-Application
Windows	I-Application
,	O
with	O
accompanying	O
IDE	B-Application
and	O
development	O
tools	O
.	O
</s>
<s>
In	O
2001	O
,	O
SmallBASIC	B-Language
was	O
released	O
for	O
the	O
Palm	B-Application
PDA	I-Application
.	O
</s>
<s>
Another	O
BASIC	B-Language
interpreter	I-Language
for	O
Palm	O
was	O
HotPaw	O
BASIC	O
,	O
an	O
offshoot	O
of	O
Chipmunk	B-Language
Basic	I-Language
.	O
</s>
<s>
In	O
2002	O
,	O
Emmanuel	O
Chailloux	O
,	O
Pascal	B-Application
Manoury	O
and	O
Bruno	O
Pagano	O
published	O
a	O
Tiny	B-Language
BASIC	I-Language
as	O
an	O
example	O
of	O
developing	O
applications	O
with	O
Objective	B-Language
Caml	I-Language
.	O
</s>
<s>
In	O
2011	O
,	O
Microsoft	O
released	O
Small	B-Language
Basic	I-Language
(	O
distinct	O
from	O
SmallBASIC	B-Language
)	O
,	O
together	O
with	O
a	O
teaching	O
curriculum	O
and	O
an	O
introductory	O
guide.	O
,	O
designed	O
to	O
help	O
students	O
who	O
have	O
learnt	O
visual	B-Language
programming	I-Language
languages	I-Language
such	O
as	O
Scratch	B-Language
learn	O
text-based	O
programming	O
.	O
</s>
<s>
The	O
associated	O
IDE	B-Application
provides	O
a	O
simplified	O
programming	B-Application
environment	I-Application
with	O
functionality	O
such	O
as	O
syntax	O
highlighting	O
,	O
intelligent	B-Application
code	I-Application
completion	I-Application
,	O
and	O
in-editor	O
documentation	O
access	O
.	O
</s>
<s>
In	O
2019	O
,	O
Microsoft	O
announced	O
Small	B-Language
Basic	I-Language
Online	I-Language
(	O
SBO	O
)	O
,	O
allowing	O
students	O
to	O
run	O
programs	O
from	O
a	O
web	B-Application
browser	I-Application
.	O
</s>
<s>
Another	O
implementation	O
using	O
the	O
same	O
name	O
was	O
adapted	O
from	O
Palo	O
Alto	O
Tiny	B-Language
BASIC	I-Language
in	O
1984	O
by	O
Gordon	O
Brandly	O
for	O
his	O
68000	O
Tiny	B-Language
BASIC	I-Language
,	O
later	O
ported	O
to	O
C	O
by	O
Mike	O
Field	O
.	O
</s>
<s>
Many	O
BASIC	B-Language
interpreters	I-Language
are	O
now	O
available	O
for	O
smartphones	B-Application
and	O
tablets	O
via	O
the	O
Apple	B-Application
App	I-Application
Store	I-Application
,	O
or	O
Google	B-Application
Play	I-Application
store	I-Application
for	O
Android	O
.	O
</s>
<s>
Today	O
,	O
coding	O
BASIC	B-Language
interpreters	I-Language
has	O
become	O
part	O
of	O
the	O
retrocomputing	O
hobby	O
.	O
</s>
<s>
Higher	O
level	O
programming	O
languages	O
on	O
systems	O
with	O
extensive	O
RAM	O
have	O
simplified	O
implementing	O
BASIC	B-Language
interpreters	I-Language
.	O
</s>
<s>
For	O
instance	O
,	O
line	O
management	O
is	O
simple	O
if	O
your	O
implementation	O
language	O
supports	O
sparse	B-Algorithm
matrixes	I-Algorithm
,	O
variable	O
management	O
is	O
simple	O
with	O
associative	B-Application
arrays	I-Application
,	O
and	O
program	O
execution	O
is	O
easy	O
with	O
eval	O
functions	O
.	O
</s>
<s>
As	O
examples	O
,	O
see	O
the	O
open-source	B-License
project	I-License
Vintage	O
BASIC	O
,	O
written	O
in	O
Haskell	B-Language
or	O
the	O
.	O
</s>
<s>
Initially	O
,	O
interpreters	B-Application
were	O
either	O
bundled	O
with	O
computer	O
hardware	O
or	O
developed	O
as	O
a	O
custom	O
service	O
,	O
before	O
an	O
industry	O
producing	O
independently	O
packaged	O
software	O
for	O
organizations	O
came	O
about	O
in	O
the	O
late	O
1960s	O
.	O
</s>
<s>
BASIC	B-Language
interpreters	I-Language
were	O
first	O
sold	O
separately	O
from	O
microcomputers	B-Architecture
,	O
then	O
built-in	O
,	O
before	O
becoming	O
sold	O
as	O
applications	O
again	O
in	O
the	O
DOS	O
era	O
.	O
</s>
<s>
As	O
the	O
market	O
shifted	O
to	O
ROMs	O
,	O
ROM	B-Device
size	O
came	O
to	O
dominate	O
decisions	O
about	O
how	O
large	O
a	O
BASIC	B-Language
interpreter	I-Language
could	O
be	O
.	O
</s>
<s>
Because	O
RAM	O
were	O
sold	O
as	O
4KB	O
chips	O
,	O
Altair	B-Language
BASIC	I-Language
was	O
initially	O
packaged	O
in	O
separate	O
editions	O
for	O
4K	O
,	O
8K	O
,	O
and	O
12K	O
;	O
this	O
carried	O
over	O
to	O
ROM	B-Device
chips	I-Device
,	O
as	O
manufacturers	O
would	O
decide	O
how	O
many	O
ROM	B-Device
chips	I-Device
they	O
could	O
fit	O
in	O
their	O
design	O
,	O
given	O
price	O
goals	O
and	O
other	O
constraints	O
.	O
</s>
<s>
+	O
Compilers	B-Language
vs	O
.	O
</s>
<s>
The	O
first	O
implementation	O
of	O
BASIC	O
,	O
Dartmouth	B-Language
BASIC	I-Language
,	O
was	O
a	O
compiler	B-Language
.	O
</s>
<s>
Generally	O
,	O
compilers	B-Language
examine	O
the	O
entire	O
program	O
in	O
a	O
multi-step	O
process	O
and	O
produce	O
a	O
second	O
file	O
that	O
is	O
directly	O
executable	O
in	O
the	O
host	O
computer	O
's	O
underlying	O
machine	B-Language
language	I-Language
without	O
reference	O
to	O
the	O
source	O
code	O
.	O
</s>
<s>
This	O
code	O
is	O
often	O
made	O
up	O
of	O
calls	O
to	O
pre-written	O
routines	O
in	O
the	O
language	O
's	O
runtime	B-Device
system	I-Device
.	O
</s>
<s>
The	O
main	O
disadvantage	O
of	O
compilers	B-Language
,	O
at	O
least	O
in	O
the	O
historical	O
context	O
,	O
is	O
that	O
they	O
require	O
large	O
amounts	O
of	O
temporary	O
memory	O
.	O
</s>
<s>
As	O
the	O
compiler	B-Language
works	O
,	O
it	O
is	O
producing	O
an	O
ever-growing	O
output	O
file	O
that	O
is	O
being	O
held	O
in	O
memory	O
along	O
with	O
the	O
original	O
source	O
code	O
.	O
</s>
<s>
Additional	O
memory	O
for	O
temporary	O
lookups	O
,	O
notably	O
line	B-Application
numbers	I-Application
in	O
the	O
case	O
of	O
BASIC	O
,	O
adds	O
to	O
the	O
memory	O
requirement	O
.	O
</s>
<s>
Computers	O
of	O
the	O
era	O
had	O
very	O
small	O
amounts	O
of	O
memory	O
;	O
in	O
modern	O
terms	O
a	O
typical	O
mainframe	B-Architecture
might	O
have	O
on	O
the	O
order	O
of	O
64KB	O
.	O
</s>
<s>
On	O
a	O
timesharing	B-General_Concept
system	O
,	O
the	O
case	O
for	O
most	O
1960s	O
BASICs	O
,	O
that	O
memory	O
was	O
shared	O
among	O
many	O
users	O
.	O
</s>
<s>
In	O
order	O
to	O
make	O
a	O
compiler	B-Language
work	O
,	O
the	O
systems	O
had	O
to	O
have	O
some	O
form	O
of	O
high-performance	O
secondary	O
storage	O
,	O
typically	O
a	O
hard	B-Device
drive	I-Device
.	O
</s>
<s>
When	O
the	O
user	O
ran	O
the	O
program	O
,	O
the	O
editor	O
exited	O
and	O
ran	O
the	O
compiler	B-Language
,	O
which	O
read	O
that	O
file	O
and	O
produced	O
the	O
executable	O
code	O
,	O
and	O
then	O
finally	O
the	O
compiler	B-Language
would	O
exit	O
and	O
run	O
the	O
resulting	O
program	O
.	O
</s>
<s>
Splitting	O
the	O
task	O
up	O
in	O
this	O
fashion	O
reduced	O
the	O
amount	O
of	O
memory	O
needed	O
by	O
any	O
one	O
of	O
the	O
parts	O
of	O
the	O
overall	O
BASIC	O
system	O
;	O
at	O
any	O
given	O
time	O
,	O
only	O
the	O
editor	O
,	O
compiler	B-Language
,	O
or	O
runtime	O
had	O
to	O
be	O
loaded	O
,	O
the	O
rest	O
was	O
on	O
storage	O
.	O
</s>
<s>
While	O
mainframes	B-Architecture
had	O
small	O
amounts	O
of	O
memory	O
,	O
minicomputers	B-Architecture
had	O
even	O
smaller	O
amounts	O
:	O
4	O
and	O
8KB	O
systems	O
were	O
typical	O
in	O
the	O
1960s	O
.	O
</s>
<s>
But	O
far	O
more	O
importantly	O
,	O
minicomputers	B-Architecture
tended	O
to	O
lack	O
any	O
form	O
of	O
high-performance	O
storage	O
;	O
most	O
early	O
designs	O
used	O
punch	O
tape	O
as	O
a	O
primary	O
storage	O
system	O
,	O
and	O
magnetic	B-Architecture
tape	I-Architecture
systems	O
were	O
for	O
the	O
high	O
end	O
of	O
the	O
market	O
.	O
</s>
<s>
In	O
this	O
environment	O
,	O
a	O
system	O
that	O
wrote	O
out	O
the	O
source	O
,	O
compiled	B-Language
it	O
,	O
and	O
then	O
ran	O
the	O
result	O
would	O
have	O
taken	O
minutes	O
.	O
</s>
<s>
Because	O
of	O
these	O
constraints	O
,	O
interpreters	B-Application
proliferated	O
.	O
</s>
<s>
Interpreters	B-Application
ultimately	O
perform	O
the	O
same	O
basic	O
tasks	O
as	O
compilers	B-Language
,	O
reading	O
the	O
source	O
code	O
and	O
converting	O
that	O
into	O
executable	O
instructions	O
calling	O
runtime	O
functions	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
a	O
compiler	B-Language
,	O
the	O
entire	O
source	O
code	O
is	O
converted	O
during	O
what	O
appears	O
to	O
the	O
user	O
as	O
a	O
single	O
operation	O
,	O
whereas	O
an	O
interpreter	B-Application
converts	O
and	O
runs	O
the	O
source	O
one	O
statement	O
at	O
a	O
time	O
.	O
</s>
<s>
The	O
resulting	O
machine	B-Language
code	I-Language
is	O
executed	O
,	O
rather	O
than	O
output	O
,	O
and	O
then	O
that	O
code	O
is	O
then	O
discarded	O
and	O
the	O
process	O
repeats	O
with	O
the	O
next	O
statement	O
.	O
</s>
<s>
Producing	O
a	O
language	O
with	O
all	O
of	O
these	O
components	O
that	O
can	O
fit	O
into	O
a	O
small	O
amount	O
of	O
memory	O
and	O
still	O
has	O
room	O
for	O
user	O
's	O
source	O
code	O
is	O
a	O
major	O
challenge	O
,	O
but	O
it	O
eliminates	O
the	O
need	O
for	O
secondary	O
storage	O
and	O
was	O
the	O
only	O
practical	O
solution	O
for	O
early	O
minicomputers	B-Architecture
and	O
most	O
of	O
the	O
history	O
of	O
the	O
home	O
computer	O
revolution	O
.	O
</s>
<s>
Language	O
design	O
for	O
the	O
first	O
interpreters	B-Application
often	O
simply	O
involved	O
referencing	O
other	O
implementations	O
.	O
</s>
<s>
For	O
instance	O
,	O
Wozniak	O
's	O
references	O
for	O
BASIC	O
were	O
an	O
HP	O
BASIC	O
manual	O
and	O
a	O
copy	O
of	O
101	B-Application
BASIC	I-Application
Computer	I-Application
Games	I-Application
.	O
</s>
<s>
He	O
did	O
not	O
know	O
that	O
HP	B-Language
's	I-Language
BASIC	I-Language
was	O
very	O
different	O
from	O
the	O
DEC	B-Language
BASIC	I-Language
variety	O
used	O
in	O
101	O
Games	O
.	O
</s>
<s>
Data	B-Language
General	I-Language
Business	I-Language
Basic	I-Language
,	O
an	O
integer-only	O
implementation	O
,	O
was	O
the	O
inspiration	O
for	O
Atari	B-Language
BASIC	I-Language
.	O
</s>
<s>
Allison	O
was	O
urged	O
to	O
create	O
the	O
standard	O
by	O
Bob	O
Albrecht	O
of	O
the	O
Homebrew	O
Computer	O
Club	O
,	O
who	O
had	O
seen	O
BASIC	O
on	O
minicomputers	B-Architecture
and	O
felt	O
it	O
would	O
be	O
the	O
perfect	O
match	O
for	O
new	O
machines	O
like	O
the	O
Altair	O
.	O
</s>
<s>
The	O
overall	O
design	O
for	O
Tiny	B-Language
BASIC	I-Language
was	O
published	O
in	O
the	O
September	O
1975	O
issue	O
of	O
the	O
People	O
's	O
Computer	O
Company	O
(	O
PCC	O
)	O
newsletter	O
.	O
</s>
<s>
This	O
syntax	O
,	O
as	O
simple	O
as	O
it	O
was	O
,	O
added	O
one	O
innovation	O
:	O
and	O
could	O
take	O
an	O
expression	O
rather	O
than	O
a	O
line	B-Application
number	I-Application
,	O
providing	O
an	O
assigned	O
GOTO	B-Application
rather	O
than	O
the	O
switch	O
statement	O
of	O
the	O
structure	O
more	O
typical	O
of	O
BASIC	O
.	O
</s>
<s>
Sinclair	B-Language
BASIC	I-Language
used	O
as	O
its	O
language	O
definition	O
the	O
1978	O
American	O
National	O
Standards	O
Institute	O
(	O
ANSI	O
)	O
Minimal	O
BASIC	O
standard	O
,	O
but	O
was	O
itself	O
an	O
incomplete	O
implementation	O
with	O
integer	O
arithmetic	O
only	O
.	O
</s>
<s>
The	O
ANSI	O
standard	O
was	O
published	O
after	O
the	O
design	O
of	O
the	O
first	O
generation	O
of	O
interpreters	B-Application
for	O
microcomputers	B-Architecture
.	O
</s>
<s>
Common	O
components	O
of	O
a	O
BASIC	B-Language
interpreter	I-Language
:	O
</s>
<s>
Early	O
microcomputers	B-Architecture
lacked	O
development	O
tools	O
,	O
and	O
programmers	O
either	O
developed	O
their	O
code	O
on	O
minicomputers	B-Architecture
or	O
by	O
hand	O
.	O
</s>
<s>
For	O
instance	O
,	O
Dick	O
Whipple	O
and	O
John	O
Arnold	O
wrote	O
Tiny	B-Language
BASIC	I-Language
Extended	O
directly	O
in	O
machine	B-Language
code	I-Language
,	O
using	O
octal	O
.	O
</s>
<s>
Robert	O
Uiterwyk	O
handwrote	O
MICRO	O
BASIC	O
for	O
the	O
SWTPC	O
(	O
a	O
6800	B-Device
system	O
)	O
on	O
a	O
legal	O
pad	O
.	O
</s>
<s>
Steve	O
Wozniak	O
wrote	O
the	O
code	O
to	O
Integer	B-Language
BASIC	I-Language
by	O
hand	O
,	O
translating	O
the	O
assembler	B-Language
code	I-Language
instructions	O
into	O
their	O
machine	B-Language
code	I-Language
equivalents	O
and	O
then	O
uploading	O
the	O
result	O
to	O
his	O
computer	O
.	O
</s>
<s>
Gates	O
and	O
Allen	O
did	O
not	O
have	O
an	O
Altair	O
system	O
on	O
which	O
to	O
develop	O
and	O
test	O
their	O
interpreter	B-Application
.	O
</s>
<s>
However	O
,	O
Allen	O
had	O
written	O
an	O
Intel	B-General_Concept
8008	I-General_Concept
emulator	B-Application
for	O
their	O
previous	O
venture	O
,	O
Traf-O-Data	O
,	O
that	O
ran	O
on	O
a	O
PDP-10	B-Device
time-sharing	B-General_Concept
computer	O
.	O
</s>
<s>
Allen	O
adapted	O
this	O
emulator	B-Application
based	O
on	O
the	O
Altair	O
programmer	O
guide	O
,	O
and	O
they	O
developed	O
and	O
tested	O
the	O
interpreter	B-Application
on	O
Harvard	O
's	O
PDP-10	B-Device
.	O
</s>
<s>
When	O
Harvard	O
stopped	O
their	O
use	O
of	O
this	O
system	O
,	O
Gates	O
and	O
Allen	O
bought	O
computer	O
time	O
from	O
a	O
timesharing	B-General_Concept
service	O
in	O
Boston	O
to	O
complete	O
their	O
BASIC	O
program	O
debugging	O
.	O
</s>
<s>
Not	O
that	O
Allen	O
could	O
n't	O
handcode	O
in	O
machine	B-Language
language	I-Language
.	O
</s>
<s>
While	O
on	O
final	O
approach	O
into	O
the	O
Albuquerque	O
airport	O
on	O
a	O
trip	O
to	O
demonstrate	O
the	O
interpreter	B-Application
,	O
Allen	O
realized	O
he	O
had	O
forgotten	O
to	O
write	O
a	O
bootstrap	O
program	O
to	O
read	O
the	O
tape	O
into	O
memory	O
.	O
</s>
<s>
Writing	O
in	O
8080	O
machine	B-Language
language	I-Language
,	O
Allen	O
finished	O
the	O
program	O
before	O
the	O
plane	O
landed	O
.	O
</s>
<s>
Only	O
when	O
he	O
loaded	O
the	O
program	O
onto	O
an	O
Altair	O
and	O
saw	O
a	O
prompt	O
asking	O
for	O
the	O
system	O
's	O
memory	O
size	O
did	O
he	O
know	O
that	O
the	O
interpreter	B-Application
worked	O
on	O
the	O
Altair	O
hardware	O
.	O
</s>
<s>
One	O
of	O
the	O
most	O
popular	O
of	O
the	O
many	O
versions	O
of	O
Tiny	B-Language
BASIC	I-Language
was	O
Palo	O
Alto	O
Tiny	B-Language
BASIC	I-Language
,	O
or	O
PATB	O
for	O
short	O
.	O
</s>
<s>
PATB	O
first	O
appeared	O
in	O
the	O
May	O
1976	O
edition	O
of	O
Dr.	O
Dobbs	O
,	O
written	O
in	O
a	O
custom	O
assembler	B-Language
language	I-Language
with	O
non-standard	O
mnemonics	O
.	O
</s>
<s>
Li-Chen	O
Wang	O
had	O
coded	O
his	O
interpreter	B-Application
on	O
a	O
time-share	O
system	O
with	O
a	O
generic	O
assembler	B-Language
.	O
</s>
<s>
One	O
exception	O
to	O
the	O
use	O
of	O
assembly	O
was	O
the	O
use	O
of	O
ALGOL	B-Language
60	I-Language
for	O
the	O
Paisley	O
XBASIC	O
interpreter	B-Application
for	O
Burroughs	B-Device
large	I-Device
systems	I-Device
.	O
</s>
<s>
Another	O
exception	O
,	O
and	O
type-in	O
program	O
,	O
was	O
Classic	O
BASIC	O
,	O
written	O
by	O
Lennart	O
Benschop	O
in	O
Forth	B-Application
and	O
published	O
in	O
the	O
Dutch	O
Forth	B-Application
magazine	O
Vijgeblad	O
(	O
issue	O
#42	O
,	O
1993	O
)	O
.	O
</s>
<s>
The	O
source	O
code	O
of	O
interpreters	B-Application
was	O
often	O
open	B-License
source	I-License
(	O
as	O
with	O
Tiny	B-Language
BASIC	I-Language
)	O
or	O
published	O
later	O
by	O
the	O
authors	O
.	O
</s>
<s>
The	O
complete	O
annotated	O
source	O
code	O
and	O
design	O
specifications	O
of	O
Atari	B-Language
BASIC	I-Language
were	O
published	O
as	O
The	O
Atari	B-Language
BASIC	I-Language
Source	O
Book	O
in	O
1983	O
.	O
</s>
<s>
Some	O
BASIC	B-Language
interpreters	I-Language
were	O
coded	O
in	O
the	O
intermediate	B-Application
representation	I-Application
of	O
a	O
virtual	B-Architecture
machine	I-Architecture
to	O
add	O
a	O
layer	O
of	O
abstraction	O
and	O
conciseness	O
above	O
native	O
machine	B-Language
language	I-Language
.	O
</s>
<s>
While	O
virtual	B-Architecture
machines	I-Architecture
had	O
been	O
used	O
in	O
compile	B-Language
and	O
go	O
systems	O
such	O
as	O
BASIC-PLUS	B-Language
,	O
these	O
were	O
only	O
for	O
executing	O
BASIC	O
code	O
,	O
not	O
parsing	O
it	O
.	O
</s>
<s>
Tiny	B-Language
BASIC	I-Language
,	O
in	O
contrast	O
,	O
was	O
designed	O
to	O
be	O
implemented	O
as	O
a	O
virtual	B-Architecture
machine	I-Architecture
that	O
parsed	O
and	O
executed	O
(	O
interpreted	O
)	O
BASIC	O
statements	O
;	O
in	O
such	O
an	O
implementation	O
,	O
the	O
Tiny	B-Language
BASIC	I-Language
interpreter	B-Application
is	O
itself	O
run	O
on	O
a	O
virtual	B-Architecture
machine	I-Architecture
interpreter	B-Application
.	O
</s>
<s>
The	O
length	O
of	O
the	O
whole	O
interpreter	B-Application
program	O
was	O
only	O
120	O
virtual	B-Architecture
machine	I-Architecture
operations	O
,	O
consisting	O
of	O
32	O
commands	O
.	O
</s>
<s>
Thus	O
the	O
choice	O
of	O
a	O
virtual	B-Architecture
machine	I-Architecture
approach	O
economized	O
on	O
memory	O
space	O
and	O
implementation	O
effort	O
,	O
although	O
the	O
BASIC	O
programs	O
run	O
thereon	O
were	O
executed	O
somewhat	O
slowly	O
.	O
</s>
<s>
(	O
See	O
Tiny	B-Language
BASIC	I-Language
:	O
Implementation	O
in	O
a	O
virtual	B-Architecture
machine	I-Architecture
for	O
an	O
excerpt	O
and	O
sample	O
commands	O
.	O
)	O
</s>
<s>
While	O
the	O
design	O
intent	O
was	O
for	O
Tiny	B-Language
BASIC	I-Language
to	O
use	O
a	O
virtual	B-Architecture
machine	I-Architecture
,	O
not	O
every	O
implementation	O
did	O
so	O
;	O
those	O
that	O
did	O
included	O
Tiny	B-Language
BASIC	I-Language
Extended	O
,	O
6800	B-Device
Tiny	B-Language
BASIC	I-Language
,	O
and	O
NIBL	O
.	O
</s>
<s>
For	O
its	O
TI-99/4	B-Device
and	I-Device
TI-99/4A	I-Device
computers	O
,	O
Texas	O
Instruments	O
designed	O
a	O
virtual	B-Architecture
machine	I-Architecture
with	O
a	O
language	O
called	O
GPL	O
,	O
for	O
"	O
Graphic	O
Programming	O
Language	O
"	O
.	O
</s>
<s>
(	O
Although	O
widely	O
blamed	O
for	O
the	O
slow	O
performance	O
of	O
TI-BASIC	B-Language
,	O
part	O
of	O
the	O
problem	O
was	O
that	O
the	O
virtual	B-Architecture
machine	I-Architecture
was	O
stored	O
in	O
graphics	O
ROM	B-Device
,	O
which	O
had	O
a	O
slow	O
8-bit	O
interface	O
.	O
)	O
</s>
<s>
A	O
misunderstanding	O
of	O
the	O
Apple	B-Device
II	I-Device
ROMs	O
led	O
some	O
to	O
believe	O
that	O
Integer	B-Language
BASIC	I-Language
used	O
a	O
virtual	B-Architecture
machine	I-Architecture
,	O
a	O
custom	O
assembler	B-Language
language	I-Language
contained	O
in	O
the	O
Apple	O
ROMs	O
and	O
known	O
as	O
SWEET16	B-Application
.	O
</s>
<s>
SWEET16	B-Application
is	O
based	O
on	O
bytecodes	O
that	O
run	O
within	O
a	O
simple	O
16-bit	O
virtual	B-Architecture
machine	I-Architecture
,	O
so	O
memory	O
could	O
be	O
addressed	O
via	O
indirect	O
16-bit	O
pointers	O
and	O
16-bit	O
math	O
functions	O
calculated	O
without	O
the	O
need	O
to	O
translate	O
those	O
to	O
the	O
underlying	O
multi-instruction	O
8-bit	O
6502	B-General_Concept
code	O
.	O
</s>
<s>
However	O
,	O
SWEET16	B-Application
was	O
not	O
used	O
by	O
the	O
core	O
BASIC	O
code	O
,	O
although	O
it	O
was	O
later	O
used	O
to	O
implement	O
several	O
utilities	O
,	O
such	O
as	O
a	O
line	O
renumbering	B-Application
routine	O
.	O
</s>
<s>
Most	O
BASIC	O
implementations	O
of	O
the	O
era	O
acted	O
as	O
both	O
the	O
language	O
interpreter	B-Application
as	O
well	O
as	O
the	O
line	B-Application
editor	I-Application
.	O
</s>
<s>
When	O
BASIC	O
was	O
running	O
,	O
a	O
command	B-Device
prompt	I-Device
was	O
displayed	O
where	O
the	O
user	O
could	O
enter	O
statements	O
.	O
</s>
<s>
This	O
was	O
known	O
as	O
"	O
direct	B-Application
mode	I-Application
"	O
.	O
</s>
<s>
Upon	O
boot	O
,	O
a	O
BASIC	B-Language
interpreter	I-Language
defaulted	O
to	O
direct	B-Application
mode	I-Application
.	O
</s>
<s>
Statements	O
that	O
were	O
entered	O
without	O
a	O
line	B-Application
number	I-Application
were	O
referred	O
to	O
as	O
commands	O
,	O
and	O
ran	O
immediately	O
.	O
</s>
<s>
Line	B-Application
numbers	I-Application
without	O
statements	O
(	O
i.e.	O
,	O
followed	O
by	O
a	O
carriage	O
return	O
)	O
deleted	O
a	O
previously	O
stored	O
line	O
.	O
</s>
<s>
The	O
original	O
text	O
for	O
that	O
line	O
is	O
then	O
retrieved	O
from	O
the	O
store	O
and	O
run	O
as	O
if	O
the	O
user	O
had	O
just	O
typed	O
it	O
in	O
direct	B-Application
mode	I-Application
.	O
</s>
<s>
Altair	B-Language
BASIC	I-Language
8K	O
had	O
an	O
command	O
to	O
shift	O
into	O
an	O
editing	O
mode	O
for	O
one	O
line	O
.	O
</s>
<s>
Integer	B-Language
BASIC	I-Language
,	O
also	O
included	O
the	O
command	O
to	O
automatically	O
enter	O
line	B-Application
numbers	I-Application
at	O
a	O
given	O
starting	O
number	O
like	O
,	O
adding	O
10	O
to	O
the	O
last	O
number	O
with	O
every	O
new	O
line	O
.	O
</s>
<s>
Some	O
interpreters	B-Application
offered	O
line-renumbering	O
commands	O
or	O
utilities	O
.	O
</s>
<s>
To	O
save	O
RAM	O
,	O
and	O
speed	O
execution	O
,	O
all	O
BASIC	B-Language
interpreters	I-Language
would	O
encode	O
some	O
ASCII	B-Protocol
characters	I-Protocol
of	O
lines	O
into	O
other	O
representations	O
.	O
</s>
<s>
For	O
instance	O
,	O
line	B-Application
numbers	I-Application
were	O
converted	O
into	O
integers	O
stored	O
as	O
bytes	B-Application
or	O
words	O
,	O
and	O
keywords	O
might	O
be	O
assigned	O
single-byte	O
tokens	O
(	O
for	O
instance	O
,	O
storing	O
as	O
the	O
byte	B-Application
value	O
145	O
,	O
in	O
MS-BASIC	O
)	O
.	O
</s>
<s>
As	O
an	O
alternative	O
to	O
tokenization	O
,	O
to	O
save	O
RAM	O
,	O
early	O
Tiny	B-Language
BASIC	I-Language
implementations	O
like	O
Extended	O
Tiny	B-Language
BASIC	I-Language
,	O
Denver	O
Tiny	B-Language
BASIC	I-Language
and	O
MINOL	O
truncated	O
keywords	O
:	O
for	O
,	O
for	O
,	O
for	O
.	O
</s>
<s>
In	O
contrast	O
,	O
Palo	O
Alto	O
Tiny	B-Language
BASIC	I-Language
accepted	O
traditional	O
keywords	O
but	O
allowed	O
any	O
keyword	O
to	O
be	O
abbreviated	O
to	O
its	O
minimal	O
unique	O
string	O
,	O
with	O
a	O
trailing	O
period	O
.	O
</s>
<s>
This	O
system	O
was	O
retained	O
in	O
Level	B-Language
I	I-Language
BASIC	I-Language
for	O
the	O
TRS-80	B-Device
,	O
which	O
used	O
PATB	O
,	O
and	O
was	O
also	O
found	O
in	O
Atari	B-Language
BASIC	I-Language
and	O
the	O
BASIC	O
of	O
various	O
Sharp	B-Device
Pocket	I-Device
Computers	I-Device
.	O
</s>
<s>
To	O
expand	O
an	O
abbreviation	O
,	O
the	O
Atari	B-Language
BASIC	I-Language
tokenizer	O
searches	O
through	O
its	O
list	O
of	O
reserved	O
words	O
to	O
find	O
the	O
first	O
that	O
matches	O
the	O
portion	O
supplied	O
.	O
</s>
<s>
MS	B-Language
BASICs	I-Language
also	O
allowed	O
?	O
</s>
<s>
Most	O
BASIC	B-Language
interpreters	I-Language
perform	O
at	O
least	O
some	O
conversion	O
from	O
the	O
original	O
text	O
form	O
into	O
various	O
platform-specific	O
formats	O
.	O
</s>
<s>
Tiny	B-Language
BASIC	I-Language
was	O
on	O
the	O
simple	O
end	O
:	O
it	O
only	O
converted	O
the	O
line	B-Application
number	I-Application
from	O
its	O
decimal	O
format	O
into	O
binary	O
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
line	B-Application
number	I-Application
"	O
100	O
"	O
became	O
a	O
single	O
byte	B-Application
value	O
,	O
$64	O
,	O
making	O
it	O
smaller	O
to	O
store	O
in	O
memory	O
as	O
well	O
as	O
easier	O
to	O
look	O
up	O
in	O
machine	B-Language
code	I-Language
(	O
a	O
few	O
designs	O
of	O
Tiny	B-Language
BASIC	I-Language
permitted	O
line	B-Application
numbers	I-Application
from	O
only	O
1	O
to	O
254	O
or	O
255	O
,	O
although	O
most	O
used	O
double	O
byte	B-Application
values	O
and	O
line	B-Application
numbers	I-Application
of	O
at	O
least	O
1	O
to	O
999	O
)	O
.	O
</s>
<s>
MS-BASICs	O
went	O
slightly	O
further	O
,	O
converting	O
the	O
line	B-Application
number	I-Application
into	O
a	O
two-byte	O
value	O
and	O
also	O
converting	O
keywords	O
,	O
like	O
or	O
,	O
into	O
a	O
single-byte	O
value	O
,	O
the	O
"	O
token	O
"	O
.	O
</s>
<s>
This	O
meant	O
that	O
was	O
stored	O
in	O
two	O
bytes	B-Application
,	O
while	O
was	O
stored	O
in	O
three	O
bytes	B-Application
,	O
and	O
removing	O
spaces	O
was	O
a	O
common	O
way	O
to	O
improve	O
memory	O
use	O
.	O
</s>
<s>
Sinclair	B-Language
BASIC	I-Language
modified	O
this	O
slightly	O
,	O
removing	O
spaces	O
from	O
the	O
stored	O
code	O
and	O
inserting	O
them	O
in	O
code	O
during	O
a	O
,	O
such	O
that	O
would	O
appear	O
as	O
yet	O
not	O
take	O
up	O
the	O
extra	O
byte	B-Application
in	O
memory	O
.	O
</s>
<s>
In	O
contrast	O
,	O
Integer	B-Language
BASIC	I-Language
would	O
convert	O
the	O
line	O
entirely	O
into	O
tokens	O
that	O
could	O
be	O
immediately	O
read	O
and	O
performed	O
.	O
</s>
<s>
In	O
contrast	O
,	O
Integer	B-Language
BASIC	I-Language
also	O
tokenized	O
numeric	B-Algorithm
variables	O
,	O
avoiding	O
this	O
conversion	O
and	O
speeding	O
up	O
execution	O
.	O
</s>
<s>
The	O
resulting	O
two	O
byte	B-Application
value	O
was	O
inserted	O
into	O
the	O
tokenized	O
code	O
along	O
with	O
a	O
prefix	O
byte	B-Application
indicating	O
a	O
number	O
followed	O
.	O
</s>
<s>
There	O
were	O
numerous	O
other	O
optimizations	O
;	O
where	O
Microsoft	B-Language
BASIC	I-Language
had	O
one	O
token	O
for	O
the	O
keyword	O
,	O
Integer	B-Language
BASIC	I-Language
had	O
three	O
tokens	O
:	O
one	O
if	O
the	O
keyword	O
was	O
followed	O
by	O
no	O
arguments	O
,	O
one	O
if	O
followed	O
by	O
an	O
arithmetic	O
expression	O
,	O
and	O
one	O
if	O
followed	O
by	O
a	O
string	O
literal	O
.	O
</s>
<s>
Carrying	O
this	O
even	O
further	O
,	O
Atari	B-Language
BASIC	I-Language
's	O
tokenizer	O
parses	O
the	O
entire	O
line	O
when	O
it	O
is	O
entered	O
or	O
modified	O
.	O
</s>
<s>
Numeric	B-Algorithm
constants	O
are	O
parsed	O
into	O
their	O
48-bit	O
internal	O
form	O
and	O
then	O
placed	O
in	O
the	O
line	O
in	O
that	O
format	O
,	O
while	O
strings	O
are	O
left	O
in	O
their	O
original	O
format	O
,	O
but	O
prefixed	O
with	O
a	O
byte	B-Application
describing	O
their	O
length	O
.	O
</s>
<s>
Shepardson	O
referred	O
to	O
this	O
early-tokenizing	O
concept	O
as	O
a	O
"	O
pre-compiling	O
interpreter	B-Application
"	O
;	O
statements	O
with	O
syntax	O
errors	O
could	O
not	O
actually	O
be	O
stored	O
,	O
and	O
the	O
user	O
was	O
immediately	O
prompted	O
to	O
correct	O
them	O
.	O
</s>
<s>
Some	O
interpreters	B-Application
,	O
such	O
as	O
the	O
Sinclair	O
systems	O
,	O
basically	O
had	O
the	O
user	O
do	O
the	O
tokenization	O
by	O
providing	O
special	O
keystrokes	O
to	O
enter	O
reserved	O
words	O
.	O
</s>
<s>
Many	O
"	O
pocket	B-Device
computers	I-Device
"	O
similarly	O
use	O
one	O
keystroke	O
(	O
sometimes	O
preceded	O
by	O
various	O
kinds	O
of	O
shift	O
keys	O
)	O
to	O
produce	O
one	O
byte	B-Application
(	O
the	O
keyword	O
token	O
)	O
that	O
represented	O
an	O
entire	O
BASIC	O
keyword	O
,	O
such	O
as	O
,	O
or	O
,	O
such	O
as	O
Sharp	O
pocket	B-Device
computer	I-Device
character	O
sets	O
and	O
TI-BASIC	B-Language
.	O
</s>
<s>
The	O
BASIC	O
expansion	O
for	O
the	O
Bally	B-Device
Astrocade	I-Device
use	O
this	O
as	O
well	O
.	O
</s>
<s>
Valid	O
line	B-Application
numbers	I-Application
varied	O
from	O
implementation	O
to	O
implementation	O
,	O
but	O
were	O
typically	O
from	O
1	O
to	O
32767	O
.	O
</s>
<s>
Most	O
of	O
the	O
memory	O
used	O
by	O
BASIC	B-Language
interpreters	I-Language
was	O
to	O
store	O
the	O
program	O
listing	O
itself	O
.	O
</s>
<s>
Numbered	O
statements	O
were	O
stored	O
in	O
sequential	O
order	O
in	O
a	O
sparse	B-Algorithm
array	I-Algorithm
implemented	O
as	O
a	O
linear	O
collection	O
(	O
technically	O
not	O
a	O
list	O
as	O
no	O
line	B-Application
number	I-Application
could	O
occur	O
more	O
than	O
once	O
)	O
.	O
</s>
<s>
Many	O
Tiny	B-Language
BASIC	I-Language
implementations	O
stored	O
lines	O
as	O
follows	O
:	O
</s>
<s>
Microsoft	B-Language
BASIC	I-Language
,	O
starting	O
with	O
Altair	B-Language
BASIC	I-Language
,	O
stored	O
lines	O
as	O
follows	O
:	O
</s>
<s>
The	O
maximum	O
length	O
of	O
a	O
line	O
varied	O
:	O
64	O
characters	O
in	O
Palo	O
Alto	O
Tiny	B-Language
BASIC	I-Language
,	O
including	O
the	O
decimal	O
representation	O
of	O
the	O
line	B-Application
number	I-Application
;	O
120	O
characters	O
in	O
Atari	B-Language
BASIC	I-Language
;	O
128	O
characters	O
in	O
Integer	B-Language
BASIC	I-Language
;	O
and	O
255	O
characters	O
in	O
MS-BASIC	O
(	O
not	O
including	O
the	O
line	B-Application
number	I-Application
)	O
.	O
</s>
<s>
Interpreters	B-Application
would	O
search	O
the	O
program	O
a	O
line	O
at	O
a	O
time	O
,	O
looking	O
at	O
each	O
line	B-Application
number	I-Application
.	O
</s>
<s>
If	O
it	O
were	O
lower	O
than	O
the	O
new	O
line	B-Application
number	I-Application
,	O
the	O
later	O
lines	O
would	O
be	O
moved	O
in	O
memory	O
to	O
make	O
room	O
for	O
the	O
space	O
required	O
for	O
the	O
new	O
line	O
.	O
</s>
<s>
If	O
it	O
were	O
the	O
same	O
line	B-Application
number	I-Application
,	O
and	O
not	O
the	O
exact	O
same	O
length	O
,	O
subsequent	O
lines	O
would	O
need	O
to	O
be	O
moved	O
forward	O
or	O
backward	O
.	O
</s>
<s>
(	O
Because	O
sequential	O
order	O
was	O
always	O
maintained	O
in	O
memory	O
,	O
these	O
were	O
not	O
linked	B-Data_Structure
lists	I-Data_Structure
.	O
)	O
</s>
<s>
In	O
Tiny	B-Language
BASIC	I-Language
,	O
these	O
searches	O
required	O
checking	O
every	O
byte	B-Application
in	O
a	O
line	O
:	O
the	O
pointer	O
would	O
be	O
incremented	O
again	O
and	O
again	O
until	O
a	O
carriage	O
return	O
was	O
encountered	O
,	O
to	O
find	O
the	O
byte	B-Application
before	O
the	O
next	O
line	O
.	O
</s>
<s>
In	O
Altair	B-Language
BASIC	I-Language
and	O
LLL	O
BASIC	O
,	O
on	O
the	O
other	O
hand	O
,	O
the	O
pointer	O
would	O
instead	O
be	O
set	O
to	O
the	O
start	O
of	O
the	O
next	O
sequential	O
line	O
;	O
this	O
was	O
much	O
faster	O
,	O
but	O
required	O
two	O
bytes	B-Application
per	O
line	O
.	O
</s>
<s>
Given	O
that	O
Tiny	B-Language
BASIC	I-Language
programs	O
were	O
presumed	O
to	O
be	O
4KB	O
or	O
less	O
in	O
size	O
,	O
this	O
was	O
in	O
keeping	O
with	O
Tiny	B-Language
BASIC	I-Language
's	O
general	O
design	O
philosophy	O
of	O
trading	O
off	O
performance	O
in	O
favor	O
of	O
minimizing	O
memory	B-General_Concept
usage	I-General_Concept
.	O
</s>
<s>
When	O
the	O
user	O
typed	O
into	O
the	O
command	O
line	O
,	O
the	O
system	O
would	O
loop	O
over	O
the	O
array	O
of	O
lines	O
,	O
using	O
one	O
of	O
these	O
methods	B-Language
,	O
convert	O
the	O
line	B-Application
number	I-Application
back	O
to	O
decimal	O
format	O
,	O
and	O
then	O
print	O
out	O
the	O
rest	O
of	O
the	O
text	O
in	O
the	O
line	O
,	O
decoding	O
any	O
tokens	O
or	O
other	O
encoded	O
representations	O
.	O
</s>
<s>
As	O
developers	O
added	O
structured	B-Language
programming	I-Language
constructs	O
to	O
BASIC	O
,	O
they	O
often	O
removed	O
the	O
need	O
for	O
line	B-Application
numbers	I-Application
altogether	O
and	O
added	O
text	B-Application
editors	I-Application
and	O
,	O
later	O
,	O
integrated	B-Application
development	I-Application
environments	I-Application
.	O
</s>
<s>
Dartmouth	B-Language
BASIC	I-Language
and	O
HP-BASIC	O
limited	O
variable	O
names	O
to	O
at	O
most	O
two	O
characters	O
(	O
either	O
a	O
single	O
letter	O
or	O
a	O
letter	O
followed	O
by	O
one	O
digit	O
;	O
e.g.	O
,	O
A	O
to	O
Z9	O
)	O
.	O
</s>
<s>
Integer	B-Language
BASIC	I-Language
was	O
unusual	O
in	O
supporting	O
any	O
length	O
variable	O
name	O
(	O
e.g.	O
,	O
SUM	O
,	O
GAMEPOINTS	O
,	O
PLAYER2	O
)	O
,	O
provided	O
it	O
did	O
not	O
contain	O
a	O
reserved	O
word	O
.	O
</s>
<s>
String	O
variables	O
are	O
usually	O
distinguished	O
in	O
many	O
microcomputer	B-Architecture
dialects	O
of	O
BASIC	O
by	O
having	O
$	O
suffixed	O
to	O
their	O
name	O
,	O
and	O
values	O
are	O
often	O
identified	O
as	O
strings	O
by	O
being	O
delimited	O
by	O
"	O
double	O
quotation	O
marks	O
"	O
.	O
</s>
<s>
for	O
single	O
precision	B-Architecture
,	O
and	O
A#	O
for	O
double	O
precision	B-Architecture
.	O
</s>
<s>
With	O
the	O
exception	O
of	O
arrays	O
and	O
(	O
in	O
some	O
implementations	O
)	O
strings	O
,	O
and	O
unlike	O
Pascal	B-Application
and	O
other	O
more	O
structured	B-Language
programming	I-Language
languages	O
,	O
BASIC	O
does	O
not	O
require	O
a	O
variable	O
to	O
be	O
declared	O
before	O
it	O
is	O
referenced	O
.	O
</s>
<s>
Values	O
will	O
typically	O
default	O
to	O
0	O
(	O
of	O
the	O
appropriate	O
precision	B-Architecture
)	O
or	O
the	O
null	B-Data_Structure
string	O
.	O
</s>
<s>
Because	O
Tiny	B-Language
BASIC	I-Language
only	O
used	O
26	O
single-letter	O
variables	O
,	O
variables	O
could	O
be	O
stored	O
as	O
an	O
array	O
without	O
storing	O
their	O
corresponding	O
names	O
,	O
using	O
a	O
formula	O
based	O
on	O
the	O
ASCII	B-Protocol
value	I-Protocol
of	O
the	O
letter	O
as	O
the	O
index	O
.	O
</s>
<s>
Palo	O
Alto	O
Tiny	B-Language
BASIC	I-Language
took	O
this	O
a	O
step	O
further	O
:	O
variables	O
'	O
two-byte	O
values	O
were	O
located	O
in	O
RAM	O
within	O
the	O
program	O
,	O
from	O
bytes	B-Application
130	O
(	O
ASCII	B-Protocol
65	O
,	O
'	O
A	O
 '	O
,	O
times	O
two	O
)	O
to	O
181	O
(	O
ASCII	B-Protocol
90	O
,	O
'	O
Z	O
 '	O
,	O
times	O
two	O
,	O
plus	O
one	O
for	O
the	O
second	O
byte	B-Application
)	O
.	O
</s>
<s>
Most	O
BASICs	O
provided	O
for	O
the	O
ability	O
to	O
have	O
far	O
more	O
than	O
26	O
variables	O
and	O
so	O
needed	O
symbol	B-Application
tables	I-Application
,	O
which	O
would	O
set	O
aside	O
storage	O
capacity	O
for	O
only	O
those	O
variables	O
used	O
.	O
</s>
<s>
In	O
LLL	O
BASIC	O
,	O
each	O
entry	O
in	O
the	O
symbol	B-Application
table	I-Application
was	O
stored	O
as	O
follows	O
:	O
</s>
<s>
Unlike	O
most	O
BASIC	B-Language
interpreters	I-Language
,	O
UIUC	O
BASIC	O
had	O
a	O
hash	B-Error_Name
function	I-Error_Name
,	O
hashing	O
by	O
the	O
letter	O
of	O
the	O
variable/function/array	O
name	O
,	O
then	O
conducting	O
a	O
linear	B-Algorithm
search	I-Algorithm
from	O
there	O
.	O
</s>
<s>
In	O
UIUC	O
BASIC	O
,	O
a	O
symbol	B-Application
table	I-Application
entry	O
was	O
:	O
</s>
<s>
Value	O
(	O
5	O
bytes	B-Application
)	O
:	O
</s>
<s>
User	O
function	O
(	O
first	O
2	O
bytes	B-Application
with	O
the	O
address	O
of	O
the	O
function	O
;	O
byte	B-Application
3	O
is	O
symbol	B-Application
table	I-Application
displacement	O
to	O
the	O
dummy	O
variable	O
parameter	O
in	O
function	O
definition	O
)	O
.	O
</s>
<s>
In	O
Atari	B-Language
BASIC	I-Language
,	O
a	O
set	O
of	O
pointers	O
(	O
addresses	O
)	O
indicated	O
various	O
data	O
:	O
variable	O
names	O
were	O
stored	O
in	O
the	O
variable	O
name	O
table	O
(	O
VNTP	O
–	O
82	O
,	O
8316	O
)	O
and	O
their	O
values	O
were	O
stored	O
in	O
the	O
variable	O
value	O
table	O
(	O
pointed	O
to	O
at	O
VVTP	O
–	O
86	O
,	O
8716	O
)	O
.	O
</s>
<s>
By	O
indirecting	O
the	O
variable	O
names	O
in	O
this	O
way	O
,	O
a	O
reference	O
to	O
a	O
variable	O
needed	O
only	O
one	O
byte	B-Application
to	O
address	O
its	O
entry	O
into	O
the	O
appropriate	O
table	O
.	O
</s>
<s>
One	O
BBC	B-Language
BASIC	I-Language
performance	O
optimization	O
included	O
using	O
multiple	O
linked	B-Data_Structure
lists	I-Data_Structure
for	O
variable	O
lookup	O
rather	O
than	O
a	O
single	O
long	O
list	O
,	O
as	O
in	O
Microsoft	B-Language
BASIC	I-Language
.	O
</s>
<s>
Because	O
of	O
the	O
small	O
RAM	O
capacity	O
of	O
most	O
systems	O
originally	O
used	O
to	O
run	O
BASIC	B-Language
interpreters	I-Language
,	O
clever	O
memory	B-General_Concept
management	I-General_Concept
techniques	O
had	O
to	O
be	O
employed	O
.	O
</s>
<s>
Altair	B-Language
BASIC	I-Language
let	O
users	O
reclaim	O
the	O
space	O
for	O
trigonometry	O
functions	O
if	O
those	O
were	O
n't	O
being	O
used	O
during	O
a	O
session	O
.	O
</s>
<s>
PATB	O
placed	O
the	O
start	O
of	O
the	O
most	O
common	O
subroutines	O
at	O
the	O
front	O
of	O
the	O
program	O
for	O
use	O
by	O
the	O
1-byte	O
8080	O
opcode	O
instead	O
of	O
the	O
3-byte	O
opcode	O
.	O
</s>
<s>
For	O
instance	O
,	O
addresses	O
32	O
to	O
35	O
contained	O
the	O
dimensions	O
of	O
the	O
text	O
window	O
(	O
as	O
opposed	O
to	O
the	O
graphics	O
window	O
)	O
in	O
Applesoft	B-Language
BASIC	I-Language
.	O
</s>
<s>
The	O
command	O
and	O
the	O
function	O
(	O
adapted	O
from	O
machine	B-General_Concept
code	I-General_Concept
monitors	I-General_Concept
such	O
as	O
the	O
DECsystem-10	B-Device
monitor	O
)	O
provided	O
direct	O
memory	O
access	O
,	O
for	O
a	O
variety	O
of	O
purposes	O
,	O
especially	O
for	O
modifying	O
special	O
memory-mapped	B-Architecture
hardware	B-General_Concept
registers	I-General_Concept
to	O
control	O
particular	O
functions	O
of	O
the	O
computer	O
such	O
as	O
the	O
input/output	O
peripherals	O
.	O
</s>
<s>
"	O
Memory	O
maps	O
"	O
(	O
in	O
the	O
archaic	O
sense	O
of	O
lists	O
of	O
memory	O
addresses	O
and	O
their	O
functions	O
)	O
were	O
popular	O
for	O
use	O
with	O
PEEK	B-Language
and	I-Language
POKE	I-Language
,	O
with	O
one	O
of	O
the	O
best	O
known	O
memory	O
maps	O
being	O
the	O
book	O
Mapping	O
the	O
Atari	O
,	O
written	O
by	O
Ian	O
Chadwick	O
.	O
</s>
<s>
Some	O
implementations	O
of	O
the	O
Microsoft	O
interpreter	B-Application
,	O
for	O
example	O
those	O
running	O
on	O
the	O
TRS-80	B-Device
Models	O
I/III	O
,	O
required	O
the	O
user	O
to	O
specify	O
the	O
amount	O
of	O
memory	O
to	O
be	O
used	O
by	O
the	O
interpreter	B-Application
.	O
</s>
<s>
This	O
was	O
to	O
permit	O
a	O
region	O
of	O
memory	O
to	O
be	O
reserved	O
for	O
the	O
installation	O
of	O
machine	B-Language
language	I-Language
subroutines	O
that	O
could	O
be	O
called	O
by	O
the	O
interpreted	O
program	O
,	O
for	O
greater	O
speed	O
of	O
execution	O
.	O
</s>
<s>
Integer	B-Language
BASIC	I-Language
,	O
as	O
its	O
name	O
implies	O
,	O
uses	O
integers	O
as	O
the	O
basis	O
for	O
its	O
math	O
package	O
.	O
</s>
<s>
These	O
were	O
stored	O
internally	O
as	O
a	O
16-bit	O
number	O
,	O
little-endian	O
(	O
as	O
is	O
the	O
6502	B-General_Concept
)	O
.	O
</s>
<s>
Most	O
Tiny	B-Language
BASIC	I-Language
interpreters	B-Application
(	O
as	O
well	O
as	O
Sinclair	B-Language
BASIC	I-Language
4K	O
)	O
supported	O
mathematics	O
using	O
integers	O
only	O
,	O
lacking	O
floating-point	B-Algorithm
support	O
.	O
</s>
<s>
Using	O
integers	O
allowed	O
numbers	O
to	O
be	O
stored	O
in	O
a	O
much	O
more	O
compact	O
16-bit	O
format	O
that	O
could	O
be	O
more	O
rapidly	O
read	O
and	O
processed	O
than	O
the	O
32	O
-	O
or	O
40-bit	O
floating-point	B-Algorithm
formats	I-Algorithm
found	O
in	O
most	O
BASICs	O
of	O
the	O
era	O
.	O
</s>
<s>
Business	B-Language
BASIC	I-Language
implementations	O
,	O
such	O
as	O
Data	B-Language
General	I-Language
Business	I-Language
Basic	I-Language
,	O
were	O
also	O
integer-only	O
,	O
but	O
typically	O
at	O
a	O
higher	O
precision	B-Architecture
:	O
"	O
double	O
precision	B-Architecture
"	O
,	O
i.e.	O
</s>
<s>
32-bit	O
(	O
plus	O
or	O
minus	O
2,147,483,648	O
)	O
and	O
"	O
triple	O
precision	B-Architecture
"	O
(	O
plus	O
or	O
minus	O
1.4x10	O
^14	O
)	O
.	O
</s>
<s>
Other	O
computer	B-Algorithm
number	I-Algorithm
formats	I-Algorithm
were	O
sometimes	O
used	O
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
MINOL	O
Tiny	B-Language
BASIC	I-Language
supported	O
only	O
unsigned	B-Algorithm
bytes	B-Application
,	O
and	O
the	O
MICRO-BASIC	O
Tiny	B-Language
BASIC	I-Language
used	O
Binary	O
Coded	O
Decimal	O
.	O
</s>
<s>
But	O
floating	B-Algorithm
point	I-Algorithm
would	O
come	O
to	O
predominate	O
.	O
</s>
<s>
One	O
story	O
encapsulates	O
why	O
floating	B-Algorithm
point	I-Algorithm
was	O
considered	O
so	O
important	O
.	O
</s>
<s>
The	O
original	O
prototype	O
of	O
the	O
TRS-80	B-Device
Model	I-Device
I	I-Device
ran	O
Li-Chen	O
Wang	O
's	O
public	O
domain	O
version	O
of	O
Tiny	B-Language
BASIC	I-Language
.	O
</s>
<s>
This	O
required	O
only	O
2KB	O
of	O
memory	O
for	O
the	O
interpreter	B-Application
,	O
leaving	O
an	O
average	O
of	O
another	O
2KB	O
free	O
for	O
user	O
programs	O
in	O
common	O
4KB	O
memory	O
layouts	O
of	O
early	O
machines	O
.	O
</s>
<s>
This	O
was	O
because	O
Tiny	B-Language
BASIC	I-Language
used	O
2-byte	O
signed	O
integers	O
with	O
a	O
maximum	O
value	O
of	O
32,767	O
.	O
</s>
<s>
The	O
result	O
was	O
a	O
request	O
for	O
floating-point	B-Algorithm
math	I-Algorithm
for	O
the	O
production	O
version	O
.	O
</s>
<s>
This	O
led	O
to	O
the	O
replacement	O
of	O
the	O
existing	O
16-bit	O
integer	O
code	O
with	O
a	O
version	O
using	O
32-bit	O
single-precision	O
floating-point	B-Algorithm
numbers	I-Algorithm
by	O
Tandy-employee	O
Steve	O
Leininger	O
.	O
</s>
<s>
SCELBAL	B-Language
used	O
floating	B-Algorithm
point	I-Algorithm
routines	O
published	O
by	O
Wadsworth	O
in	O
1975	O
in	O
Machine	B-Language
Language	I-Language
Programming	O
for	O
the	O
8008	B-General_Concept
based	O
on	O
a	O
32-bit	O
(	O
four	O
byte	B-Application
)	O
format	O
for	O
numeric	B-Algorithm
calculations	O
,	O
with	O
a	O
23-bit	O
mantissa	B-Algorithm
,	O
1-bit	O
sign	O
for	O
the	O
mantissa	B-Algorithm
,	O
a	O
7-bit	O
exponent	O
,	O
and	O
1-bit	O
sign	O
for	O
the	O
exponent	O
.	O
</s>
<s>
These	O
were	O
organized	O
in	O
reverse	O
order	O
,	O
with	O
the	O
least	O
significant	O
byte	B-Application
of	O
the	O
mantissa	B-Algorithm
in	O
the	O
first	O
byte	B-Application
,	O
followed	O
by	O
the	O
middle	O
and	O
then	O
most	O
significant	O
byte	B-Application
with	O
the	O
sign	O
in	O
the	O
high	O
bit	O
.	O
</s>
<s>
The	O
manual	O
provides	O
well-documented	O
assembly	B-Language
code	I-Language
for	O
the	O
entire	O
math	O
package	O
,	O
including	O
entry	O
points	O
and	O
usage	O
notes	O
.	O
</s>
<s>
Consultants	O
were	O
typically	O
brought	O
into	O
handle	O
floating-point	B-Algorithm
arithmetic	I-Algorithm
,	O
a	O
specialist	O
domain	O
well	O
studied	O
and	O
developed	O
for	O
the	O
scientific	O
and	O
commercial	O
applications	O
that	O
had	O
characterized	O
mainframes	B-Architecture
.	O
</s>
<s>
When	O
Allen	O
and	O
Gates	O
were	O
developing	O
Altair	B-Language
BASIC	I-Language
,	O
fellow	O
Harvard	O
student	O
Monte	O
Davidoff	O
convinced	O
them	O
to	O
switch	O
from	O
integer	O
arithmetic	O
.	O
</s>
<s>
They	O
hired	O
Davidoff	O
to	O
write	O
a	O
floating-point	B-Algorithm
package	O
that	O
could	O
still	O
fit	O
within	O
the	O
4KB	O
memory	O
limits	O
.	O
</s>
<s>
Steve	O
Wozniak	O
turned	O
to	O
Roy	O
Rankin	O
of	O
Stanford	O
University	O
for	O
implementing	O
the	O
transcendental	O
functions	O
LOG	O
,	O
LOG10	O
,	O
and	O
EXP	O
;	O
however	O
,	O
Wozniak	O
never	O
finished	O
adding	O
floating-point	B-Algorithm
support	O
to	O
Integer	B-Language
BASIC	I-Language
.	O
</s>
<s>
LLL	O
BASIC	O
,	O
developed	O
at	O
the	O
University	O
of	O
Idaho	O
by	O
John	O
Dickenson	O
,	O
Jerry	O
Barber	O
,	O
and	O
John	O
Teeter	O
,	O
turned	O
to	O
David	O
Mead	O
,	O
Hal	O
Brand	O
,	O
and	O
Frank	O
Olken	O
for	O
their	O
floating-point	B-Algorithm
support	O
.	O
</s>
<s>
For	O
UIUC	O
BASIC	O
,	O
a	O
Datapoint	B-Device
2200	I-Device
floating-point	B-Algorithm
package	O
was	O
licensed	O
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
GE-235	B-Device
was	O
chosen	O
for	O
implementing	O
the	O
first	O
version	O
of	O
Dartmouth	B-Language
BASIC	I-Language
specifically	O
because	O
it	O
featured	O
an	O
"	O
Auxiliary	B-General_Concept
Arithmetic	I-General_Concept
Unit	I-General_Concept
"	O
for	O
floating	B-Algorithm
point	I-Algorithm
and	O
double-precision	O
calculations	O
.	O
</s>
<s>
Early	O
interpreters	B-Application
used	O
32-bit	O
formats	O
,	O
similar	O
to	O
the	O
IEEE	O
754	O
single-precision	O
binary	B-Algorithm
floating-point	I-Algorithm
format	O
,	O
which	O
specifies	O
:	O
</s>
<s>
While	O
32-bit	O
formats	O
were	O
common	O
in	O
this	O
era	O
,	O
later	O
versions	O
of	O
BASIC	O
,	O
starting	O
with	O
Microsoft	B-Language
BASIC	I-Language
for	O
the	O
MOS	B-General_Concept
6502	I-General_Concept
,	O
generally	O
adopted	O
a	O
40-bit	O
(	O
five	O
byte	B-Application
)	O
format	O
for	O
added	O
precision	B-Architecture
.	O
</s>
<s>
Relative	O
operations	O
included	O
the	O
standard	O
set	O
of	O
,	O
,	O
,	O
,	O
,	O
and	O
for	O
"	O
not	O
equal	O
"	O
either	O
or	O
the	O
HP-TSB-inspired	O
.	O
</s>
<s>
Dartmouth	B-Language
BASIC	I-Language
's	O
initial	O
edition	O
included	O
the	O
following	O
functions	O
:	O
(	O
absolute	O
value	O
)	O
,	O
(	O
arctangent	O
)	O
,	O
(	O
cosine	O
)	O
,	O
(	O
e	O
raised	O
to	O
the	O
power	O
)	O
,	O
(	O
truncate	O
any	O
fractional	O
value	O
,	O
returning	O
an	O
integer	O
)	O
,	O
(	O
logarithm	O
)	O
,	O
(	O
pseudorandom	B-Algorithm
number	I-Algorithm
generator	I-Algorithm
)	O
,	O
(	O
sine	O
)	O
,	O
(	O
square	O
root	O
)	O
,	O
and	O
(	O
tangent	O
)	O
.	O
</s>
<s>
Altair	B-Language
BASIC	I-Language
and	O
later	O
Microsoft	B-Language
BASICs	I-Language
used	O
the	O
sign	O
of	O
the	O
parameter	O
:	O
For	O
RND(X )	O
,	O
"	O
X	O
<	O
0	O
starts	O
a	O
new	O
sequence	O
of	O
random	O
numbers	O
using	O
X	O
.	O
</s>
<s>
Being	O
unable	O
to	O
return	O
a	O
decimal	O
,	O
integer-only	O
BASICs	O
instead	O
used	O
the	O
value	O
of	O
the	O
parameter	O
,	O
typically	O
to	O
specify	O
an	O
upper	O
bound	O
for	O
the	O
randomization	O
;	O
for	O
example	O
,	O
in	O
Integer	B-Language
BASIC	I-Language
itself	O
,	O
would	O
simulate	O
a	O
die	O
roll	O
,	O
returning	O
values	O
from	O
1	O
to	O
6	O
.	O
</s>
<s>
In	O
contrast	O
,	O
in	O
some	O
TRS-80	B-Device
BASICs	O
,	O
the	O
parameter	O
was	O
the	O
upper	O
bound	O
that	O
could	O
be	O
returned	O
;	O
for	O
instance	O
,	O
would	O
return	O
a	O
value	O
from	O
1	O
to	O
6	O
,	O
and	O
would	O
always	O
return	O
1	O
.	O
</s>
<s>
The	O
second	O
version	O
of	O
Dartmouth	B-Language
BASIC	I-Language
supported	O
matrices	B-Architecture
and	I-Architecture
matrix	I-Architecture
operations	I-Architecture
,	O
useful	O
for	O
the	O
solution	O
of	O
sets	O
of	O
simultaneous	O
linear	O
algebraic	O
equations	O
;	O
matrix	O
operations	O
such	O
as	O
assignment	O
,	O
addition	O
,	O
multiplication	O
(	O
of	O
compatible	O
matrix	O
types	O
)	O
and	O
evaluation	O
of	O
a	O
determinant	O
were	O
supported	O
.	O
</s>
<s>
In	O
contrast	O
,	O
Tiny	B-Language
BASIC	I-Language
as	O
initially	O
designed	O
did	O
n't	O
even	O
have	O
any	O
arrays	O
,	O
due	O
to	O
the	O
limited	O
main	O
memory	O
available	O
on	O
early	O
microcomputers	B-Architecture
,	O
often	O
4KB	O
,	O
which	O
had	O
to	O
include	O
both	O
the	O
interpreter	B-Application
and	O
the	O
BASIC	O
program	O
.	O
</s>
<s>
Palo	O
Alto	O
Tiny	B-Language
BASIC	I-Language
added	O
a	O
single	O
variable-length	B-Data_Structure
array	I-Data_Structure
of	O
integers	O
,	O
the	O
size	O
of	O
which	O
did	O
not	O
have	O
to	O
be	O
dimensioned	O
but	O
used	O
RAM	O
not	O
used	O
by	O
the	O
interpreter	B-Application
or	O
the	O
program	O
listing	O
,	O
.	O
</s>
<s>
SCELBAL	B-Language
supported	O
multiple	O
arrays	O
,	O
but	O
taken	O
together	O
these	O
arrays	O
could	O
have	O
no	O
more	O
than	O
64	O
items	O
.	O
</s>
<s>
Integer	B-Language
BASIC	I-Language
supported	O
arrays	O
of	O
a	O
single	O
dimension	O
,	O
limited	O
in	O
size	O
only	O
by	O
the	O
available	O
memory	O
.	O
</s>
<s>
Tiny	B-Language
BASIC	I-Language
Extended	O
supported	O
two-dimensional	O
arrays	O
of	O
up	O
to	O
255	O
by	O
255	O
.	O
</s>
<s>
Altair	B-Language
BASIC	I-Language
4K	O
supported	O
only	O
arrays	O
(	O
one	O
dimension	O
)	O
while	O
the	O
8K	O
version	O
supported	O
matrices	O
of	O
up	O
to	O
34	O
dimensions	O
.	O
</s>
<s>
Many	O
implementations	O
supported	O
the	O
Dartmouth	B-Language
BASIC	I-Language
practice	O
of	O
not	O
requiring	O
an	O
array	O
to	O
be	O
dimensioned	O
,	O
in	O
which	O
case	O
it	O
was	O
assumed	O
to	O
have	O
11	O
elements	O
(	O
0	O
to	O
10	O
)	O
;	O
e.g.	O
,	O
would	O
create	O
the	O
11-element	O
array	O
as	O
a	O
side	O
effect	O
.	O
</s>
<s>
The	O
dope	B-Data_Structure
vector	I-Data_Structure
of	O
arrays	O
varied	O
from	O
implementation	O
to	O
implementation	O
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
dope	B-Data_Structure
vector	I-Data_Structure
of	O
an	O
Altair	B-Language
BASIC	I-Language
4K	O
array	O
:	O
</s>
<s>
Further	O
,	O
as	O
some	O
interpreters	B-Application
had	O
only	O
one	O
data	O
type	O
(	O
either	O
floating	B-Algorithm
point	I-Algorithm
or	O
integer	O
)	O
,	O
the	O
dope	B-Data_Structure
vector	I-Data_Structure
merely	O
needed	O
to	O
record	O
the	O
number	O
of	O
dimensions	O
and	O
the	O
upper	O
bound	O
of	O
each	O
dimension	O
.	O
</s>
<s>
Interpreters	B-Application
with	O
multiple	O
data	O
types	O
had	O
to	O
record	O
the	O
data	O
type	O
of	O
the	O
array	O
.	O
</s>
<s>
The	O
original	O
Dartmouth	B-Language
BASIC	I-Language
,	O
some	O
of	O
its	O
immediate	O
descendants	O
,	O
and	O
Tiny	B-Language
BASIC	I-Language
implementations	O
lacked	O
string	O
handling	O
.	O
</s>
<s>
The	O
simplest	O
string	O
handling	O
copied	O
HP	B-Language
Time-Shared	I-Language
BASIC	I-Language
and	O
defined	O
string	O
variables	O
as	O
arrays	O
of	O
characters	O
that	O
had	O
to	O
be	O
ensioned	O
prior	O
to	O
use	O
.	O
</s>
<s>
Strings	O
in	O
HP	B-Language
TSB	I-Language
are	O
treated	O
as	O
an	O
array	O
of	O
characters	O
,	O
up	O
to	O
72	O
in	O
total	O
,	O
rather	O
than	O
a	O
single	O
multi-character	O
object	O
.	O
</s>
<s>
Later	O
versions	O
of	O
Dartmouth	B-Language
BASIC	I-Language
did	O
include	O
string	O
variables	O
.	O
</s>
<s>
However	O
,	O
they	O
did	O
not	O
use	O
the	O
LEFT$	O
/MID	O
$	O
/RIGHT	O
$	O
functions	O
for	O
manipulating	O
strings	O
,	O
but	O
instead	O
used	O
the	O
CHANGE	O
command	O
which	O
converted	O
the	O
string	O
to	O
and	O
from	O
equivalent	O
ASCII	B-Protocol
values	I-Protocol
.	O
</s>
<s>
Additionally	O
,	O
one	O
could	O
use	O
the	O
single-quote	O
to	O
convert	O
a	O
numeric	B-Algorithm
constant	O
to	O
an	O
ASCII	B-Protocol
character	I-Protocol
,	O
allowing	O
one	O
to	O
build	O
up	O
a	O
string	O
in	O
parts	O
;	O
A$='23	O
'	O
64	O
'	O
49	O
"	O
DEF	O
"	O
produced	O
the	O
string	O
"	O
ABCDEF	O
"	O
,	O
without	O
the	O
need	O
for	O
the	O
CHR$( 	O
)	O
function	O
.	O
</s>
<s>
Dartmouth	B-Language
BASIC	I-Language
Sixth	O
Edition	O
supported	O
(	O
for	O
)	O
and	O
(	O
for	O
)	O
.	O
</s>
<s>
Integer	B-Language
BASIC	I-Language
,	O
North	B-Language
Star	I-Language
BASIC	I-Language
and	O
Atari	B-Language
BASIC	I-Language
mimicked	O
HP	O
's	O
approach	O
,	O
which	O
again	O
contrasted	O
with	O
the	O
style	O
found	O
in	O
BASICs	O
derived	O
from	O
DEC	O
,	O
including	O
Microsoft	B-Language
BASIC	I-Language
,	O
where	O
strings	O
are	O
an	O
intrinsic	O
variable-length	O
type	O
.	O
</s>
<s>
Some	O
of	O
the	O
Tiny	B-Language
BASIC	I-Language
implementations	O
supported	O
one	O
or	O
more	O
predefined	O
integer	O
arrays	O
,	O
which	O
could	O
be	O
used	O
to	O
store	O
character	O
codes	O
,	O
provided	O
the	O
language	O
had	O
functionality	O
to	O
input	O
and	O
output	O
character	O
codes	O
(	O
e.g.	O
,	O
Astro	O
BASIC	O
had	O
KP	O
and	O
TV	O
for	O
this	O
purpose	O
)	O
.	O
</s>
<s>
Having	O
strings	O
use	O
a	O
fixed	O
amount	O
of	O
memory	O
regardless	O
of	O
the	O
number	O
of	O
characters	O
used	O
within	O
them	O
,	O
up	O
to	O
a	O
maximum	O
of	O
255	O
characters	O
,	O
may	O
have	O
wasted	O
memory	O
but	O
had	O
the	O
advantage	O
of	O
avoiding	O
the	O
need	O
for	O
implementing	O
garbage	B-General_Concept
collection	I-General_Concept
of	O
the	O
heap	B-Application
,	O
a	O
form	O
of	O
automatic	B-General_Concept
memory	I-General_Concept
management	I-General_Concept
used	O
to	O
reclaim	O
memory	O
occupied	O
by	O
strings	O
that	O
are	O
no	O
longer	O
in	O
use	O
.	O
</s>
<s>
On	O
early	O
microcomputers	B-Architecture
,	O
with	O
their	O
limited	O
memory	O
and	O
slow	O
processors	O
,	O
BASIC	O
garbage	B-General_Concept
collection	I-General_Concept
could	O
often	O
cause	O
apparently	O
random	O
,	O
inexplicable	O
pauses	O
in	O
the	O
midst	O
of	O
program	O
operation	O
.	O
</s>
<s>
Some	O
BASIC	B-Language
interpreters	I-Language
,	O
such	O
as	O
Applesoft	B-Language
BASIC	I-Language
on	O
the	O
Apple	B-Device
II	I-Device
family	I-Device
,	O
repeatedly	O
scanned	O
the	O
string	O
descriptors	O
for	O
the	O
string	O
having	O
the	O
highest	O
address	O
in	O
order	O
to	O
compact	O
it	O
toward	O
high	O
memory	O
,	O
resulting	O
in	O
O(n2 )	O
performance	O
,	O
which	O
could	O
introduce	O
minutes-long	O
pauses	O
in	O
the	O
execution	O
of	O
string-intensive	O
programs	O
.	O
</s>
<s>
Garbage	B-General_Concept
collection	I-General_Concept
was	O
notoriously	O
slow	O
or	O
even	O
broken	O
in	O
other	O
versions	O
of	O
Microsoft	B-Language
BASIC	I-Language
.	O
</s>
<s>
Some	O
operating	B-General_Concept
systems	I-General_Concept
that	O
supported	O
interrupt-driven	O
background	O
tasks	O
,	O
such	O
as	O
TRSDOS/LS	B-Operating_System
-DOS	I-Operating_System
6.x	I-Operating_System
on	O
the	O
TRS-80	B-Device
Model	I-Device
4	I-Device
,	O
exploited	O
periods	O
of	O
user	O
inactivity	O
(	O
such	O
as	O
the	O
milliseconds-long	O
periods	O
between	O
keystrokes	O
and	O
periods	O
following	O
video	O
screen	O
refresh	O
)	O
to	O
process	O
garbage	B-General_Concept
collection	I-General_Concept
during	O
BASIC	O
program	O
runs	O
.	O
</s>
<s>
Most	O
BASIC	B-Language
interpreters	I-Language
differed	O
widely	O
in	O
graphics	O
and	O
sound	O
,	O
which	O
varied	O
dramatically	O
from	O
microcomputer	B-Architecture
to	O
microcomputer	B-Architecture
.	O
</s>
<s>
Altair	B-Language
BASIC	I-Language
lacked	O
any	O
graphics	O
or	O
sound	O
commands	O
,	O
as	O
did	O
the	O
Tiny	B-Language
BASIC	I-Language
implementations	O
,	O
while	O
Integer	B-Language
BASIC	I-Language
provided	O
a	O
rich	O
set	O
.	O
</s>
<s>
Level	B-Language
I	I-Language
BASIC	I-Language
for	O
the	O
TRS-80	B-Device
had	O
as	O
minimal	O
a	O
set	O
as	O
possible	O
:	O
,	O
for	O
CLear	O
Screen	O
;	O
,	O
which	O
lit	O
a	O
location	O
on	O
the	O
display	O
;	O
,	O
which	O
turned	O
it	O
off	O
;	O
and	O
,	O
which	O
returned	O
1	O
if	O
a	O
location	O
was	O
lit	O
,	O
0	O
if	O
it	O
was	O
not	O
.	O
</s>
<s>
In	O
contrast	O
,	O
Integer	B-Language
BASIC	I-Language
supported	O
color	O
graphics	O
,	O
simple	O
sound	O
,	O
and	O
game	B-Device
controllers	I-Device
.	O
</s>
<s>
Hardware	O
manufacturers	O
often	O
included	O
proprietary	O
support	O
for	O
semigraphics	B-Data_Structure
,	O
simple	O
shapes	O
and	O
icons	O
treated	O
as	O
special	O
characters	O
.	O
</s>
<s>
Examples	O
included	O
the	O
block	O
graphics	O
of	O
the	O
ZX-81	O
,	O
and	O
the	O
card	O
symbols	O
of	O
♠	O
,	O
♣	O
,	O
♥	O
and	O
♦	O
in	O
the	O
Commodore	O
International	O
PETSCII	B-Protocol
character	O
set	O
.	O
</s>
<s>
Microsoft	O
added	O
many	O
graphics	O
commands	O
to	O
IBM	B-Language
BASIC	I-Language
:	O
,	O
(	O
Pixel	O
SET	O
)	O
,	O
(	O
Pixel	O
RESET	O
)	O
,	O
(	O
stores	O
a	O
rectangle	O
of	O
the	O
screen	O
to	O
an	O
array	O
)	O
,	O
(	O
displays	O
a	O
stored	O
rectangular	O
segment	O
)	O
,	O
(	O
to	O
move	O
the	O
text	O
cursor	O
)	O
,	O
and	O
,	O
which	O
sketches	O
shapes	O
using	O
a	O
LOGO-like	O
syntax	O
.	O
</s>
<s>
Bill	O
Gates	O
and	O
Neil	O
Konzen	O
wrote	O
DONKEY.BAS	B-Application
,	O
a	O
bundled	O
game	O
,	O
to	O
demonstrate	O
the	O
interpreter	B-Application
's	O
color	O
graphics	O
and	O
sound	O
.	O
</s>
<s>
Another	O
area	O
where	O
implementations	O
diverged	O
was	O
in	O
keywords	O
for	O
dealing	O
with	O
media	O
(	O
cassettes	O
and	O
floppy	B-Device
disks	I-Device
)	O
,	O
keyboard	O
input	O
,	O
and	O
game	B-Device
controllers	I-Device
(	O
if	O
any	O
)	O
.	O
</s>
<s>
Since	O
ROM-based	O
BASIC	B-Language
interpreters	I-Language
often	O
functioned	O
as	O
shells	B-Operating_System
for	O
loading	O
in	O
other	O
applications	O
,	O
implementations	O
added	O
commands	O
related	O
to	O
cassette	B-Device
tapes	I-Device
(	O
e.g.	O
,	O
and	O
)	O
,	O
binary	O
disk	O
files	O
(	O
e.g.	O
,	O
,	O
,	O
and	O
)	O
,	O
and	O
BASIC	O
programs	O
on	O
disk	O
(	O
e.g.	O
,	O
,	O
,	O
and	O
)	O
.	O
</s>
<s>
Business	B-Language
BASIC	I-Language
implementations	O
added	O
commands	O
for	O
random-access	O
files	O
.	O
</s>
<s>
(	O
Even	O
ROM-based	O
BASIC	B-Language
interpreters	I-Language
were	O
not	O
designed	O
or	O
intended	O
to	O
be	O
used	O
as	O
operating	B-General_Concept
systems	I-General_Concept
,	O
and	O
smaller	O
microcomputers	B-Architecture
simply	O
lacked	O
any	O
OS	O
at	O
all	O
.	O
)	O
</s>
<s>
Dartmouth	B-Language
BASIC	I-Language
lacked	O
a	O
command	O
for	O
getting	O
input	O
from	O
the	O
keyboard	O
without	O
pausing	O
the	O
program	O
.	O
</s>
<s>
To	O
support	O
videogames	O
,	O
BASICs	O
added	O
proprietary	O
commands	O
for	O
doing	O
so	O
:	O
was	O
a	O
function	O
in	O
Microsoft	B-Language
BASIC	I-Language
that	O
would	O
return	O
an	O
empty	O
string	O
if	O
no	O
key	O
was	O
pressed	O
or	O
otherwise	O
a	O
single	O
character	O
;	O
(	O
for	O
KeyPress	O
)	O
returned	O
the	O
ASCII	B-Protocol
value	I-Protocol
of	O
the	O
input	O
in	O
Astro	O
BASIC	O
.	O
</s>
<s>
Palo	O
Alto	O
Tiny	B-Language
BASIC	I-Language
lacked	O
strings	O
but	O
would	O
allow	O
users	O
to	O
enter	O
mathematical	O
expressions	O
as	O
the	O
answer	O
to	O
statements	O
;	O
by	O
setting	O
variables	O
,	O
such	O
as	O
Y	O
=	O
1	O
;	O
N	O
=	O
0	O
,	O
the	O
user	O
could	O
answer	O
“	O
Y	O
”	O
or	O
“	O
1	O
”	O
or	O
even	O
"	O
3*	O
2-5	O
"	O
at	O
a	O
yes/no	O
prompt	O
.	O
</s>
<s>
Some	O
systems	O
supported	O
game	B-Device
controllers	I-Device
.	O
</s>
<s>
Integer	B-Language
BASIC	I-Language
supported	O
a	O
game	B-Device
controller	I-Device
,	O
a	O
paddle	B-Device
controller	I-Device
,	O
which	O
had	O
two	O
controllers	O
on	O
a	O
single	O
connector	O
.	O
</s>
<s>
Integer	B-Language
BASIC	I-Language
lacked	O
any	O
custom	O
input/output	O
commands	O
,	O
and	O
also	O
lacked	O
the	O
statement	O
and	O
the	O
associated	O
.	O
</s>
<s>
To	O
get	O
data	O
into	O
and	O
out	O
of	O
a	O
program	O
,	O
the	O
input/output	O
functionality	O
was	O
redirected	O
to	O
a	O
selected	O
card	B-Device
slot	I-Device
with	O
the	O
and	O
,	O
which	O
redirected	O
output	O
or	O
input	O
(	O
respectively	O
)	O
to	O
the	O
numbered	O
slot	O
.	O
</s>
<s>
Producing	O
sounds	O
was	O
accomplished	O
by	O
ing	O
the	O
memory-mapped	B-Architecture
location	O
of	O
a	O
simple	O
"	O
beeper	O
"	O
,	O
−16336	O
.	O
</s>
<s>
While	O
structured	B-Language
programming	I-Language
,	O
through	O
the	O
examples	O
of	O
ALGOL	B-Language
58	I-Language
and	O
ALGOL	B-Language
60	I-Language
,	O
were	O
known	O
to	O
Kemeny	O
and	O
Kurtz	O
when	O
they	O
designed	O
BASIC	O
,	O
they	O
adapted	O
only	O
the	O
for-loop	O
,	O
ignoring	O
the	O
else-statement	O
,	O
while-loop	O
,	O
repeat	O
loop	O
,	O
named	O
procedures	O
,	O
parameter	O
passing	O
,	O
and	O
local	O
variables	O
.	O
</s>
<s>
For	O
instance	O
,	O
(	O
in	O
Microsoft	B-Language
BASIC	I-Language
)	O
,	O
(	O
in	O
Turbo-Basic	B-Language
XL	I-Language
)	O
,	O
and	O
even	O
clauses	O
(	O
both	O
in	O
BASIC-PLUS	B-Language
)	O
.	O
</s>
<s>
Of	O
the	O
Tiny	B-Language
BASIC	I-Language
implementations	O
,	O
only	O
National	O
Industrial	O
Basic	O
Language	O
(	O
NIBL	O
)	O
offered	O
a	O
loop	O
command	O
of	O
any	O
sort	O
,	O
.	O
</s>
<s>
This	O
was	O
despite	O
the	O
inventor	O
of	O
Tiny	B-Language
BASIC	I-Language
,	O
Dennis	O
Allison	O
,	O
publicly	O
lamenting	O
the	O
state	O
of	O
BASIC	O
.	O
</s>
<s>
BBC	B-Language
BASIC	I-Language
was	O
one	O
of	O
the	O
first	O
microcomputer	B-Architecture
interpreters	B-Application
to	O
offer	O
structured	O
BASIC	B-Language
programming	I-Language
,	O
with	O
named	O
DEF	O
PROC/DEF	O
FN	O
procedures	O
and	O
functions	O
,	O
REPEAT	O
UNTIL	O
loops	O
,	O
and	O
IF	O
THEN	O
ELSE	O
structures	O
inspired	O
by	O
COMAL	B-Language
.	O
</s>
<s>
Second-generation	O
BASICs	O
—	O
for	O
example	O
,	O
SBASIC	O
(	O
1976	O
)	O
,	O
BBC	B-Language
BASIC	I-Language
(	O
1981	O
)	O
,	O
True	B-Language
BASIC	I-Language
(	O
1983	O
)	O
,	O
Beta	B-Language
BASIC	I-Language
(	O
1983	O
)	O
,	O
QuickBASIC	B-Language
(	O
1985	O
)	O
,	O
and	O
AmigaBASIC	B-Language
(	O
1986	O
)	O
--	O
introduced	O
a	O
number	O
of	O
features	O
into	O
the	O
language	O
,	O
primarily	O
related	O
to	O
structured	O
and	O
procedure-oriented	O
programming	O
.	O
</s>
<s>
Usually	O
,	O
line	B-Application
numbering	I-Application
is	O
omitted	O
from	O
the	O
language	O
and	O
replaced	O
with	O
labels	O
(	O
for	O
GOTO	B-Application
)	O
and	O
procedures	O
to	O
encourage	O
easier	O
and	O
more	O
flexible	O
design	O
.	O
</s>
<s>
The	O
following	O
example	O
is	O
in	O
Microsoft	B-Language
QBASIC	I-Language
,	O
Microsoft	O
's	O
third	O
implementation	O
of	O
a	O
structured	O
BASIC	O
(	O
following	O
Macintosh	B-Language
BASIC	I-Language
in	O
1984	O
and	O
Amiga	B-Language
BASIC	I-Language
in	O
1985	O
)	O
.	O
</s>
<s>
Initial	O
support	O
for	O
object-oriented	B-Language
programming	I-Language
provided	O
only	O
the	O
re-use	O
of	O
objects	O
created	O
with	O
other	O
languages	O
,	O
such	O
as	O
how	O
Visual	B-Language
Basic	I-Language
and	O
PowerBASIC	B-Language
supported	O
the	O
Windows	B-Application
Component	B-Application
Object	I-Application
Model	I-Application
.	O
</s>
<s>
As	O
BASIC	B-Language
interpreters	I-Language
continued	O
to	O
evolve	O
,	O
they	O
added	O
support	O
for	O
object-oriented	B-Language
features	O
such	O
as	O
methods	B-Language
,	O
constructors	O
,	O
dynamic	B-General_Concept
memory	I-General_Concept
allocation	I-General_Concept
,	O
properties	B-Language
and	O
temporary	O
allocation	O
.	O
</s>
<s>
The	O
Integer	B-Language
BASIC	I-Language
ROMs	O
also	O
included	O
a	O
machine	B-General_Concept
code	I-General_Concept
monitor	I-General_Concept
,	O
"	O
mini-assembler	O
"	O
,	O
and	O
disassembler	O
to	O
create	O
and	O
debug	O
assembly	B-Language
language	I-Language
programs	O
.	O
</s>
<s>
One	O
of	O
the	O
unique	O
features	O
of	O
BBC	B-Language
BASIC	I-Language
was	O
the	O
inline	B-Language
assembler	I-Language
,	O
allowing	O
users	O
to	O
write	O
assembly	B-Language
language	I-Language
programs	O
for	O
the	O
6502	B-General_Concept
and	O
,	O
later	O
,	O
the	O
Zilog	B-General_Concept
Z80	I-General_Concept
,	O
NS32016	B-Device
and	O
ARM	B-Architecture
.	O
</s>
<s>
The	O
assembler	B-Language
was	O
fully	O
integrated	O
into	O
the	O
BASIC	B-Language
interpreter	I-Language
and	O
shared	O
variables	O
with	O
it	O
,	O
which	O
could	O
be	O
included	O
between	O
the	O
[	O
and	O
]	O
characters	O
,	O
saved	O
via	O
*	O
SAVE	O
and	O
*	O
LOAD	O
,	O
and	O
called	O
via	O
the	O
CALL	O
or	O
USR	O
commands	O
.	O
</s>
<s>
This	O
allowed	O
developers	O
to	O
write	O
not	O
just	O
assembly	B-Language
language	I-Language
code	O
,	O
but	O
also	O
BASIC	O
code	O
to	O
emit	O
assembly	B-Language
language	I-Language
,	O
making	O
it	O
possible	O
to	O
use	O
code-generation	O
techniques	O
and	O
even	O
write	O
simple	O
compilers	B-Language
in	O
BASIC	O
.	O
</s>
<s>
As	O
in	O
most	O
BASICs	O
,	O
programs	O
were	O
started	O
with	O
the	O
command	O
,	O
and	O
as	O
was	O
common	O
,	O
could	O
be	O
directed	O
at	O
a	O
particular	O
line	B-Application
number	I-Application
like	O
.	O
</s>
<s>
Execution	O
could	O
be	O
stopped	O
at	O
any	O
time	O
using	O
(	O
or	O
BREAK	O
such	O
as	O
on	O
the	O
TRS-80	B-Device
)	O
and	O
then	O
restarted	O
with	O
inue	O
(	O
in	O
Integer	B-Language
BASIC	I-Language
)	O
.	O
</s>
<s>
Taking	O
advantage	O
of	O
the	O
unique	O
capabilities	O
of	O
interpreted	O
programs	O
(	O
code	O
is	O
processed	O
in	O
realtime	O
one	O
statement	O
at	O
a	O
time	O
,	O
in	O
contrast	O
to	O
compilers	B-Language
)	O
,	O
the	O
user	O
at	O
the	O
console	O
could	O
examine	O
variable	O
data	O
using	O
the	O
PRINT	O
statement	O
,	O
and	O
change	O
such	O
data	O
on-the-fly	O
,	O
then	O
resume	O
program	O
execution	O
.	O
</s>
<s>
For	O
step-by-step	O
execution	O
,	O
the	O
or	O
instruction	O
could	O
be	O
used	O
at	O
the	O
command	B-Device
prompt	I-Device
or	O
placed	O
within	O
the	O
program	O
itself	O
.	O
</s>
<s>
When	O
it	O
was	O
turned	O
on	O
,	O
line	B-Application
numbers	I-Application
were	O
printed	O
out	O
for	O
each	O
line	O
the	O
program	O
visited	O
.	O
</s>
<s>
Some	O
implementations	O
such	O
as	O
the	O
Microsoft	O
interpreters	B-Application
for	O
the	O
various	O
marks	O
of	O
TRS-80	B-Device
included	O
the	O
command	O
.	O
</s>
<s>
This	O
would	O
redirect	O
program	O
execution	O
to	O
a	O
specified	O
line	B-Application
number	I-Application
for	O
special	O
error	O
handling	O
.	O
</s>
<s>
Unlike	O
most	O
BASICs	O
,	O
Atari	B-Language
BASIC	I-Language
scanned	O
the	O
just-entered	O
program	O
line	O
and	O
reported	O
syntax	O
errors	O
immediately	O
.	O
</s>
<s>
If	O
an	O
error	O
was	O
found	O
,	O
the	O
editor	O
re-displayed	O
the	O
line	O
,	O
highlighting	O
the	O
text	O
near	O
the	O
error	O
in	O
inverse	B-General_Concept
video	I-General_Concept
.	O
</s>
<s>
In	O
many	O
interpreters	B-Application
,	O
including	O
Atari	B-Language
BASIC	I-Language
,	O
errors	O
are	O
displayed	O
as	O
numeric	B-Algorithm
codes	O
,	O
with	O
the	O
descriptions	O
printed	O
in	O
the	O
manual	O
.	O
</s>
<s>
Palo	O
Alto	O
Tiny	B-Language
BASIC	I-Language
and	O
Level	B-Language
I	I-Language
BASIC	I-Language
used	O
three	O
words	O
for	O
error	O
messages	O
:	O
"	O
WHAT	O
?	O
"	O
</s>
<s>
for	O
run-time	O
errors	O
like	O
GOTOs	O
to	O
a	O
line	O
that	O
did	O
n't	O
exist	O
or	O
numeric	B-Algorithm
overflows	O
,	O
and	O
"	O
SORRY	O
"	O
for	O
out-of-memory	O
problems	O
.	O
</s>
<s>
To	O
support	O
such	O
expressions	O
requires	O
implementing	O
a	O
recursive	B-Application
descent	I-Application
parser	I-Application
.	O
</s>
<s>
As	O
a	O
virtual	B-Architecture
machine	I-Architecture
,	O
as	O
discussed	O
above	O
for	O
many	O
Tiny	B-Language
BASIC	I-Language
implementations	O
.	O
</s>
<s>
The	O
value	O
of	O
the	O
Tiny	B-Language
BASIC	I-Language
initiative	O
was	O
in	O
specifying	O
an	O
implementation	O
of	O
a	O
parser	O
.	O
</s>
<s>
As	O
a	O
finite-state	B-Architecture
machine	I-Architecture
,	O
as	O
in	O
UIUC	O
BASIC	O
IUC	O
,	O
where	O
it	O
was	O
implemented	O
as	O
a	O
control	B-Application
table	I-Application
.	O
</s>
<s>
Directly	O
in	O
code	O
,	O
as	O
in	O
Palo	O
Alto	O
Tiny	B-Language
BASIC	I-Language
and	O
Integer	B-Language
BASIC	I-Language
.	O
</s>
<s>
In	O
Integer	B-Language
BASIC	I-Language
,	O
the	O
runtime	B-Application
interpreter	I-Application
used	O
two	O
stacks	O
for	O
execution	O
:	O
one	O
for	O
statement	O
keywords	O
and	O
the	O
other	O
for	O
evaluating	O
the	O
parameters	O
.	O
</s>
<s>
When	O
variables	O
were	O
encountered	O
,	O
their	O
name	O
was	O
parsed	O
and	O
then	O
looked	O
up	O
in	O
the	O
symbol	B-Application
table	I-Application
.	O
</s>
<s>
The	O
range	O
of	O
design	O
decisions	O
that	O
went	O
into	O
programming	O
a	O
BASIC	B-Language
interpreter	I-Language
were	O
often	O
revealed	O
through	O
performance	O
differences	O
.	O
</s>
<s>
Line-management	O
implementations	O
often	O
affected	O
performance	O
and	O
typically	O
used	O
linear	B-Algorithm
search	I-Algorithm
.	O
</s>
<s>
Delimiting	O
each	O
line	O
with	O
a	O
CR	O
would	O
make	O
a	O
GOTO	B-Application
or	O
GOSUB	O
to	O
a	O
later	O
line	O
would	O
take	O
longer	O
,	O
as	O
the	O
program	O
would	O
need	O
to	O
iterate	O
over	O
all	O
the	O
lines	O
to	O
find	O
the	O
target	O
line	B-Application
number	I-Application
.	O
</s>
<s>
In	O
some	O
implementations	O
,	O
such	O
as	O
Atari	B-Language
BASIC	I-Language
,	O
the	O
length	O
of	O
each	O
line	O
was	O
recorded	O
and	O
stored	O
after	O
the	O
line	B-Application
number	I-Application
,	O
so	O
that	O
the	O
program	O
did	O
not	O
have	O
to	O
scan	O
each	O
character	O
of	O
the	O
line	O
to	O
find	O
the	O
next	O
carriage	O
return	O
.	O
</s>
<s>
Many	O
implementations	O
would	O
always	O
search	O
for	O
a	O
line	B-Application
number	I-Application
to	O
branch	O
to	O
from	O
the	O
start	O
of	O
the	O
program	O
;	O
MS-BASIC	O
would	O
search	O
from	O
the	O
current	O
line	O
,	O
if	O
the	O
destination	O
line	B-Application
number	I-Application
was	O
greater	O
.	O
</s>
<s>
Pittman	O
added	O
a	O
patch	O
to	O
his	O
6800	B-Device
Tiny	B-Language
BASIC	I-Language
to	O
use	O
a	O
binary	O
search	O
.	O
</s>
<s>
As	O
many	O
computer	O
benchmarks	O
of	O
the	O
era	O
were	O
small	O
and	O
often	O
performed	O
simple	O
math	O
that	O
did	O
not	O
require	O
floating-point	B-Algorithm
,	O
Integer	B-Language
BASIC	I-Language
trounced	O
most	O
other	O
BASICs	O
.	O
</s>
<s>
On	O
one	O
of	O
the	O
earliest	O
known	O
microcomputer	B-Architecture
benchmarks	O
,	O
the	O
Rugg/Feldman	O
benchmarks	O
,	O
Integer	B-Language
BASIC	I-Language
was	O
well	O
over	O
twice	O
as	O
fast	O
as	O
Applesoft	B-Language
BASIC	I-Language
on	O
the	O
same	O
machine	O
.	O
</s>
<s>
In	O
the	O
Byte	B-Language
Sieve	I-Language
,	O
where	O
math	O
was	O
less	O
important	O
but	O
array	O
access	O
and	O
looping	O
performance	O
dominated	O
,	O
Integer	B-Language
BASIC	I-Language
took	O
166	O
seconds	O
while	O
Applesoft	O
took	O
200	O
.	O
</s>
<s>
It	O
did	O
not	O
appear	O
in	O
the	O
Creative	O
Computing	O
Benchmark	O
,	O
which	O
was	O
first	O
published	O
in	O
1983	O
,	O
by	O
which	O
time	O
Integer	B-Language
BASIC	I-Language
was	O
no	O
longer	O
supplied	O
by	O
default	O
.	O
</s>
<s>
In	O
theory	O
,	O
Atari	B-Language
BASIC	I-Language
should	O
have	O
run	O
faster	O
than	O
contemporary	O
BASICs	O
based	O
on	O
the	O
Microsoft	O
pattern	O
.	O
</s>
<s>
In	O
spite	O
of	O
these	O
theoretical	O
advantages	O
,	O
in	O
practice	O
,	O
Atari	B-Language
BASIC	I-Language
is	O
slower	O
than	O
other	O
home	O
computer	O
BASICs	O
,	O
often	O
by	O
a	O
large	O
amount	O
.	O
</s>
<s>
On	O
two	O
widely	O
used	O
benchmarks	O
of	O
the	O
era	O
,	O
Byte	B-Application
magazine	O
's	O
Sieve	B-Language
of	I-Language
Eratosthenes	I-Language
and	O
the	O
Creative	O
Computing	O
benchmark	O
test	O
written	O
by	O
David	O
H	O
.	O
Ahl	O
,	O
the	O
Atari	O
finished	O
near	O
the	O
end	O
of	O
the	O
list	O
in	O
terms	O
of	O
performance	O
,	O
and	O
was	O
much	O
slower	O
than	O
the	O
contemporary	O
Apple	B-Device
II	I-Device
or	O
Commodore	B-Device
PET	I-Device
,	O
in	O
spite	O
of	O
having	O
the	O
same	O
CPU	O
but	O
running	O
it	O
at	O
roughly	O
twice	O
the	O
speed	O
of	O
either	O
.	O
</s>
<s>
The	O
first	O
is	O
that	O
the	O
floating-point	B-Algorithm
math	I-Algorithm
routines	O
were	O
poorly	O
optimized	O
.	O
</s>
<s>
Second	O
,	O
the	O
conversion	O
between	O
the	O
internal	O
floating-point	B-Algorithm
format	I-Algorithm
and	O
the	O
16-bit	O
integers	O
used	O
in	O
certain	O
parts	O
of	O
the	O
language	O
was	O
relatively	O
slow	O
.	O
</s>
<s>
Internally	O
,	O
these	O
integers	O
were	O
used	O
for	O
line	B-Application
numbers	I-Application
and	O
array	O
indexing	O
,	O
along	O
with	O
a	O
few	O
other	O
tasks	O
,	O
but	O
numbers	O
in	O
the	O
tokenized	O
program	O
were	O
always	O
stored	O
in	O
binary-coded	O
decimal	O
(	O
BCD	O
)	O
format	O
.	O
</s>
<s>
Whenever	O
one	O
of	O
these	O
is	O
encountered	O
,	O
for	O
instance	O
,	O
in	O
the	O
line	B-Application
number	I-Application
in	O
,	O
the	O
tokenized	O
BCD	O
value	O
has	O
to	O
be	O
converted	O
to	O
an	O
integer	O
,	O
an	O
operation	O
that	O
can	O
take	O
as	O
long	O
as	O
3500microseconds	O
.	O
</s>
<s>
Other	O
BASICs	O
avoided	O
this	O
delay	O
by	O
special-casing	O
the	O
conversion	O
of	O
numbers	O
that	O
could	O
only	O
possibly	O
be	O
integers	O
,	O
like	O
the	O
line	B-Application
number	I-Application
following	O
a	O
,	O
switching	O
to	O
special	O
ASCII-to-integer	O
code	O
to	O
improve	O
performance	O
.	O
</s>
<s>
Third	O
was	O
how	O
Atari	B-Language
BASIC	I-Language
implemented	O
branches	O
and	O
FOR	O
loops	O
.	O
</s>
<s>
To	O
perform	O
a	O
branch	O
in	O
a	O
GOTO	B-Application
or	O
GOSUB	O
,	O
the	O
interpreter	B-Application
searches	O
through	O
the	O
entire	O
program	O
for	O
the	O
matching	O
line	B-Application
number	I-Application
it	O
needs	O
.	O
</s>
<s>
One	O
minor	O
improvement	O
found	O
in	O
most	O
Microsoft-derived	O
BASICs	O
is	O
to	O
compare	O
the	O
target	O
line	B-Application
number	I-Application
to	O
the	O
current	O
line	B-Application
number	I-Application
,	O
and	O
search	O
forward	O
from	O
that	O
point	O
if	O
it	O
is	O
greater	O
,	O
or	O
start	O
from	O
the	O
top	O
if	O
less	O
.	O
</s>
<s>
This	O
improvement	O
was	O
missing	O
in	O
Atari	B-Language
BASIC	I-Language
.	O
</s>
<s>
Unlike	O
almost	O
all	O
other	O
BASICs	O
,	O
which	O
would	O
push	O
a	O
pointer	O
to	O
the	O
location	O
of	O
the	O
FOR	O
on	O
a	O
stack	O
,	O
so	O
when	O
it	O
reached	O
the	O
NEXT	O
it	O
could	O
easily	O
return	O
to	O
the	O
FOR	O
again	O
in	O
a	O
single	O
branch	O
operation	O
,	O
Atari	B-Language
BASIC	I-Language
pushed	O
the	O
line	B-Application
number	I-Application
instead	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
any	O
loops	O
in	O
an	O
Atari	B-Language
BASIC	I-Language
program	O
cause	O
a	O
large	O
loss	O
of	O
performance	O
relative	O
to	O
other	O
BASICs	O
.	O
</s>
