<s>
BASIC09	B-Language
is	O
a	O
structured	O
BASIC	B-Language
programming	I-Language
language	I-Language
dialect	O
developed	O
by	O
Microware	B-Operating_System
on	O
behalf	O
of	O
Motorola	O
for	O
the	O
then-new	O
Motorola	B-Device
6809	I-Device
CPU	B-General_Concept
and	O
released	O
in	O
February	O
1980	O
.	O
</s>
<s>
It	O
is	O
primarily	O
used	O
with	O
the	O
OS-9	B-Operating_System
operating	B-General_Concept
system	I-General_Concept
,	O
released	O
in	O
1979	O
.	O
</s>
<s>
Microware	B-Operating_System
also	O
released	O
a	O
version	O
for	O
OS-9/68k	O
on	O
the	O
68000	B-Device
as	O
Microware	B-Operating_System
BASIC	O
.	O
</s>
<s>
In	O
contrast	O
to	O
typical	O
BASICs	O
of	O
the	O
era	O
,	O
BASIC09	B-Language
includes	O
a	O
multi-pass	O
compiler	B-Language
that	O
produces	O
compact	O
bytecode	O
known	O
as	O
I-code	O
.	O
</s>
<s>
Users	O
can	O
further	O
compile	B-Language
code	O
using	O
the	O
PACK	O
command	O
,	O
at	O
which	O
point	O
it	O
can	O
be	O
called	O
directly	O
by	O
OS-9	B-Operating_System
and	O
operated	O
as	O
native	B-Language
code	I-Language
.	O
</s>
<s>
In	O
the	O
case	O
of	O
PACKed	B-Application
code	O
,	O
a	O
cut-down	O
version	O
of	O
the	O
BASIC09	B-Language
runtime	B-Device
system	I-Device
is	O
used	O
,	O
Runb	O
,	O
further	O
improving	O
memory	O
footprint	O
and	O
load	O
time	O
.	O
</s>
<s>
The	O
language	O
includes	O
a	O
number	O
of	O
structured	B-Language
programming	I-Language
additions	O
,	O
including	O
local	O
variables	O
,	O
the	O
ability	O
to	O
ignore	O
line	O
numbers	O
in	O
favor	O
of	O
named	O
routines	O
,	O
user-defined	O
structures	O
,	O
and	O
several	O
distinct	O
base	O
data	O
types	O
including	O
16-bit	O
and	O
8-bit	O
(	O
byte	O
)	O
integers	O
,	O
in	O
addition	O
to	O
floating	O
point	O
and	O
strings	O
.	O
</s>
<s>
A	O
key	O
difference	O
between	O
BASIC09	B-Language
and	O
conventional	O
BASICs	O
of	O
the	O
era	O
,	O
like	O
the	O
canonical	O
Microsoft	B-Language
BASIC	I-Language
,	O
is	O
the	O
addition	O
of	O
the	O
PROCEDURE	O
structure	O
which	O
created	O
separately	O
executable	O
blocks	O
of	O
code	O
.	O
</s>
<s>
In	O
this	O
respect	O
,	O
the	O
BASIC09	B-Language
system	O
appears	O
to	O
the	O
user	O
to	O
be	O
a	O
directory	O
of	O
callable	O
programs	O
.	O
</s>
<s>
In	O
BASIC09	B-Language
,	O
the	O
user	O
can	O
LOAD	O
procedures	O
by	O
name	O
into	O
the	O
workspace	O
and	O
then	O
call	O
them	O
from	O
their	O
own	O
code	O
to	O
construct	O
larger	O
programs	O
from	O
the	O
separately	O
stored	O
procedures	O
.	O
</s>
<s>
This	O
worked	O
not	O
only	O
with	O
BASIC09	B-Language
code	O
,	O
but	O
also	O
any	O
other	O
executable	O
program	O
,	O
including	O
machine	B-Language
language	I-Language
files	O
.	O
</s>
<s>
This	O
meant	O
that	O
BASIC09	B-Language
could	O
easily	O
call	O
system	O
routines	O
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
organizational	O
properties	O
of	O
the	O
PROCEDURE	O
,	O
BASIC09	B-Language
also	O
included	O
a	O
number	O
of	O
extensions	O
to	O
the	O
flow	O
control	O
statements	O
found	O
in	O
BASIC	O
to	O
provide	O
more	O
structure	O
.	O
</s>
<s>
FOR/NEXT	O
loops	O
naturally	O
have	O
a	O
structured	O
format	O
as	O
the	O
NEXT	O
can	O
be	O
placed	O
on	O
any	O
line	O
,	O
but	O
BASIC09	B-Language
also	O
added	O
WHILE/ENDWHILE	O
and	O
REPEAT/UNTIL	O
for	O
additional	O
clarity	O
when	O
working	O
with	O
non-indexed	O
loops	O
.	O
</s>
<s>
BASIC09	B-Language
included	O
several	O
built-in	O
data	O
types	O
.	O
</s>
<s>
The	O
BOOLEAN	O
types	O
were	O
not	O
packed	B-Application
into	O
bytes	O
,	O
a	O
single	O
BOOLEAN	O
used	O
an	O
entire	O
8-bit	O
byte	O
to	O
store	O
a	O
single	O
value	O
.	O
</s>
<s>
In	O
contrast	O
to	O
other	O
BASICs	O
that	O
also	O
operated	O
different	O
base	O
types	O
,	O
BASIC09	B-Language
did	O
not	O
"	O
decorate	O
"	O
the	O
variable	O
name	O
to	O
indicate	O
the	O
type	O
,	O
and	O
instead	O
used	O
the	O
DIM	O
for	O
definitions	O
;	O
for	O
instance	O
,	O
DIM	O
a	O
,	O
b:BOOLEAN	O
to	O
declare	O
two	O
BOOLEAN	O
variables	O
,	O
or	O
DIM	O
c(5 )	O
:INTEGER	O
for	O
an	O
array	O
of	O
five	O
INTEGERs	O
.	O
</s>
<s>
Additionally	O
,	O
BASIC09	B-Language
included	O
the	O
TYPE	O
keyword	O
,	O
which	O
allowed	O
compound	O
types	O
to	O
be	O
defined	O
,	O
with	O
each	O
"	O
element	O
"	O
listed	O
on	O
a	O
single	O
line	O
separated	O
by	O
semicolons	O
.	O
</s>
<s>
As	O
every	O
line	O
of	O
code	O
had	O
a	O
number	O
,	O
this	O
also	O
made	O
them	O
suitable	O
for	O
indicating	O
the	O
target	O
of	O
a	O
GOTO	B-Application
or	O
GOSUB	B-Device
,	O
compared	O
to	O
other	O
languages	O
like	O
FORTRAN	B-Application
where	O
a	O
separate	O
"	O
line	O
label	O
"	O
was	O
used	O
for	O
this	O
purpose	O
.	O
</s>
<s>
BASIC09	B-Language
did	O
not	O
normally	O
use	O
line	O
numbers	O
,	O
so	O
its	O
editor	O
had	O
to	O
be	O
modified	O
to	O
allow	O
the	O
user	O
to	O
edit	O
lines	O
without	O
referring	O
to	O
them	O
by	O
number	O
.	O
</s>
<s>
However	O
,	O
BASIC09	B-Language
did	O
not	O
assume	O
any	O
sort	O
of	O
full-screen	O
capability	O
,	O
so	O
using	O
cursor	B-Device
keys	I-Device
was	O
not	O
an	O
option	O
.	O
</s>
<s>
BASIC09	B-Language
allowed	O
multiple	O
statements	O
on	O
a	O
single	O
line	O
of	O
code	O
,	O
but	O
used	O
the	O
as	O
a	O
separator	O
instead	O
of	O
the	O
used	O
in	O
most	O
dialects	O
.	O
</s>
<s>
The	O
internal	O
multipass	O
compiler	B-Language
converts	O
BASIC09	B-Language
source	O
code	O
into	O
a	O
tokenized	O
,	O
optimized	O
,	O
bytecode	O
,	O
called	O
I-code	O
.	O
</s>
<s>
For	O
instance	O
,	O
in	O
MS-based	O
interpreters	O
,	O
a	O
variable	O
reference	O
in	O
code	O
is	O
left	O
in	O
string	O
format	O
;	O
the	O
variable	O
VAR	O
would	O
be	O
represented	O
in	O
memory	O
by	O
the	O
three	O
ASCII	B-Protocol
characters	I-Protocol
"	O
VAR	O
"	O
.	O
</s>
<s>
For	O
added	O
performance	O
,	O
BASIC09	B-Language
also	O
included	O
the	O
PACK	O
command	O
which	O
took	O
a	O
procedure	O
name	O
and	O
returned	O
an	O
optimized	O
version	O
.	O
</s>
<s>
Although	O
it	O
was	O
common	O
to	O
run	O
programs	O
within	O
the	O
BASIC09	B-Language
environment	O
,	O
as	O
it	O
was	O
in	O
other	O
BASICs	O
,	O
BASIC09	B-Language
also	O
shipped	O
with	O
a	O
separate	O
run-only	O
version	O
of	O
the	O
code	O
known	O
as	O
Runb	O
.	O
</s>
<s>
Runb	O
removed	O
the	O
editing	O
and	O
debugging	O
features	O
of	O
the	O
system	O
,	O
and	O
was	O
about	O
half	O
the	O
size	O
of	O
the	O
full	O
BASIC09	B-Language
as	O
a	O
result	O
.	O
</s>
<s>
The	O
purpose	O
of	O
Runb	O
was	O
primarily	O
to	O
run	O
PACKed	B-Application
modules	O
when	O
called	O
from	O
other	O
programs	O
.	O
</s>
<s>
This	O
meant	O
that	O
if	O
the	O
user	O
typed	O
in	O
the	O
name	O
of	O
a	O
BASIC09	B-Language
module	O
in	O
the	O
OS/9	O
command	O
line	O
,	O
and	O
that	O
module	O
has	O
been	O
marked	O
as	O
PACKed	B-Application
,	O
it	O
is	O
opened	O
and	O
run	O
by	O
Runb	O
instead	O
of	O
the	O
BASIC09	B-Language
.	O
</s>
<s>
automatic	O
prettyprinting	B-Application
of	O
source	O
,	O
which	O
enforced	O
a	O
standard	O
layout	O
and	O
avoided	O
the	O
ghastly	O
mess	O
that	O
was	O
the	O
usual	O
appearance	O
of	O
a	O
program	O
of	O
any	O
size	O
in	O
the	O
interpreted	O
BASICs	O
of	O
the	O
time	O
.	O
</s>
