<s>
The	B-Language
IBM	I-Language
Personal	I-Language
Computer	I-Language
Basic	I-Language
,	O
commonly	O
shortened	O
to	O
IBM	B-Language
BASIC	I-Language
,	O
is	O
a	O
programming	O
language	O
first	O
released	O
by	O
IBM	O
with	O
the	O
IBM	B-Device
Personal	I-Device
Computer	I-Device
,	I-Device
Model	I-Device
5150	I-Device
(	O
IBM	B-Device
PC	I-Device
)	O
in	O
1981	O
.	O
</s>
<s>
IBM	O
released	O
four	O
different	O
versions	O
of	O
the	O
Microsoft	B-Language
BASIC	I-Language
interpreter	B-Language
,	O
licensed	O
from	O
Microsoft	O
for	O
the	O
PC	O
and	O
PCjr	B-Device
.	O
</s>
<s>
They	O
are	O
known	O
as	O
Cassette	O
BASIC	O
,	O
Disk	O
BASIC	O
,	O
Advanced	O
BASIC	O
(	O
BASICA	O
)	O
,	O
and	O
Cartridge	B-Protocol
BASIC	O
.	O
</s>
<s>
Versions	O
of	O
Disk	O
BASIC	O
and	O
Advanced	O
BASIC	O
were	O
included	O
with	O
IBM	B-Operating_System
PC	I-Operating_System
DOS	I-Operating_System
up	O
to	O
PC	B-Operating_System
DOS	I-Operating_System
4	O
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
features	O
of	O
an	O
ANSI	O
standard	O
BASIC	O
,	O
the	O
IBM	O
versions	O
offered	O
support	O
for	O
the	O
graphics	O
and	O
sound	O
hardware	O
of	O
the	O
IBM	B-Device
PC	I-Device
line	O
.	O
</s>
<s>
IBM	O
also	O
released	O
a	O
version	O
of	O
the	O
Microsoft	B-Language
BASIC	I-Language
compiler	B-Language
for	O
the	O
PC	O
,	O
concurrently	O
with	O
the	O
release	O
of	O
PC	B-Operating_System
DOS	I-Operating_System
1.10	O
in	O
1982	O
.	O
</s>
<s>
IBM	O
licensed	O
Microsoft	B-Language
BASIC	I-Language
for	O
the	O
IBM	B-Device
Personal	I-Device
Computer	I-Device
,	O
despite	O
already	O
having	O
its	O
own	O
version	O
of	O
BASIC	O
for	O
the	O
company	O
's	O
mainframes	O
.	O
</s>
<s>
Don	O
Estridge	O
said	O
,	O
"	O
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>
IBM	O
Cassette	O
BASIC	O
came	O
in	O
32	O
kilobytes	O
(	O
KB	O
)	O
of	O
read-only	B-Device
memory	I-Device
(	O
ROM	B-Device
)	O
,	O
separate	O
from	O
the	O
8KB	O
BIOS	B-Operating_System
ROM	I-Operating_System
of	O
the	O
original	O
IBM	B-Device
PC	I-Device
,	O
and	O
did	O
not	O
require	O
an	O
operating	B-General_Concept
system	I-General_Concept
to	O
run	O
.	O
</s>
<s>
Cassette	O
BASIC	O
provided	O
the	O
default	O
user	O
interface	O
invoked	O
by	O
the	O
BIOS	B-Operating_System
through	O
INT	O
18h	O
if	O
there	O
was	O
no	O
floppy	B-Device
disk	I-Device
drive	I-Device
installed	O
,	O
or	O
if	O
the	O
boot	B-Operating_System
code	I-Operating_System
did	O
not	O
find	O
a	O
bootable	B-Operating_System
floppy	B-Device
disk	I-Device
at	O
power	O
up	O
.	O
</s>
<s>
The	O
name	O
Cassette	O
BASIC	O
came	O
from	O
its	O
use	O
of	O
cassette	B-Device
tapes	I-Device
rather	O
than	O
floppy	B-Device
disks	I-Device
to	O
store	O
programs	O
and	O
data	O
.	O
</s>
<s>
Cassette	O
BASIC	O
was	O
built	O
into	O
the	O
ROMs	O
of	O
the	O
original	O
PC	O
and	O
XT	B-Device
,	O
and	O
early	O
models	O
in	O
the	O
PS/2	B-Device
line	O
.	O
</s>
<s>
It	O
only	O
supports	O
loading	O
and	O
saving	O
programs	O
to	O
the	O
IBM	B-Device
cassette	I-Device
tape	I-Device
interface	O
,	O
which	O
is	O
unavailable	O
on	O
models	O
after	O
the	O
original	O
Model	O
5150	O
.	O
</s>
<s>
The	O
entry-level	O
version	O
of	O
the	O
5150	O
came	O
with	O
just	O
16KB	O
of	O
random-access	B-Architecture
memory	I-Architecture
(	O
RAM	B-Architecture
)	O
,	O
which	O
was	O
sufficient	O
to	O
run	O
Cassette	O
BASIC	O
.	O
</s>
<s>
However	O
,	O
Cassette	O
BASIC	O
was	O
rarely	O
used	O
because	O
few	O
PCs	O
were	O
sold	O
without	O
a	O
disk	O
drive	O
,	O
and	O
most	O
were	O
sold	O
with	O
PC	B-Operating_System
DOS	I-Operating_System
and	O
sufficient	O
RAM	B-Architecture
to	O
at	O
least	O
run	O
Disk	O
BASIC	O
—	O
many	O
could	O
run	O
Advanced	O
BASIC	O
as	O
well	O
.	O
</s>
<s>
There	O
are	O
three	O
versions	O
of	O
Cassette	O
BASIC	O
:	O
C1.00	O
(	O
found	O
on	O
the	O
early	O
IBM	B-Device
PCs	I-Device
with	O
16	O
–	O
64K	O
motherboards	B-Device
)	O
,	O
C1.10	O
(	O
found	O
on	O
all	O
later	O
IBM	B-Device
PCs	I-Device
,	O
XTs	O
,	O
ATs	O
,	O
and	O
PS/2s	B-Device
)	O
,	O
and	O
C1.20	O
(	O
found	O
on	O
the	O
PCjr	B-Device
)	O
.	O
</s>
<s>
IBM	O
Disk	O
BASIC	O
(	O
BASIC.COM	O
)	O
was	O
included	O
in	O
the	O
original	O
IBM	B-Operating_System
PC	I-Operating_System
DOS	I-Operating_System
.	O
</s>
<s>
Because	O
it	O
uses	O
the	O
32KB	O
Cassette	O
BASIC	O
ROM	B-Device
,	O
BASIC.COM	O
did	O
not	O
run	O
on	O
even	O
highly	O
compatible	O
PC	O
clones	O
,	O
such	O
as	O
the	O
Compaq	B-Device
Portable	I-Device
.	O
</s>
<s>
The	O
name	O
Disk	O
BASIC	O
came	O
from	O
its	O
use	O
of	O
floppy	B-Device
disks	I-Device
as	O
well	O
as	O
cassette	B-Device
tapes	I-Device
to	O
store	O
programs	O
and	O
data	O
.	O
</s>
<s>
Disk-based	O
code	O
corrected	O
errata	O
in	O
the	O
ROM-resident	O
code	O
and	O
added	O
floppy	B-Device
disk	I-Device
and	O
serial	B-Protocol
port	I-Protocol
support	O
.	O
</s>
<s>
The	O
primary	O
purpose	O
of	O
Disk	O
BASIC	O
was	O
as	O
a	O
"	O
light	O
"	O
version	O
for	O
IBM	B-Device
PCs	I-Device
with	O
only	O
48KB	O
of	O
memory	O
:	O
BASIC.COM	O
would	O
then	O
have	O
about	O
23KB	O
free	O
for	O
user	O
code	O
,	O
whereas	O
BASICA	O
would	O
only	O
have	O
about	O
17KB	O
.	O
</s>
<s>
Even	O
with	O
all	O
this	O
excess	O
RAM	B-Architecture
,	O
BASIC	O
would	O
still	O
only	O
allocate	O
and	O
manage	O
just	O
under	O
61KB	O
for	O
user	O
programs	O
,	O
whether	O
it	O
was	O
Cassette	O
BASIC	O
,	O
BASIC.COM	O
or	O
BASICA	O
.	O
</s>
<s>
IBM	O
Advanced	O
BASIC	O
(	O
BASICA.COM	O
)	O
was	O
also	O
included	O
in	O
the	O
original	O
IBM	B-Operating_System
PC	I-Operating_System
DOS	I-Operating_System
,	O
and	O
required	O
the	O
ROM-resident	O
code	O
of	O
Cassette	O
BASIC	O
.	O
</s>
<s>
It	O
adds	O
functions	O
such	O
as	O
diskette	B-Device
file	O
access	O
,	O
storing	O
programs	O
on	O
disk	O
,	O
monophonic	O
sound	O
using	O
the	O
PC	O
's	O
built-in	O
speaker	O
,	O
graphics	O
functions	O
to	O
set	O
and	O
clear	O
pixels	O
,	O
draw	O
lines	O
and	O
circles	O
,	O
and	O
set	O
colors	O
,	O
and	O
event	O
handling	O
for	O
communications	O
and	O
joystick	O
presses	O
.	O
</s>
<s>
BASICA	O
will	O
not	O
run	O
on	O
non-IBM	O
computers	O
(	O
even	O
so-called	O
"	O
100%	O
compatible	O
"	O
machines	O
)	O
or	O
later	O
IBM	O
models	O
,	O
since	O
those	O
lack	O
the	O
needed	O
ROM	B-Device
BASIC	O
.	O
</s>
<s>
The	O
PAINT	O
command	B-Application
in	O
BASIC	O
1.x	O
begins	O
filling	O
at	O
the	O
coordinate	O
specified	O
and	O
expands	O
outward	O
in	O
alternating	O
up	O
and	O
down	O
directions	O
while	O
in	O
BASIC	O
2.x	O
it	O
fills	O
everything	O
below	O
the	O
starting	O
coordinate	O
and	O
then	O
after	O
finishing	O
,	O
everything	O
above	O
it	O
.	O
</s>
<s>
BASIC	O
1.x	O
'	O
s	O
PAINT	O
command	B-Application
also	O
makes	O
use	O
of	O
the	O
system	O
stack	O
for	O
storage	O
and	O
when	O
filling	O
in	O
complex	O
areas	O
,	O
it	O
is	O
possible	O
to	O
produce	O
an	O
OVERFLOW	O
error	O
.	O
</s>
<s>
To	O
remedy	O
this	O
,	O
the	O
CLEAR	O
statement	O
can	O
be	O
used	O
to	O
expand	O
BASIC	O
's	O
stack	O
(	O
128	O
bytes	B-Application
is	O
the	O
default	O
size	O
)	O
.	O
</s>
<s>
Compaq	O
BASIC	O
1.13	O
was	O
the	O
first	O
standalone	O
BASIC	O
for	O
the	O
PC	O
(	O
that	O
did	O
not	O
require	O
Cassette	O
BASIC	O
to	O
run	O
)	O
as	O
well	O
as	O
the	O
only	O
version	O
of	O
BASIC	O
besides	O
IBM	O
BASICA	O
1.00	O
and	O
1.10	O
to	O
use	O
FCBs	O
and	O
include	O
the	O
original	O
LINE	O
statement	O
with	O
intersecting	O
lines	O
(	O
the	O
PAINT	O
statement	O
in	O
Compaq	O
BASIC	O
1.13	O
worked	O
like	O
in	O
all	O
later	O
versions	O
of	O
BASICA/GW	O
-BASIC	O
,	O
using	O
the	O
new	O
fill	O
algorithm	O
and	O
no	O
stack	O
)	O
.	O
</s>
<s>
Early	O
versions	O
of	O
PC	B-Operating_System
DOS	I-Operating_System
include	O
several	O
sample	O
BASIC	O
programs	O
demonstrating	O
the	O
capabilities	O
of	O
the	O
PC	O
,	O
including	O
the	O
BASICA	O
game	O
DONKEY.BAS	B-Application
.	O
</s>
<s>
GW-BASIC	B-Language
is	O
identical	O
to	O
BASICA	O
,	O
with	O
the	O
exception	O
of	O
including	O
the	O
Cassette	O
BASIC	O
code	O
in	O
the	O
program	O
,	O
thus	O
allowing	O
it	O
to	O
run	O
on	O
non-IBM	O
computers	O
and	O
later	O
IBM	O
models	O
that	O
lack	O
Cassette	O
BASIC	O
in	O
ROM	B-Device
.	O
</s>
<s>
A	O
ROM	B-Protocol
cartridge	I-Protocol
version	O
of	O
BASIC	O
was	O
only	O
available	O
on	O
the	O
IBM	B-Device
PCjr	I-Device
,	O
shipped	O
in	O
1984	O
,	O
and	O
supports	O
the	O
additional	O
graphics	O
modes	O
and	O
sound	O
capabilities	O
possible	O
on	O
that	O
machine	O
.	O
</s>
<s>
Cartridge	B-Protocol
BASIC	O
can	O
only	O
operate	O
within	O
the	O
first	O
128KB	O
of	O
memory	O
on	O
the	O
PCjr	B-Device
and	O
will	O
not	O
work	O
with	O
expansion	O
RAM	B-Architecture
,	O
i.e.	O
,	O
the	O
DEF	O
SEG	O
function	O
cannot	O
be	O
used	O
to	O
point	O
to	O
memory	O
segments	O
above	O
&	O
H1FF0	O
.	O
</s>
<s>
Cartridge	B-Protocol
BASIC	O
is	O
activated	O
by	O
typing	O
BASICA	O
at	O
the	O
DOS	O
prompt	O
.	O
</s>
<s>
Conversely	O
,	O
IBM	O
BASICA	O
versions	O
2.1	O
and	O
up	O
will	O
refuse	O
to	O
run	O
if	O
it	O
detects	O
a	O
PCjr	B-Device
,	O
but	O
can	O
be	O
patched	O
to	O
work	O
around	O
this	O
.	O
</s>
<s>
Cassette	O
BASIC	O
loads	O
when	O
a	O
PC	O
or	O
PCjr	B-Device
is	O
booted	O
without	O
a	O
bootable	B-Operating_System
disk	O
or	O
cartridge	B-Protocol
.	O
</s>
<s>
Disk	O
BASIC	O
and	O
Advanced	O
BASIC	O
load	O
when	O
their	O
command	B-Application
name	O
(	O
BASIC	O
and	O
BASICA	O
respectively	O
)	O
is	O
typed	O
at	O
a	O
DOS	O
command	B-Application
prompt	O
(	O
except	O
PCjr	B-Device
,	O
which	O
activates	O
Cartridge	B-Protocol
BASIC	O
instead	O
)	O
,	O
with	O
some	O
optional	O
parameters	O
to	O
control	O
allocation	O
of	O
memory	O
.	O
</s>
<s>
Program	O
source	O
is	O
stored	O
internally	O
in	O
a	O
tokenized	O
form	O
,	O
where	O
reserved	O
words	O
are	O
replaced	O
with	O
a	O
single	O
byte	B-Application
token	O
,	O
to	O
save	O
space	O
and	O
execution	O
time	O
.	O
</s>
<s>
Programs	O
may	O
be	O
saved	O
in	O
compact	O
tokenized	O
form	O
,	O
or	O
optionally	O
saved	O
as	O
DOS	O
ASCII	B-Protocol
text	I-Protocol
files	I-Protocol
that	O
can	O
be	O
viewed	O
and	O
edited	O
with	O
other	O
programs	O
.	O
</s>
<s>
Like	O
most	O
other	O
DOS	O
applications	O
,	O
IBM	B-Language
BASIC	I-Language
is	O
a	O
text-mode	B-Application
program	O
and	O
has	O
no	O
features	O
for	O
windows	O
,	O
icons	O
,	O
mouse	O
support	O
,	O
or	O
cut-and-paste	O
editing	O
.	O
</s>
<s>
GW-BASIC	B-Language
,	O
launched	O
in	O
1983	O
,	O
is	O
a	O
disk-based	O
Microsoft	O
product	O
that	O
was	O
distributed	O
with	O
non-IBM	O
MS-DOS	B-Application
computers	O
,	O
and	O
supports	O
all	O
the	O
graphics	O
modes	O
and	O
features	O
of	O
BASICA	O
on	O
computers	O
that	O
do	O
not	O
have	O
IBM	O
Cassette	O
BASIC	O
.	O
</s>
<s>
The	O
successor	O
to	O
BASICA	O
for	O
MS-DOS	B-Application
and	O
PC	B-Operating_System
DOS	I-Operating_System
versions	O
,	O
now	O
discontinued	O
,	O
is	O
QBasic	B-Language
,	O
launched	O
in	O
1991	O
.	O
</s>
<s>
It	O
is	O
a	O
stripped-down	O
version	O
of	O
the	O
Microsoft	B-Language
QuickBASIC	I-Language
compiler	I-Language
:	O
QBasic	B-Language
is	O
an	O
interpreter	B-Language
and	O
cannot	O
compile	B-Language
source	O
files	O
,	O
while	O
QuickBASIC	B-Language
can	O
compile	B-Language
and	O
save	O
the	O
programs	O
in	O
the	O
.EXE	O
executable	O
file	O
format	O
.	O
</s>
<s>
QuickBASIC	B-Language
also	O
includes	O
certain	O
advanced	O
language	O
statements	O
and	O
functions	O
(	O
mostly	O
involving	O
OS	O
interfacing	O
and	O
low-level	O
machine	O
language	O
programming	O
)	O
,	O
supports	O
multi-module	O
programs	O
,	O
and	O
includes	O
advanced	O
debugging	O
features	O
,	O
all	O
of	O
which	O
are	O
absent	O
from	O
QBASIC	B-Language
.	O
</s>
