<s>
Beta	B-Language
BASIC	I-Language
is	O
a	O
BASIC	B-Language
interpreter	I-Language
for	O
the	O
Sinclair	O
Research	O
ZX	B-Operating_System
Spectrum	I-Operating_System
microcomputer	B-Architecture
,	O
written	O
by	O
Dr	O
Andrew	O
Wright	O
in	O
1983	O
and	O
sold	O
by	O
his	O
one-man	O
software	O
house	O
BetaSoft	O
.	O
</s>
<s>
Originally	O
it	O
started	O
as	O
a	O
BASIC	B-Language
toolkit	I-Language
but	O
over	O
time	O
it	O
grew	O
into	O
a	O
full	O
replacement	O
.	O
</s>
<s>
Beta	B-Language
BASIC	I-Language
completely	O
replaced	O
Sinclair	B-Language
BASIC	I-Language
,	O
which	O
as	O
common	O
for	O
the	O
time	O
was	O
also	O
the	O
OS	B-General_Concept
providing	O
a	O
command	B-Application
line	I-Application
interface	I-Application
(	O
CLI	O
)	O
.	O
</s>
<s>
Thus	O
Beta	B-Language
BASIC	I-Language
provided	O
a	O
new	O
and	O
improved	O
CLI	O
and	O
editor	O
.	O
</s>
<s>
However	O
,	O
the	O
single-key	O
entry	O
system	O
was	O
also	O
extended	O
by	O
mapping	O
the	O
Spectrum	O
's	O
'	O
graphics	O
 '	O
