LANGUAGES
LOGO.
The turtle language, born in 1967 at BBN, then raised at MIT, around Seymour Papert, and the language of the LOGO cartridges of the TO7 and MO5 in France's 1985 "Computing for all" plan. You talk to a turtle that draws as it moves, you teach it new words, and those words call others, even themselves. In French, as in French schools at the time; the original English names work too. The full reference, with every primitive, an example run on the machine and the picture the turtle drew, is in French.
TO TREE :L
IF :L < 4 [STOP]
FD :L LT 30 TREE :L * 0.7
RT 60 TREE :L * 0.7
LT 30 BK :L
END
CS PU BK 90 PD SETPC 2 TREE 40
Try it
- In the machine, choose the LOGO cartridge: the machine answers
? FD 50 RT 90(orAV 50 DR 90): the turtle moves 50 steps and turns. The screen splits: drawing above, text belowREPEAT 4 [FD 80 RT 90]draws a squareTO SQUARE :S, then the lines, thenEND: the machine answersSQUARE DEFINI; then typeSQUARE 60RUN "3:FLOCON": alsoROSACE,SPIRALE,ARBRE,ETOILES,NOMBREEDITopens the editor on all procedures, with LOGO colouring
The turtle
FD,BK,RT,LT,PU,PD,PE,HT,ST,CS,HOME, each with its French nameSETPOS [X Y],SETH,HEADING,POS,TOWARDS,CIRCLE,ARC,FILL,LABELSETPCandSETBG: the 16 MO6 colours, a mode 20 colour, or[R G B]SPLITSCREEN,FULLSCREEN,TEXTSCREEN;WINDOW,WRAP,FENCEfor the edge
The language
- Words (
"CAT), numbers, lists ([A [B C]]);:Xis the value of X MAKE "X 5,LOCAL,THING;IF,IFELSE,WHILE,REPEATandREPCOUNT,STOP,OUTPUTFIRST,LAST,BF,BL,SENTENCE,LIST,WORD,ITEM,COUNT,MEMBERP...PRINT,TYPE,SHOW,READLIST;PARLEspeaks with the machine's voiceSAVE "NAMEandLOAD "NAMEwrite and read a.LGOfile;HELPlists the primitives (in French)
The cartridge's choices
The turtle moves in steps of two pixels: the drawing area is 320 by 192 steps, like the TO7's graphics, so programs from 1985 keep their proportions. A program is a text: TO ... END procedures, then the lines that RUN executes. A procedure that calls itself on its last line runs as long as needed without exhausting memory. Messages are in French. RUN, LIST, DIR, NC and CLS are still the machine's.