<s>
These	O
functions	O
were	O
directly	O
supported	O
by	O
the	O
Vector	B-Application
General	I-Application
3D	I-Application
graphics	O
terminal	O
GRASS	O
was	O
written	O
for	O
.	O
</s>
<s>
It	O
quickly	O
became	O
a	O
hit	O
with	O
the	O
artistic	O
community	O
who	O
were	O
experimenting	O
with	O
the	O
new	O
medium	O
of	O
computer	O
graphics	O
,	O
and	O
is	O
most	O
famous	O
for	O
its	O
use	O
by	O
Larry	O
Cuba	O
to	O
create	O
the	O
original	O
"	O
attacking	O
the	O
Death	B-Operating_System
Star	I-Operating_System
will	O
not	O
be	O
easy	O
"	O
animation	O
in	O
Star	O
Wars	O
(	O
1977	O
)	O
.	O
</s>
<s>
As	O
part	O
of	O
a	O
later	O
partnership	O
with	O
Midway	O
Games	O
,	O
the	O
language	O
was	O
ported	O
to	O
the	O
Midway	O
's	O
Z80-based	O
Z	O
Box	O
.	O
</s>
<s>
This	O
machine	O
used	O
raster	B-Algorithm
graphics	I-Algorithm
and	O
a	O
form	O
of	O
sprites	O
,	O
which	O
required	O
extensive	O
changes	O
to	O
support	O
,	O
along	O
with	O
animating	O
color	O
changes	O
.	O
</s>
<s>
This	O
version	O
was	O
known	O
as	O
Zgrass	B-Language
.	O
</s>
<s>
It	O
was	O
developed	O
on	O
a	O
PDP-11/45	B-Device
driving	O
a	O
Vector	B-Application
General	I-Application
3DR	O
display	O
.	O
</s>
<s>
Sandin	O
had	O
joined	O
the	O
university	O
in	O
1971	O
and	O
built	O
the	O
Sandin	B-General_Concept
Image	I-General_Concept
Processor	I-General_Concept
,	O
or	O
IP	O
.	O
</s>
<s>
Larry	O
Cuba	O
's	O
Star	O
Wars	O
work	O
is	O
based	O
on	O
semi-automated	O
filming	O
of	O
a	O
GRASS	O
system	O
running	O
on	O
a	O
Vector	B-Application
General	I-Application
3D	I-Application
terminal	O
.	O
</s>
<s>
This	O
can	O
be	O
seen	O
in	O
the	O
sequence	O
,	O
as	O
the	O
initial	O
sections	O
of	O
the	O
film	O
show	O
the	O
Death	B-Operating_System
Star	I-Operating_System
being	O
rotated	O
and	O
scaled	O
very	O
rapidly	O
,	O
while	O
the	O
later	O
sections	O
simulating	O
flight	O
down	O
the	O
trench	O
requires	O
new	O
scenery	O
to	O
be	O
paged	O
in	O
from	O
GRASS	O
"	O
trees	O
"	O
.	O
</s>
<s>
Nutting	O
had	O
been	O
contracted	O
by	O
Midway	O
,	O
the	O
videogame	O
division	O
of	O
Bally	O
,	O
to	O
create	O
a	O
standardized	O
graphics	B-Device
driver	I-Device
chip	I-Device
.	O
</s>
<s>
They	O
intended	O
to	O
use	O
it	O
in	O
most	O
of	O
their	O
future	O
arcade	O
games	O
,	O
as	O
well	O
as	O
a	O
video	B-Device
game	I-Device
console	I-Device
they	O
were	O
working	O
on	O
which	O
would	O
later	O
turn	O
into	O
the	O
Astrocade	B-Device
.	O
</s>
<s>
GRASS3	O
running	O
on	O
it	O
became	O
Zgrass	B-Language
.	O
</s>
<s>
The	O
Z-Box	O
was	O
a	O
raster	B-Algorithm
graphics	I-Algorithm
machine	O
,	O
unlike	O
the	O
original	O
GRASS	O
systems	O
,	O
so	O
while	O
most	O
of	O
the	O
GRASS3	O
style	O
was	O
maintained	O
in	O
Zgrass	B-Language
,	O
it	O
added	O
a	O
number	O
of	O
commands	O
dedicated	O
to	O
raster	B-Algorithm
images	I-Algorithm
.	O
</s>
<s>
This	O
included	O
an	O
extensive	O
set	O
of	O
bit	B-Algorithm
block	I-Algorithm
transfer	I-Algorithm
commands	O
in	O
order	O
to	O
simulate	O
sprites	O
,	O
something	O
the	O
hardware	O
did	O
n't	O
include	O
.	O
</s>
<s>
The	O
work	O
would	O
never	O
be	O
released	O
by	O
Midway	O
,	O
but	O
the	O
Circle	O
would	O
produce	O
machines	O
based	O
on	O
it	O
as	O
the	O
Datamax	B-Device
UV-1	I-Device
.	O
</s>
<s>
Versions	O
existed	O
for	O
MS-DOS	B-Application
,	O
Microsoft	B-Application
Windows	I-Application
,	O
SGI	O
platform	O
using	O
OpenGL	B-Application
,	O
HP-UX	B-Application
,	O
AIX	B-Application
,	O
Macintosh	B-Device
and	O
Amiga	B-Device
.	O
</s>
<s>
Zgrass	B-Language
was	O
based	O
on	O
a	O
standard	O
set	O
of	O
BASIC	O
commands	O
and	O
used	O
most	O
of	O
its	O
syntax	O
.	O
</s>
<s>
Where	O
Zgrass	B-Language
differed	O
from	O
BASIC	O
was	O
that	O
all	O
commands	O
were	O
in	O
fact	O
functions	O
and	O
returned	O
values	O
,	O
similar	O
to	O
the	O
C	B-Language
programming	I-Language
language	I-Language
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
command	O
PRINT	O
PRINT	O
10	O
would	O
be	O
illegal	O
in	O
BASIC	O
,	O
but	O
in	O
Zgrass	B-Language
this	O
would	O
print	O
10	O
1	O
,	O
the	O
1	O
being	O
the	O
value	O
returned	O
by	O
second	O
PRINT	O
,	O
meaning	O
"	O
I	O
successfully	O
output	O
the	O
string	O
'	O
10	O
 '	O
