LANGUAGES
FORTH-TO7.
The FORTH-79 that SEFI published for the Thomson TO7 in 1983, on a TO2026 cartridge. You type numbers and words, the machine answers on the same line, then OK. You teach it new words, each built on the previous ones, until the last one runs the whole application. With the TO7 screen, its eight colours and its 320 by 200 dots, music, BASIC-style strings, and the blocks and screen editor of the original cartridge.
The complete language reference (in French)




( CARRES ET CUBES ) : CARRE ( n --- n*n ) DUP * ; : CUBE ( n --- n*n*n ) DUP CARRE * ; : TABLEAU 11 1 DO CR I 4 .R I CARRE 6 .R I CUBE 8 .R LOOP ; TABLEAU
The language
- The stack and reverse Polish notation:
2 3 + .;DUP,SWAP,OVER,ROT, and.Sto look at the stack - Definitions
: NAME ... ;, constants, variables, SEFI's arrays (ARRAY,TABLE) andCREATE ... DOES> - The structures
IF ELSE THEN,DO LOOP,BEGIN UNTIL,WHILE REPEAT, and SEFI's additions:CASE OF ENDOF ENDCASE,GODO,/LOOP - 16-bit numbers, 32-bit doubles, any base from 2 to 36; BASIC-style strings:
STRING,MID$,INSTR,STR$,INPUT$
The machine
- The TO7 screen: 40 columns by 25 lines, 320 × 200 dots, eight bright and eight pastel colours;
PSET,LINE,BOX,BOXF,POINT,LOCATE,WINDOW,DEFGR - Music:
NOTE, and scores in tables:MUSTAB,do re mi,PLAY - Keyboard, joysticks and light pen (the mouse):
KEY,INKEY,STICK,INPEN,ONPEN - The original two-letter messages:
WORD ? UK ERROR,ES,FS,UF…
Programs and disks
- 1024-character blocks, stored as
BLOCKn.DATfiles on the disk:n EDIT,n LIST,n LOAD,THRU,FLUSH - Saving the dictionary:
0 SAVEintoDICT0.FTH,0 RUNto load it back,AUTORUNto start it by itself - As in the other cartridges: the program in memory as a
.4THfile,EDIT,RUN,SAVE "NAME",LOAD "NAME", and theAI ONassistant RUN "CADRES",RUN "TABLES"andRUN "FRERE": three programs on the system disk
SEFI's cartridge, rebuilt
FORTH was created by Charles Moore to drive telescopes with very little memory: a tiny interpreter and a dictionary the programmer extends. In 1983, SEFI published a FORTH cartridge for the TO7 through TO-TEK, with its reference manual. The TO2026 one was rebuilt from that manual and from the behaviour of the original cartridge: same dictionary, same messages, same memory map, so that a program copied from the 1983 manual runs as is. No SEFI code is reused.