Post Reply 
Forth-41
12-04-2020, 09:48 PM
Post: #1
Forth-41
I saw Angel Martin's post, in the articles forum, about "Resurrecting Forth-41". I've had a soft spot for Forth for sometime now and it would be great to be able to run Forth programs on the DM41X. My history goes back to my early engineering days of working for RCA Semiconductor and the RCA CDP1802 8-bit microprocessor which had Forth as the first high level language for this micro. Now I have to dust off my pdf copy of Leo Broadie's "Starting Forth" and my "Forth Programmer's Handbook" to reintroduce myself to Forth.
I noted that the last thread in this forum on Forth was in 2014. So I'm beginning a new thread in anticipation of Angel's publishing (in his words) " More to come in the following weeks, stay tuned".

I'll be interested to get a copy of Forth-41 ROM module to try in my DM41X and I'll need to understand what other ROM modules need to be loaded into the DM41X for this Forth-41 ROM code to run properly. Also, will Forth-41 need certain ROM modules in certain locations in the DM41X? I'm still learning the DM41X, so this will be another challenge.

I look forward to hearing more from Angel when he's ready to share more about the Forth-41 module.
Find all posts by this user
Quote this message in a reply
12-04-2020, 10:03 PM
Post: #2
RE: Forth-41
If you want to run Forth, would it not be better to make a native Forth for the DM4* devices? Forth is among the simplest languages to implement.

I mean, running a Forth on top of the Nut CPU in a system that was not really designed for it, and have it emulated by an ARM. It feels like a lot of pain when you can just do it natively.

Or for that matter, implement a native Forth on the device to co-exists with the Nut emulation layer. That is something I thought about, but given the small interest in the platform and lack of time on my side, it is not likely to happen in this life.
Find all posts by this user
Quote this message in a reply
12-04-2020, 11:40 PM
Post: #3
RE: Forth-41
Thanks for starting this thread Jim - for folks wondering why we're talking here, about an article there, in the Articles Forum, follow-up posts (aka replies) aren't allowed in that Forum. Gene can because he has God-like powers...

Thanks Angel for the status report, and the good news that this module may final come into the light and be usable.

One thing I've long wondered: How does one create and save new Forth words? No long detailed reply is needed now, I'll wait for the docs, but just a quick and dirty reply would help.

For example, is the editor self-contained in the Forth system, or are separate source files ("Pages" I think in Forth) possible, e.g. from ASCII files in ExtMem?

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
12-05-2020, 12:25 AM (This post was last modified: 12-05-2020 12:26 AM by Craig Bladow.)
Post: #4
RE: Forth-41
(12-04-2020 10:03 PM)hth Wrote:  If you want to run Forth, would it not be better to make a native Forth for the DM4* devices? Forth is among the simplest languages to implement.

I mean, running a Forth on top of the Nut CPU in a system that was not really designed for it, and have it emulated by an ARM. It feels like a lot of pain when you can just do it natively.

Or for that matter, implement a native Forth on the device to co-exists with the Nut emulation layer. That is something I thought about, but given the small interest in the platform and lack of time on my side, it is not likely to happen in this life.

This Forth implementation runs on many STM32 micro-controller variants, as used in DM-41x. http://mecrisp.sourceforge.net/

Try CC41!
Find all posts by this user
Quote this message in a reply
12-05-2020, 01:52 AM
Post: #5
RE: Forth-41
(12-04-2020 11:40 PM)rprosperi Wrote:  Thanks for starting this thread Jim - for folks wondering why we're talking here, about an article there, in the Articles Forum, follow-up posts (aka replies) aren't allowed in that Forum. Gene can because he has God-like powers...

LOL, Bob. I tried to respond in the Articles Forum, to Gene's comment. I was awarded with the obscure, but terse..... "you have trespassed into the neutral zone!" Ok, not quite worded that way, but it wouldn't allow me to post. And I thought....how the heck can Gene post, but I cannot?! Then I jumped into the Articles Forum and saw the notice that Articles are not designed to allow posts and that comments/posts should be placed in the appropriate forum. That's when I realized that I'm just mortal.........not a God. ;-)
Find all posts by this user
Quote this message in a reply
12-05-2020, 08:52 AM
Post: #6
RE: Forth-41
Hi,