"	O
.	O
</s>
<s>
Programs	O
in	O
Zgrass	B-Language
were	O
referred	O
to	O
as	O
"	O
macros	O
"	O
,	O
and	O
stored	O
as	O
strings	O
.	O
</s>
<s>
Both	O
of	O
these	O
oddities	O
were	O
deliberate	O
,	O
as	O
Zgrass	B-Language
allowed	O
any	O
string	O
to	O
become	O
a	O
program	O
.	O
</s>
<s>
For	O
instance	O
,	O
MYBOX	O
=	O
"	O
BOX	O
0	O
,	O
0	O
,	O
100	O
,	O
100	O
,	O
2	O
"	O
defines	O
a	O
string	O
(	O
no	O
need	O
for	O
a	O
$	O
on	O
the	O
variable	O
as	O
in	O
Microsoft	B-Language
BASICs	I-Language
)	O
containing	O
a	O
snippet	O
of	O
Zgrass	B-Language
code	O
.	O
</s>
<s>
Most	O
BASIC	O
interpreters	B-Application
of	O
the	O
era	O
converted	O
the	O
input	O
text	O
into	O
a	O
tokenized	B-Application
version	O
in	O
which	O
each	O
of	O
the	O
commands	O
was	O
replaced	O
by	O
a	O
single	O
number	O
(	O
typically	O
one	O
byte	B-Application
long	O
)	O
.	O
</s>
<s>
Zgrass	B-Language
's	O
use	O
of	O
string-based	O
macros	O
made	O
this	O
difficult	O
,	O
so	O
they	O
did	O
n't	O
bother	O
with	O
tokenization	O
.	O
</s>
<s>
Instead	O
,	O
they	O
included	O
a	O
compiler	B-Language
which	O
could	O
be	O
used	O
on	O
any	O
particular	O
macro	O
,	O
speeding	O
it	O
up	O
many	O
times	O
.	O
</s>
<s>
Programs	O
would	O
often	O
consist	O
of	O
a	O
mix	O
of	O
compiled	B-Language
and	O
uncompiled	O
macros	O
.	O
</s>
<s>
Line	O
numbers	O
were	O
optional	O
in	O
Zgrass	B-Language
,	O
and	O
typically	O
only	O
appeared	O
on	O
lines	O
that	O
were	O
the	O
target	O
of	O
a	O
GOTO	O
.	O
</s>
<s>
Most	O
BASIC	O
interpreters	B-Application
required	O
line	O
numbers	O
for	O
every	O
line	O
of	O
code	O
,	O
but	O
this	O
was	O
due	O
to	O
their	O
use	O
in	O
the	O
"	O
line	O
editor	O
"	O
–	O
if	O
you	O
needed	O
to	O
edit	O
a	O
particular	O
line	O
,	O
the	O
only	O
way	O
to	O
refer	O
to	O
it	O
was	O
by	O
number	O
.	O
</s>
<s>
Zgrass	B-Language
used	O
a	O
more	O
advanced	O
full-screen	O
editor	O
that	O
eliminated	O
this	O
need	O
.	O
</s>
<s>
Zgrass	B-Language
allowed	O
any	O
string	O
to	O
act	O
as	O
a	O
"	O
line	O
number	O
"	O
,	O
and	O
were	O
both	O
valid	O
.	O
</s>
<s>
Zgrass	B-Language
also	O
included	O
nameless	O
branches	O
,	O
using	O
the	O
instruction	O
,	O
which	O
would	O
move	O
forward	O
or	O
back	O
a	O
given	O
number	O
of	O
lines	O
.	O
</s>
<s>
This	O
is	O
important	O
in	O
Zgrass	B-Language
as	O
the	O
line	O
numbers	O
were	O
optional	O
and	O
different	O
macros	O
might	O
make	O
use	O
of	O
the	O
same	O
labels	O
.	O
</s>
<s>
For	O
instance	O
,	O
some	O
variation	O
on	O
is	O
likely	O
to	O
be	O
found	O
in	O
many	O
bits	O
of	O
code	O
,	O
and	O
thus	O
might	O
result	O
in	O
a	O
name	O
clash	B-Application
.	O
</s>
<s>
In	O
keeping	O
with	O
its	O
original	O
purpose	O
as	O
a	O
graphics	O
language	O
,	O
Zgrass	B-Language
included	O
numerous	O
commands	O
for	O
simple	O
drawing	O
.	O
</s>
<s>
Zgrass	B-Language
's	O
coordinate	O
system	O
had	O
one	O
point	O
for	O
each	O
pixel	O
in	O
the	O
high-resolution	O
mode	O
of	O
Nutting	O
's	O
graphics	O
chip	O
,	O
giving	O
a	O
320×202	O
grid	O
.	O
</s>
<s>
The	O
Astrocade	B-Device
,	O
by	O
design	O
,	O
could	O
only	O
use	O
that	O
chip	O
's	O
low-resolution	O
mode	O
,	O
a	O
160×101	O
display	O
.	O
</s>
<s>
For	O
use	O
on	O
the	O
Astrocade	B-Device
you	O
used	O
the	O
positive	O
locations	O
only	O
,	O
whereas	O
on	O
the	O
UV-1	O
the	O
entire	O
space	O
was	O
available	O
.	O
</s>
<s>
Zgrass	B-Language
added	O
a	O
fairly	O
complete	O
set	O
of	O
array	O
functions	O
,	O
as	O
arrays	O
are	O
widely	O
used	O
in	O
graphics	O
.	O
</s>
<s>
This	O
allowed	O
Zgrass	B-Language
to	O
include	O
sprite-like	O
functionality	O
in	O
the	O
language	O
,	O
something	O
the	O
Nutting	O
hardware	O
did	O
not	O
directly	O
include	O
.	O
</s>
<s>
Another	O
feature	O
the	O
Astrocade	B-Device
did	O
not	O
include	O
was	O
the	O
ability	O
to	O
process	O
arrays	O
with	O
any	O
reasonable	O
speed	O
,	O
so	O
the	O
UV-1	O
included	O
a	O
Zilog	O
supplied	O
FPU	B-General_Concept
for	O
added	O
performance	O
.	O
</s>
<s>
Zgrass	B-Language
included	O
three	O
priorities	O
(	O
called	O
levels''	O
)	O
that	O
allowed	O
macros	O
to	O
be	O
run	O
normally	O
,	O
or	O
in	O
"	O
foreground	O
"	O
or	O
"	O
background	O
"	O
levels	O
.	O
</s>
<s>
This	O
added	O
a	O
simple	O
form	O
of	O
multitasking	B-Operating_System
which	O
was	O
tremendously	O
useful	O
in	O
an	O
animation-oriented	O
language	O
.	O
</s>
<s>
Zgrass	B-Language
included	O
a	O
function	O
that	O
would	O
call	O
macros	O
on	O
a	O
timed	O
basis	O
,	O
making	O
the	O
implementation	O
of	O
timers	O
very	O
easy	O
.	O
</s>
<s>
Zgrass	B-Language
also	O
included	O
a	O
series	O
of	O
commands	O
that	O
"	O
covered	O
"	O
CP/M	O
,	O
which	O
allowed	O
the	O
disk	O
to	O
be	O
accessed	O
without	O
exiting	O
to	O
the	O
command	O
prompt	O
.	O
</s>
<s>
With	O
programs	O
constructed	O
from	O
randomly	O
selected	O
modules	O
,	O
Zgrass	B-Language
needed	O
to	O
have	O
better	O
control	O
over	O
its	O
variables	O
than	O
BASIC	O
.	O
</s>
<s>
Under	O
Zgrass	B-Language
a	O
programmer	O
loading	O
up	O
two	O
modules	O
could	O
easily	O
find	O
that	O
both	O
used	O
as	O
a	O
loop	O
counter	O
,	O
which	O
could	O
cause	O
problems	O
.	O
</s>
<s>
To	O
address	O
this	O
issue	O
,	O
Zgrass	B-Language
considered	O
variables	O
named	O
with	O
lowercase	O
letters	O
to	O
be	O
local	O
only	O
to	O
that	O
macro	O
,	O
so	O
and	O
were	O
different	O
variables	O
,	O
global	O
and	O
local	O
respectively	O
.	O
</s>
<s>
POINT	O
is	O
an	O
example	O
of	O
one	O
of	O
the	O
many	O
graphics	O
commands	O
included	O
in	O
the	O
Zgrass	B-Language
language	O
.	O
</s>