characters	O
to	O
Beta	B-Language
BASIC	I-Language
's	O
new	O
keywords	O
.	O
</s>
<s>
The	O
editor	O
,	O
when	O
listing	O
,	O
could	O
optionally	O
automatically	O
prettyprint	B-Application
code	O
.	O
</s>
<s>
It	O
was	O
possible	O
to	O
do	O
this	O
manually	O
in	O
Sinclair	B-Language
BASIC	I-Language
,	O
but	O
automatic	O
indentation	O
has	O
the	O
advantage	O
of	O
highlighting	O
certain	O
types	O
of	O
coding	O
error	O
-	O
primarily	O
those	O
to	O
do	O
with	O
failing	O
to	O
correctly	O
close	O
constructs	O
.	O
</s>
<s>
Combined	O
with	O
the	O
64-column	O
display	O
(	O
see	O
"	O
New	O
functionality	O
"	O
section	O
below	O
)	O
,	O
these	O
improvements	O
made	O
Beta	B-Language
BASIC	I-Language
a	O
much	O
more	O
productive	O
environment	O
even	O
for	O
coding	O
standard	O
Sinclair	B-Language
BASIC	I-Language
and	O
making	O
no	O
use	O
of	O
BetaSoft	O
's	O
language	O
additions	O
.	O
</s>
<s>
Beta	B-Language
BASIC	I-Language
was	O
also	O
a	O
standalone	O
interpreter	B-Application
in	O
its	O
own	O
right	O
,	O
bypassing	O
the	O
Spectrum	O
ROM	B-Device
,	O
which	O
it	O
used	O
as	O
a	O
library	O
.	O
</s>
<s>
It	O
occasionally	O
made	O
calls	O
into	O
the	O
ROM	B-Device
to	O
access	O
functions	O
that	O
were	O
not	O
worth	O
re-implementing	O
either	O
because	O
the	O
ROM	B-Device
routines	O
were	O
good	O
enough	O
or	O
for	O
reasons	O
of	O
space	O
-	O
Beta	B-Language
BASIC	I-Language
had	O
to	O
run	O
in	O
the	O
48KB	O
of	O
memory	O
available	O
on	O
a	O
Spectrum	O
and	O
still	O
leave	O
room	O
for	O
the	O
user	O
's	O
code	O
.	O
</s>
<s>
For	O
its	O
time	O
,	O
Beta	B-Language
BASIC	I-Language
was	O
sophisticated	O
.	O
</s>
<s>
It	O
provided	O
full	O
structured	B-Language
programming	I-Language
with	O
named	O
procedures	O
and	O
functions	O
,	O
complete	O
with	O
local	O
variables	O
,	O
allowing	O
for	O
programming	O
using	O
recursion	O
.	O
</s>
<s>
On	O
the	O
128K	O
Spectrum	O
machines	O
,	O
Beta	B-Language
BASIC	I-Language
provided	O
extended	O
facilities	O
allowing	O
programmers	O
to	O
access	O
the	O
machine	O
's	O
extra	O
memory	O
,	O
which	O
took	O
the	O
form	O
of	O
a	O
RAM	B-Application
disk	I-Application
.	O
</s>
<s>
As	O
well	O
as	O
allowing	O
the	O
programmer	O
to	O
save	O
and	O
load	O
programs	O
,	O
blocks	O
of	O
memory	O
or	O
screen	O
images	O
into	O
the	O
RAM	O
disc	O
and	O
catalogue	O
the	O
contents	O
of	O
the	O
RAM	B-Application
disk	I-Application
,	O
Beta	B-Language
BASIC	I-Language
also	O
provided	O
commands	O
for	O
the	O
creation	O
and	O
use	O
of	O
arrays	B-Data_Structure
held	O
in	O
the	O
RAM	B-Application
disk	I-Application
,	O
allowing	O
programs	O
running	O
in	O
the	O
30KB	O
or	O
so	O
of	O
free	O
memory	O
on	O
the	O
Spectrum	O
to	O
manipulate	O
arrays	B-Data_Structure
approaching	O
80KB	O
-	O
a	O
significant	O
extra	O
amount	O
of	O
space	O
by	O
1980s	O
standards	O
and	O
more	O
than	O
almost	O
any	O
other	O
8-bit	O
BASIC	O
,	O
which	O
were	O
generally	O
limited	O
to	O
64KB	O
of	O
program	O
and	O
data	O
combined	O
.	O
</s>
<s>
Beta	B-Language
BASIC	I-Language
also	O
drove	O
the	O
Spectrum	O
's	O
256x192	O
pixel	B-Algorithm
display	O
directly	O
,	O
eliminating	O
the	O
restrictions	O
of	O
the	O
ROM	B-Device
's	O
32-column	O
text	O
display	O
.	O
</s>
<s>
Beta	B-Language
BASIC	I-Language
offered	O
scalable	O
screen	O
fonts	O
,	O
with	O
a	O
special	O
soft	O
font	O
which	O
was	O
only	O
4	O
pixels	B-Algorithm
wide	O
but	O
still	O
legible	O
.	O
</s>
<s>
This	O
meant	O
that	O
Beta	B-Language
BASIC	I-Language
could	O
display	O
64	O
columns	O
of	O
text	O
across	O
the	O
screen	O
,	O
making	O
it	O
more	O
comparable	O
to	O
traditional	O
80-column	O
displays	O
of	O
computer	B-General_Concept
terminals	I-General_Concept
and	O
typical	O
hobbyist	O
and	O
professional	O
CP/M	B-Application
machines	O
.	O
</s>
<s>
Beta	B-Language
BASIC	I-Language
suffered	O
from	O
some	O
limitations	O
.	O
</s>
<s>
As	O
with	O
other	O
8-bit	O
microprocessors	O
,	O
the	O
Spectrum	O
could	O
only	O
address	O
64KB	O
of	O
contiguous	O
memory	O
due	O
to	O
the	O
addressing	O
restrictions	O
of	O
the	O
Spectrum	O
's	O
Zilog	B-General_Concept
Z80	I-General_Concept
CPU	B-Device
.	O
</s>
<s>
Of	O
this	O
,	O
16KB	O
was	O
taken	O
by	O
the	O
Sinclair	B-Language
BASIC	I-Language
ROM	B-Device
,	O
leaving	O
48KB	O
for	O
RAM	O
.	O
</s>
<s>
The	O
screen	O
took	O
some	O
of	O
this	O
,	O
as	O
did	O
the	O
areas	O
used	O
for	O
holding	O
the	O
interpreter	B-Application
's	O
own	O
internal	O
data	O
structures	O
.	O
</s>
<s>
Beta	B-Language
BASIC	I-Language
took	O
around	O
11-12KB	O
of	O
the	O
remainder	O
,	O
in	O
some	O
cases	O
leaving	O
only	O
20KB	O
or	O
so	O
for	O
user	O
programs	O
.	O
</s>
<s>
The	O
replacement	O
of	O
Sinclair	O
's	O
editor	O
meant	O
that	O
it	O
was	O
not	O
possible	O
to	O
use	O
the	O
128K	O
Spectrum	O
ROM	B-Device
's	O
full-screen	O
BASIC	O
editor	O
.	O
</s>
<s>
No	O
compiler	B-Language
was	O
available	O
for	O
Beta	B-Language
BASIC	I-Language
code	O
and	O
existing	O
Sinclair	B-Language
BASIC	I-Language
compilers	B-Language
such	O
as	O
HiSoft	B-Device
BASIC	O
could	O
not	O
handle	O
the	O
extended	O
keywords	O
and	O
facilities	O
of	O
Beta	B-Language
BASIC	I-Language
.	O
</s>
<s>
Another	O
remaining	O
Sinclair	B-Language
BASIC	I-Language
limitation	O
was	O
that	O
only	O
single-letter	O
variable	O
names	O
could	O
be	O
used	O
for	O
strings	O
,	O
arrays	B-Data_Structure
and	O
other	O
types	O
.	O
</s>
<s>
The	O
only	O
other	O
8-bit	O
BASIC	O
with	O
inbuilt	O
support	O
for	O
structured	B-Language
programming	I-Language
was	O
BBC	B-Language
BASIC	I-Language
.	O
</s>
<s>
Beta	B-Language
BASIC	I-Language
named	O
procedures	O
did	O
not	O
need	O
to	O
be	O
called	O
with	O
the	O
PROC	O
keyword	O
like	O
in	O
BBC	B-Language
BASIC	I-Language
and	O
thus	O
became	O
new	O
language	O
keywords	O
,	O
allowing	O
the	O
language	O
to	O
be	O
extended	O
in	O
itself	O
.	O
</s>
<s>
However	O
,	O
BBC	B-Language
BASIC	I-Language
was	O
considerably	O
quicker	O
-	O
the	O
fastest	O
BASIC	B-Language
interpreter	I-Language
of	O
the	O
time	O
.	O
</s>
<s>
Beta	B-Language
BASIC	I-Language
was	O
not	O
especially	O
fast	O
,	O
though	O
it	O
included	O
faster	O
replacements	O
for	O
particularly	O
slow	O
ROM	B-Device
routines	O
,	O
such	O
as	O
the	O
circle	O
and	O
arc	O
drawing	O
code	O
.	O
</s>
<s>
Special	O
versions	O
were	O
produced	O
for	O
users	O
of	O
Interface	B-Device
1	I-Device
and	O
the	O
ZX	B-Device
Microdrive	I-Device
,	O
and	O
subsequently	O
for	O
those	O
with	O
the	O
Opus	O
Discovery	O
,	O
DISCiPLE	B-Device
and	O
PlusD	B-Device
disk	O
interfaces	O
as	O
well	O
.	O
</s>
<s>
During	O
the	O
development	O
of	O
their	O
sophisticated	O
new	O
successor	O
to	O
the	O
Spectrum	O
,	O
the	O
SAM	B-Device
Coupé	I-Device
,	O
Alan	O
Miles	O
and	O
Bruce	O
Gordon	O
of	O
Miles	O
Gordon	O
Technology	O
approached	O
BetaSoft	O
and	O
contracted	O
Wright	O
to	O
provide	O
the	O
BASIC	O
for	O
the	O
new	O
machine	O
.	O
</s>
<s>
He	O
provided	O
a	O
complete	O
BASIC	B-Language
interpreter	I-Language
which	O
drew	O
extensively	O
upon	O
Beta	B-Language
BASIC	I-Language
but	O
was	O
differently	O
structured	O
,	O
as	O
this	O
was	O
a	O
language	O
in	O
its	O
own	O
right	O
and	O
had	O
no	O
Sinclair	O
ROM	B-Device
to	O
call	O
upon	O
or	O
work	O
around	O
.	O
</s>
<s>
SAM	O
BASIC	O
was	O
largely	O
compatible	O
with	O
Beta	B-Language
BASIC	I-Language
and	O
operated	O
in	O
a	O
very	O
similar	O
manner	O
,	O
except	O
for	O
areas	O
where	O
the	O
SAM	O
hardware	O
was	O
significantly	O
different	O
,	O
such	O
as	O
the	O
SAM	O
's	O
screen	O
and	O
extended	O
memory	O
.	O
</s>
