Hello,
I'm releasing version 0.4.0 of my FORTH that comes with multitasking capabilities.
First, you define threads (with a page, a stack, and a starting code), then thrun enters in multitasking mode.
It's a collaborative system where you hand over to the next thread with the word thnext.
In addition to a personal stack, you can create local variables that allows you to write a unique code pointing at different memory locations according to the current thread.
Two programs are commented on my page:
(English) https://gtello.pagesperso-orange.fr/forth_e.htm#multi
(Français) https://gtello.pagesperso-orange.fr/forth_f.htm#multi
And you can download the last version:
(English) https://gtello.pagesperso-orange.fr/forth_e.htm#down
(Français) https://gtello.pagesperso-orange.fr/forth_f.htm#down
At the top of the page, the updated manual is available!
Guillaume.
Multitasking in FORTH
Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team
Multitasking in FORTH
You do not have the required permissions to view the files attached to this post.
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 3006
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Multitasking in FORTH
Long time ago I was very interested in FORTH. On quick look this and the manual look great, much appreciated!
Re: Multitasking in FORTH
Out of interest - I am not a programmer but I understand that different programming languages are usually aimed at different types of applications, like financial or graphical or games or whatever.
I was wondering why an Atari programmer might choose FORTH to write his app over something like GFA Basic, and vice-versa. What would the benefits be in each case for different application types?
I was wondering why an Atari programmer might choose FORTH to write his app over something like GFA Basic, and vice-versa. What would the benefits be in each case for different application types?
Re: Multitasking in FORTH
Two answers are possible... The first one with objective arguments:stormy wrote: ↑Sat Jun 11, 2022 7:14 pm Out of interest - I am not a programmer but I understand that different programming languages are usually aimed at different types of applications, like financial or graphical or games or whatever.
I was wondering why an Atari programmer might choose FORTH to write his app over something like GFA Basic, and vice-versa. What would the benefits be in each case for different application types?
- FORTH is easier in a direct mode. For example when you're searching for a solution and build some useful words and try step by step in interactive mode. IIRC it was first designed to control machines in real time.
- FORTH is really compact, few bytes are required, few variables and fast enough.
- FORTH has no syntax or type control, so sometimes you can do things impossible or harder elsewhere.
- About my own version, I tried to make everything easier providing some powerful instructions (Multitasking, dialogs in windows, easy build of dialogs and menus, access to the FPU, graphic modules management, dialog with an external assembler (but everything included in the same source code), etc.
- It is still in developpement!
The other answer is totally subjective:
- FORTH is so different compared to other languages that it's for me a real pleasure to program it. There is a kind of intellectual satisfaction to find the correct stack movements, to optimize routines to avoid variables etc... Every program is a little challenge.
Guillaume.
-
- Atari freak
- Posts: 74
- Joined: Sun Mar 08, 2009 12:33 pm
Re: Multitasking in FORTH
Guillaume, thanks for your great work 

- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 3006
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Multitasking in FORTH
Quoting from Wikipedia: https://en.wikipedia.org/wiki/Forth_(pr ... _language)
"Forth has been called a meta-application language: a language that can be used to create problem-oriented languages"
It has been traditionally used in embedded systems and firmware where compactness is important.
"Forth has been called a meta-application language: a language that can be used to create problem-oriented languages"
It has been traditionally used in embedded systems and firmware where compactness is important.