I've tried the Forth-41 module (you can download it on the ***** site), but unfortunately it doesn't work with the CX versions of the 41 series (eg the DM41X), as it collide on port 5 with the CX time module. It should work in a C/CV emulator, or maybe it is possible to reorganize the module to use another port, but I think it is placed there by a reason ...

Cheers,
Thomas

[35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X]
Find all posts by this user
Quote this message in a reply
12-05-2020, 02:05 PM
Post: #7
RE: Forth-41
(12-04-2020 11:40 PM)rprosperi Wrote:  Thanks for starting this thread Jim - for folks wondering why we're talking here, about an article there, in the Articles Forum, follow-up posts (aka replies) aren't allowed in that Forum. Gene can because he has God-like powers...



Gene: Let's hope not. I make mistakes like anyone else. :-)
Find all posts by this user
Quote this message in a reply
12-05-2020, 02:43 PM (This post was last modified: 12-05-2020 02:50 PM by Sylvain Cote.)
Post: #8
RE: Forth-41
(12-05-2020 02:05 PM)Gene Wrote:  
(12-04-2020 11:40 PM)rprosperi Wrote:  Gene can because he has God-like powers...
Gene: Let's hope not. I make mistakes like anyone else. Smile
Maybe true, but being a god, you made us forget about them. Big Grin
Find all posts by this user
Quote this message in a reply
12-05-2020, 02:49 PM (This post was last modified: 12-05-2020 02:50 PM by Sylvain Cote.)
Post: #9
RE: Forth-41
(12-05-2020 08:52 AM)ThomasF Wrote:  Hi,

I've tried the Forth-41 module (you can download it on the ***** site), but unfortunately it doesn't work with the CX versions of the 41 series (eg the DM41X), as it collide on port 5 with the CX time module. It should work in a C/CV emulator, or maybe it is possible to reorganize the module to use another port, but I think it is placed there by a reason ...

Cheers,
Thomas
Hello Thomas,
Diego Diaz has made a CX compatible version in his modules by changing the FORTH-41 second ROM page address from 5 to 7.
Ask Ángel if he can release a similar version.
Find all posts by this user
Quote this message in a reply
12-06-2020, 07:48 AM (This post was last modified: 12-06-2020 07:49 AM by Ángel Martin.)
Post: #10
RE: Forth-41
(12-05-2020 02:49 PM)Sylvain Cote Wrote:  
(12-05-2020 08:52 AM)ThomasF Wrote:  Hi,

I've tried the Forth-41 module (you can download it on the ***** site), but unfortunately it doesn't work with the CX versions of the 41 series (eg the DM41X), as it collide on port 5 with the CX time module. It should work in a C/CV emulator, or maybe it is possible to reorganize the module to use another port, but I think it is placed there by a reason ...

Cheers,
Thomas
Hello Thomas,
Diego Diaz has made a CX compatible version in his modules by changing the FORTH-41 second ROM page address from 5 to 7.
Ask Ángel if he can release a similar version.

The copy available on TOS has a few typos and glitches that stop it from working smoothly. Also the CX variant that circulated should not be using page #7 because there are calls to HPIL routines in the FORTH core ROM. All this is in the manual in preparation, a few more days to release it.

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
12-06-2020, 07:53 AM (This post was last modified: 12-06-2020 07:53 AM by Ángel Martin.)
Post: #11
RE: Forth-41
(12-04-2020 11:40 PM)rprosperi Wrote:  One thing I've long wondered: How does one create and save new Forth words? No long detailed reply is needed now, I'll wait for the docs, but just a quick and dirty reply would help.

For example, is the editor self-contained in the Forth system, or are separate source files ("Pages" I think in Forth) possible, e.g. from ASCII files in ExtMem?

The answer to both questions is YES you can.

