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 (or AV 50 DR 90): the turtle moves 50 steps and turns. The screen splits: drawing above, text below
  • REPEAT 4 [FD 80 RT 90] draws a square
  • TO SQUARE :S, then the lines, then END: the machine answers SQUARE DEFINI; then type SQUARE 60
  • RUN "3:FLOCON": also ROSACE, SPIRALE, ARBRE, ETOILES, NOMBRE
  • EDIT opens 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 name
  • SETPOS [X Y], SETH, HEADING, POS, TOWARDS, CIRCLE, ARC, FILL, LABEL
  • SETPC and SETBG: the 16 MO6 colours, a mode 20 colour, or [R G B]
  • SPLITSCREEN, FULLSCREEN, TEXTSCREEN; WINDOW, WRAP, FENCE for the edge

The language

  • Words ("CAT), numbers, lists ([A [B C]]); :X is the value of X
  • MAKE "X 5, LOCAL, THING; IF, IFELSE, WHILE, REPEAT and REPCOUNT, STOP, OUTPUT
  • FIRST, LAST, BF, BL, SENTENCE, LIST, WORD, ITEM, COUNT, MEMBERP...
  • PRINT, TYPE, SHOW, READLIST; PARLE speaks with the machine's voice
  • SAVE "NAME and LOAD "NAME write and read a .LGO file; HELP lists 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.