Hi Euchcat!
There were/are several Forths for the ZX81. AFAIK CamelForth and Toddy Forth are modern implementations for the ZX81, based on Forth-79. Artic Forth, of course (also sold for the US TS-1000), was also sold by Sinclair themselves. I don't know whether the ZX Spectrum Sinclair Artic Forth was derived from this version. BTW, the latter was my first Forth! Then we got the Husband ROM version of Forth for the ZX81. And that's about it as far as I know. You see, porting a Z80 Forth to the Sinclair family of machines was not a huge task, so I wouldn't be surprised if there were several more.
A few links:
As always, if you want to convert a BASIC program to Forth, you have to go beyond a simple syntactic conversion - like I do for uBasic/4tH. There I just convert the syntax and see if it performs like it should. If the input and output appears sane - we're done ;-)
However, if you want to convert to Forth, you have to know
EXACTLY what every statement does, how the flow control works, which variable pops into scope at which moment, etc. See:
https://www.youtube.com/watch?v=gfE8arB3uWk
So this is what we have to work with:
100 DIM X(6)
110 PRINT "SOLUTIONS TO 2 EQUATIONS:"
120 PRINT "A*X + B*Y + C =0",,,"ENTER DATA"
130 FOR I=1 TO 6
140 PRINT CHR$ (37+I-INT ((I-1)/3)*3),
150 INPUT X(I)
160 PRINT X(I)
170 NEXT I
300 LET D = X(2)*X(4)-X(1)*X(5)
310 IF D=0 THEN GOTO 360
320 LET A = ( X(3)*X(5) - X(2)*X(6) ) / D
330 LET B = ( X(1)*X(6) - X(3)*X(4) ) / D
340 PRINT "SOLUTIONS ARE:" : PRINT "X=" ; A , , "Y=" ; B
350 STOP
360 PRINT "DEGENERATE: NO SOLUTIONS"
Then we (optionally) transform it to a more structured form:
Print "Solutions To 2 Equations:"
Print "A*X + B*Y + C = 0"
For I=0 To 5
If I%3=0 Then Print
Print Chr(I%3+Ord("A"));
Input @(I)
Next
D = @(1)*@(3)-@(0)*@(4) : Print
If D = 0 Then
Print "Degenerate: no solutions"
Else
A = (@(2)*@(4)-@(1)*@(5))/D
B = (@(0)*@(5)-@(2)*@(3))/D
Print "Solutions are:","","X=";A,"","Y=";B
Endif
And finally transform it to Forth. I'll come back to that.. ;-)
Hans Bezemer