You create new forth words using the forth definition syntax. They can in turn be used in subsequent definitions, all this only limited by the buffer memory (which can be as large as 255 registers.

There is an ASCII file editor included in the module that supports all special forth characters. Once complete the ASCII file can be loaded into the forth buffer memory with just one call to the LOADF primitive.

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
12-06-2020, 07:58 AM (This post was last modified: 12-06-2020 07:59 AM by Ángel Martin.)
Post: #12
RE: Forth-41
(12-04-2020 10:03 PM)hth Wrote:  If you want to run Forth, would it not be better to make a native Forth for the DM4* devices? Forth is among the simplest languages to implement.

I mean, running a Forth on top of the Nut CPU in a system that was not really designed for it, and have it emulated by an ARM. It feels like a lot of pain when you can just do it natively.

Or for that matter, implement a native Forth on the device to co-exists with the Nut emulation layer. That is something I thought about, but given the small interest in the platform and lack of time on my side, it is not likely to happen in this life.

All that is very true and sensible , yet there's something really enjoyable aabout using FORTH-41+ the way it is on the HP41. Besides, most of those objections could also be made about other advanced areas on the 41 platform (tiny keyboard, pitiful command line editor, slow CPU, etc. ) although on the CL/V41/41X speed is not an issue at all of course.

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
12-06-2020, 01:47 PM
Post: #13
RE: Forth-41
(12-06-2020 07:53 AM)Ángel Martin Wrote:  
(12-04-2020 11:40 PM)rprosperi Wrote:  One thing I've long wondered: How does one create and save new Forth words? No long detailed reply is needed now, I'll wait for the docs, but just a quick and dirty reply would help.

For example, is the editor self-contained in the Forth system, or are separate source files ("Pages" I think in Forth) possible, e.g. from ASCII files in ExtMem?

The answer to both questions is YES you can.

You create new forth words using the forth definition syntax. They can in turn be used in subsequent definitions, all this only limited by the buffer memory (which can be as large as 255 registers.

There is an ASCII file editor included in the module that supports all special forth characters. Once complete the ASCII file can be loaded into the forth buffer memory with just one call to the LOADF primitive.

Thanks Angel, I'm looking forward to seeing this when ready. Of all the old modules floating around, this one has remained the most enticing. Like you, I've been curious why so little information survived until today. Egan Ford made some big strides 6 years ago, but it needed further investigation as you've taken up to fully reveal (and fix!) its full capabilities.

Thanks so much for a very nice Christmas present! Smile

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
12-08-2020, 07:20 AM
Post: #14
RE: Forth-41
a ZIP container with both the MOD and ROM files is now posted in the article.
Slow train coming with the other documents, also running out of space in my account here...

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
12-08-2020, 01:04 PM
Post: #15
RE: Forth-41
Thanks Ángel!
Will load my device as soon as I get home, ready to dive into this again!
Best regards,
Thomas

[35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X]
Find all posts by this user
Quote this message in a reply
12-08-2020, 01:55 PM
Post: #16
RE: Forth-41
(12-08-2020 07:20 AM)Ángel Martin Wrote:  a ZIP container with both the MOD and ROM files is now posted in the article. ...

Please excuse my ignorance here. Can this code be installed into the DM41X, and work properly on it?

Thanks very much, in advance, for your patience and assistance.

smp
Find all posts by this user
Quote this message in a reply
12-08-2020, 03:48 PM
Post: #17
RE: Forth-41
(12-08-2020 01:55 PM)smp Wrote:  Please excuse my ignorance here. Can this code be installed into the DM41X, and work properly on it?

Yes it works on the DM41X, at least as much I have tested it.
Make sure you don;t have any other module competing for the page#4 access, such as the Library#4.

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
12-08-2020, 09:31 PM
Post: #18
RE: Forth-41
(12-08-2020 03:48 PM)Ángel Martin Wrote:  Yes it works on the DM41X, at least as much I have tested it. ...

Thanks very much, Angel!

smp
Find all posts by this user
Quote this message in a reply
12-14-2020, 05:56 PM
Post: #19
RE: Forth-41
Update: First draft of the manual is now posted in the same forum article.
A work in progress, all feedback is welcome.

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
12-14-2020, 06:27 PM
Post: #20
RE: Forth-41
(12-14-2020 05:56 PM)Ángel Martin Wrote:  Update: First draft of the manual is now posted in the same forum article.
A work in progress, all feedback is welcome.

While I know this is far from complete, your new draft manual is a damn fine 'work in progress' and not only goes a very long way to fill the gaps about how to use the module, but also adds tons more about how it works, the buffers, the editor program, etc., etc.

Really nice contribution Ángel, clearly this took a lot of work, but it sheds light on this interesting module and encourages folks to jump in.

Thanks very much!! Smile

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)