One way to run FORTH ...

49 views
Skip to first unread message

Jon Langseth

unread,
May 6, 2018, 4:15:50 PM5/6/18
to LiNC80
Even if I have no actual knowledge of FORTH, I thought it would be fun to test
out the code that was brought to my attention on May the FORTH, and found it to work nicely.
As Forth was a central embedded language through the seventies, and is quite different
to BASIC by using a stack based syntax (think RPN), it is nice to be able to say "Yes, it runs Forth" :)

I just uploaded a "hexecutable" to the file downloads area on linc.no:

This is an unmodified copy of FORTHRAM.HEX downloaded on 2018-05-06 from

To use, boot to SCMon, and paste in/transfer the content of the HEX file.
Next, switch to the Grant Searle Loader environment, by running the SCMon
monitor command "GSL". Press space to activate console for the GSL, and start
the FORTH environment by executing from address $8200:

Small Computer Monitor - LiNC80
*Ready                               <- HEX file pasted

*GSL                                 <- Starts the second loader/monitor
Press [SPACE] to activate console    <- Press space

LiNC80 SBC Boot ROM 1.1+ by G. Searle, modified by J. Langseth
Type ? for options

>G8200                               <- Execute code at address $8200

* Z80 FORTH *                        <- FigFORTH signon message
2 2 + . 4 OK                         <- Sample forth code (2 + 2 = 4)

Steve Cousins

unread,
May 6, 2018, 6:20:21 PM5/6/18
to LiNC80
Good find Jon.

Attached is a version that just needs to be sent to SCMon then enter command "G 8000". No need to go to GSL.

I did a quick few mods to make the source compatible with SCWorkshop. Rebuild the original and compared the hex files. Then adjusted code start and data locations to fit with SCMon.

It appears to work, but it was a quick hack.

When comparing the hex files I found one byte difference. It looks to me like the 'original' is wrong.

From the LST file on GitHub:
92E0 81 20       	.BYTE	81h," "+80h
I believe it should be:
92E0 81 A0       	.BYTE	81h,' '+80h

As the 'original' sounds like a quick port to TASM there may be other problems.

But "2 2 + ." gives 4, so it looks promising.

Revised instructions:
To use, boot to SCMon, and paste in/transfer the content of the HEX file.
Start the FORTH environment by executing from address $8000:

Small Computer Monitor - LiNC80
*Ready                               <- HEX file pasted

*G8000                               <- Execute code at address $8000

* Z80 FORTH *                        <- FigFORTH signon message
2 2 + . 4 OK                         <- Sample forth code (2 + 2 = 4)


By the way I have seen a few people refer to SCMonitor as just SCM. Looks like it might catch on.

Steve
Forth.zip

Jon Langseth

unread,
May 7, 2018, 5:15:54 AM5/7/18
to LiNC80
Nice work as usual, Steve. And quick too, just two hours after my post!

I have made a re-pack (just added a .txt file) of the SCM version and placed it as http://linc.no/dl/linc80/hexecutable/SCM_RachelFORTH.zip
Reply all
Reply to author
Forward
0 new messages