<s>
WSFN	B-Language
(	O
Which	B-Language
Stands	I-Language
for	I-Language
Nothing	I-Language
)	O
is	O
an	O
interpreted	B-Application
programming	I-Application
language	I-Application
for	O
controlling	O
robots	B-Algorithm
created	O
by	O
Li-Chen	O
Wang	O
.	O
</s>
<s>
It	O
was	O
designed	O
to	O
be	O
as	O
small	O
as	O
possible	O
,	O
a	O
"	O
tiny	O
"	O
language	O
,	O
similar	O
to	O
Wang	O
's	O
earlier	O
effort	O
,	O
Palo	B-Language
Alto	I-Language
Tiny	I-Language
BASIC	I-Language
.	O
</s>
<s>
WSFN	B-Language
was	O
first	O
published	O
in	O
Dr.	O
Dobb	O
's	O
Journal	O
in	O
September	O
1977	O
.	O
</s>
<s>
The	O
language	O
consists	O
primarily	O
of	O
single-letter	O
commands	O
to	O
tell	O
a	O
robot	B-Algorithm
to	O
move	O
in	O
certain	O
directions	O
,	O
while	O
other	O
commands	O
perform	O
tests	O
or	O
basic	O
mathematical	O
operations	O
.	O
</s>
<s>
The	O
original	O
version	O
also	O
included	O
code	O
that	O
simulated	O
the	O
robot	B-Algorithm
as	O
a	O
cursor	O
on	O
the	O
VDM-1	B-Device
display	O
,	O
or	O
graphically	O
on	O
a	O
Cromemco	B-Device
Dazzler	I-Device
display	O
.	O
</s>
<s>
This	O
is	O
similar	O
to	O
the	O
turtle	B-Application
graphics	I-Application
added	O
to	O
the	O
Logo	B-Device
programming	I-Device
language	I-Device
in	O
1969	O
.	O
</s>
<s>
Extended	O
WSFN	B-Language
is	O
an	O
implementation	O
created	O
for	O
the	O
Atari	B-Device
8-bit	I-Device
family	I-Device
of	O
home	O
computers	O
written	O
by	O
Harry	O
Stewart	O
and	O
published	O
by	O
the	O
Atari	B-Application
Program	I-Application
Exchange	I-Application
in	O
1981	O
.	O
</s>
<s>
In	O
addition	O
to	O
supporting	O
turtle	B-Application
graphics	I-Application
,	O
it	O
adds	O
a	O
number	O
of	O
commands	O
to	O
control	O
the	O
graphics	O
and	O
sound	O
capabilities	O
of	O
that	O
platform	O
.	O
</s>
<s>
WSFN	B-Language
consists	O
of	O
a	O
number	O
of	O
single-letter	O
commands	O
to	O
control	O
the	O
movement	O
of	O
a	O
turtle	B-Application
or	O
robot	B-Algorithm
.	O
</s>
<s>
For	O
instance	O
,	O
moves	O
the	O
turtle	B-Application
Forward	O
one	O
step	O
,	O
while	O
moves	O
25	O
steps	O
.	O
</s>
<s>
and	O
make	O
the	O
turtle	B-Application
turn	O
one	O
unit	O
to	O
the	O
Right	O
or	O
Left	O
,	O
respectively	O
,	O
and	O
it	O
can	O
also	O
be	O
reset	O
to	O
point	O
orth	O
.	O
</s>
<s>
The	O
step	O
sizes	O
and	O
turn	O
units	O
are	O
defined	O
by	O
the	O
robot	B-Algorithm
hardware	O
,	O
but	O
are	O
set	O
to	O
one	O
pixel	O
and	O
45	O
degrees	O
in	O
the	O
turtle	B-Application
graphics	I-Application
versions	O
.	O
</s>
<s>
Missing	O
in	O
the	O
robot	B-Algorithm
versions	O
,	O
in	O
the	O
computer	O
versions	O
returns	O
the	O
turtle	B-Application
Home	O
in	O
the	O
center	O
of	O
the	O
screen	O
and	O
Clears	O
any	O
previous	O
drawing	O
.	O
</s>
<s>
These	O
instructions	O
set	O
the	O
drawing	O
color	O
to	O
Black	O
,	O
Clears	O
the	O
screen	O
(	O
which	O
fills	O
with	O
the	O
current	O
color	O
)	O
,	O
sets	O
the	O
color	O
to	O
White	O
,	O
Homes	O
the	O
turtle	B-Application
,	O
resets	O
the	O
turtle	B-Application
to	O
point	O
North	O
,	O
then	O
draws	O
a	O
series	O
of	O
four	O
lines	O
25	O
steps	O
long	O
,	O
rotating	O
90	O
degrees	O
to	O
the	O
Right	O
between	O
each	O
line	O
.	O
</s>
<s>
Macros	O
can	O
be	O
assigned	O
a	O
name	O
using	O
the	O
efine	O
command	O
(	O
Extended	O
WSFN	B-Language
used	O
instead	O
)	O
.	O
</s>
<s>
WSFN	B-Language
has	O
rudimentary	O
math	O
capabilities	O
consisting	O
of	O
a	O
single	O
accumulator	B-General_Concept
that	O
can	O
be	O
incremented	O
and	O
decremented	O
with	O
and	O
.	O
</s>
<s>
One	O
can	O
make	O
the	O
series	O
of	O
squares	O
grow	O
larger	O
by	O
incrementing	O
the	O
accumulator	B-General_Concept
5	O
times	O
between	O
each	O
step	O
:	O
</s>
<s>
A	O
side-effect	O
of	O
the	O
syntax	O
is	O
that	O
would	O
set	O
the	O
accumulator	B-General_Concept
to	O
zero	O
,	O
because	O
it	O
performs	O
the	O
decrement	O
instruction	O
by	O
the	O
number	O
in	O
A	O
.	O
</s>
<s>
Likewise	O
,	O
doubles	O
the	O
value	O
in	O
the	O
accumulator	B-General_Concept
.	O
</s>
<s>
Program	O
control	O
is	O
equally	O
rudimentary	O
,	O
consisting	O
of	O
a	O
number	O
of	O
commands	O
that	O
handled	O
IF/THEN/ELSE	B-Language
structures	O
.	O
</s>
<s>
The	O
most	O
basic	O
form	O
is	O
the	O
est	O
command	O
,	O
which	O
follows	O
one	O
of	O
two	O
paths	O
if	O
the	O
accumulator	B-General_Concept
was	O
greater	O
or	O
equal	O
to	O
zero	O
.	O
</s>
<s>
For	O
instance	O
,	O
this	O
command	O
causes	O
the	O
turtle	B-Application
to	O
turn	O
90	O
degrees	O
left	O
if	O
the	O
accumulator	B-General_Concept
is	O
non-zero	O
,	O
or	O
45	O
to	O
the	O
right	O
if	O
it	O
is	O
zero	O
:	O
</s>
<s>
Variations	O
on	O
the	O
branching	O
construct	O
include	O
,	O
which	O
randomly	O
jumps	O
to	O
the	O
first	O
or	O
second	O
branch	O
50%	O
of	O
the	O
time	O
,	O
and	O
ensor	O
,	O
which	O
tests	O
if	O
the	O
contact	O
sensor	O
on	O
the	O
robot	B-Algorithm
has	O
been	O
triggered	O
.	O
</s>
<s>
Extended	O
WSFN	B-Language
modified	O
the	O
to	O
return	O
the	O
color	O
in	O
front	O
of	O
the	O
turtle	B-Application
,	O
allowing	O
hit	O
detection	O
on	O
previous	O
drawing	O
,	O
and	O
added	O
the	O
dge	O
test	O
,	O
which	O
jumps	O
to	O
the	O
right	O
side	O
macro	O
if	O
the	O
turtle	B-Application
hit	O
the	O
edge	O
of	O
the	O
drawing	O
area	O
.	O
</s>
<s>
The	O
original	O
WSFN	B-Language
lacks	O
an	O
equivalent	O
of	O
,	O
and	O
instead	O
wraps	O
the	O
drawing	O
area	O
so	O
the	O
turtle	B-Application
re-appears	O
on	O
the	O
opposite	O
side	O
of	O
the	O
screen	O
.	O
</s>
<s>
Extended	O
WSFN	B-Language
supports	O
this	O
style	O
of	O
playfield	O
wrapping	O
as	O
an	O
option	O
.	O
</s>
<s>
Because	O
it	O
uses	O
one-letter	O
commands	O
and	O
recursive	O
syntax	O
,	O
WSFN	B-Language
code	O
is	O
exceedingly	O
cryptic	O
.	O
</s>
<s>
For	O
example	O
,	O
this	O
is	O
a	O
WSFN	B-Language
program	O
to	O
draw	O
Sierpiński	B-Algorithm
curves	I-Algorithm
:	O
</s>
<s>
This	O
is	O
a	O
key	O
aspect	O
of	O
the	O
WSFN	B-Language
concept	O
;	O
the	O
language	O
is	O
highly	O
recursive	O
in	O
nature	O
,	O
which	O
makes	O
programming	O
self-similar	O
patterns	O
like	O
fractals	B-Application
easy	O
to	O
accomplish	O
in	O
a	O
few	O
lines	O
of	O
code	O
.	O
</s>
<s>
A	O
key	O
concept	O
of	O
Extended	O
WSFN	B-Language
is	O
that	O
the	O
keyboard	O
is	O
always	O
active	O
,	O
even	O
while	O
macros	O
are	O
running	O
.	O
</s>
<s>
Using	O
this	O
technique	O
,	O
one	O
can	O
make	O
macros	O
for	O
moving	O
the	O
turtle	B-Application
in	O
certain	O
ways	O
,	O
assign	O
them	O
to	O
letters	O
on	O
the	O
keyboard	O
,	O
and	O
then	O
perform	O
these	O
movements	O
by	O
pressing	O
different	O
keys	O
in	O
succession	O
.	O
</s>
<s>
+	O
WSFN	B-Language
keywords	O
Keyword	O
Description	O
A	O
Loops	O
by	O
the	O
value	O
of	O
the	O
accumulator	B-General_Concept
(	O
A	O
-	O
sets	O
it	O
to	O
zero	O
,	O
A+	O
doubles	O
it	O
)	O
B	O
Set	O
the	O
drawing	O
color	O
to	O
black	O
C	O
Clear	O
screen	O
(	O
fill	O
with	O
current	O
color	O
)	O
D	O
Define	O
macro	O
F	O
Move	O
the	O
turtle	B-Application
forward	O
H	O
Return	O
the	O
turtle	B-Application
to	O
the	O
home	O
position	O
L	O
Rotate	O
the	O
turtle	B-Application
to	O
the	O
left	O
N	O
Point	O
the	O
turtle	B-Application
north	O
(	O
up	O
)	O
R	O
Rotate	O
the	O
turtle	B-Application
to	O
the	O
right	O
S	O
Test	O
contact	O
sensor	O
on	O
the	O
robot	B-Algorithm
(	O
IF/THEN/ELSE	B-Language
)	O
T	O
Test	O
for	O
non-zero	O
accumulator	B-General_Concept
(	O
IF/THEN/ELSE	B-Language
)	O
W	O
Set	O
the	O
drawing	O
color	O
to	O
white	O
=	O
Define	O
a	O
macro	O
name	O
?	O
</s>
<s>
From	O
the	O
Extended	O
WSFN	B-Language
manual	O
.	O
</s>
