New ToddyForth with built-in editor & block storage (Was: TasWord as editor for ToddyForth)

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
mrtinb
Posts: 1203
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

New ToddyForth with built-in editor & block storage (Was: TasWord as editor for ToddyForth)

Post by mrtinb »

(For at better read of the article, right click article and select 'View image' or 'View image in new tab'.)

Image

Patch for TasWord
TFBASBA.p

TasWord
https://www.zx81stuff.org.uk/zx81/tape/Tasword

ToddyForth 1.0
http://zx81.eu5.org/toddysofte.html

ToddyForth 1.2
viewtopic.php?f=11&t=1136

ToddyForth 1.3 (inside nucinv81.zip)
viewtopic.php?p=13746#p13746

SimDos2
http://cd.textfiles.com/230/EMULATOR/SI ... /SIMDOS2.P

SimDos2 instructions
http://cd.textfiles.com/230/EMULATOR/SI ... OGINFO.TXT
Last edited by mrtinb on Mon May 25, 2020 9:50 pm, edited 3 times in total.
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

olofsen
Posts: 172
Joined: Wed Jan 08, 2014 12:29 pm

Re: TasWord as editor for ToddyForth

Post by olofsen »

Great article :) Trying it I got stuck before step 1 ;) of the workflow though, combining TasWord with your patches... Could you perhaps show how to use SIMDOS2 for this purpose?

User avatar
mrtinb
Posts: 1203
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: TasWord as editor for ToddyForth

Post by mrtinb »

A little animated GIF with the process.

This takes 5 minutes, so watch until THE END.

Image
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

User avatar
mrtinb
Posts: 1203
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: TasWord as editor for ToddyForth

Post by mrtinb »

Remember the process requires 32 kB RAM at address 8k - 40k.
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

User avatar
kmurta
Posts: 166
Joined: Tue Sep 01, 2009 5:04 am
Location: Belo Horizonte - BR
Contact:

Re: TasWord as editor for ToddyForth

Post by kmurta »

Hello Martin and everyone!

Great job you did here!

I'm glad to know that there's still someone using Toddy Forth, it inspires me to continue with development.

In fact, a few days ago I started to rework at Toddy Forth and I am doing a complete remodeling, trying to adopt a pattern to follow among so many flavors of this intriguing programming language.

So I decided to adopt the Forth-79 standard (used in Jupiter Ace) as far as possible, as I believe it will provide a better level of compatibility. But everything is still at an early stage, let's see how far I can go.

But back to the subject of the post, it is a shame that I did not give due attention to the development of an editor for Toddy Forth. I'm sorry.

But your post reminded me of an editor published in the Brazilian magazine Micro Sistemas in a Forth course. I still have the magazine and I went to check it out to see if I could take advantage of it. Fortunately, no major changes were needed to make it work on TForth, just adjust the parameters related to the screen size, since the original was intended for the TRS80 which has a larger screen.

The Editor is a quite simple and lacks functions for insert/delete lines or for copy chars/lines. I believe that these functions can be easily included, so they are on the todo list.

Editor.gif
Editor.gif (150.45 KiB) Viewed 197 times

When testing the editor, I ended up noticing an inconvenient behavior that I hadn't noticed before: the screen automatically scrolls up when printing in its last position. A new version of TForth fix this behavior, in addition to adding some new words.

The attached file comes with TForth version 1.4 including the text editor with instructions for use in the "docs" folder. The file tforth14u.p is intended for equipment with support for character redefinition, while tforth14.p is the version for conventional characters. The keyboard mask and the map for the special characters are also available in the "docs" folder.

I hope they are useful!

Greetings and long life to Zeddy!

Kelly

tForth14.zip
(285.38 KiB) Downloaded 6 times
Last edited by kmurta on Mon May 25, 2020 3:03 am, edited 2 times in total.
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Ringo R470, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org

User avatar
mrtinb
Posts: 1203
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: TasWord as editor for ToddyForth

Post by mrtinb »

Wow. Thank you. What a pleasant surprice.

Current version of software has either ZXpand OR UDG.

If you disable ZXpand while copying the ROM chars and enable ZXpand again afterwards, then we can enjoy both ZXpand AND UDG.

This links to code to reenable ZXpand. I haven’t found the command to disable ZXpand yet, but maybe you can find it faster than me.

https://www.sinclairzxworld.com/viewtop ... 145#p12145
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

User avatar
kmurta
Posts: 166
Joined: Tue Sep 01, 2009 5:04 am
Location: Belo Horizonte - BR
Contact:

Re: TasWord as editor for ToddyForth

Post by kmurta »

mrtinb wrote:
Sun May 24, 2020 6:14 am
If you disable ZXpand while copying the ROM chars and enable ZXpand again afterwards, then we can enjoy both ZXpand AND UDG.
You're right, I don't know how I didn't think about it before :oops: but now it's done!

Now ZXpand is only activated during the execution of FLOAD or FSAVE!

I updated the animated gif and the download link at my previous post, see there.

I still intend to release a latest version (1.5) to include support for the ZXpand CAT command, then I will focus on the development of TForth-79.


P.S.: I took a look at Tasword and was impressed with its features! Undoubtedly, it is much more efficient to work with an entire text file than with just one screen at a time! I believe that this editor that I am providing with TForth can be easily modified to work with the entire text, in the manner of Tasword. Of course, also with the inclusion of features that are missing. It's already on the my TODO list!
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Ringo R470, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org

User avatar
mrtinb
Posts: 1203
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: TasWord as editor for ToddyForth

Post by mrtinb »

I much appreciate your work.

Your editor is a great start, and also easier than swapping between TasWord and ToddyForth.

Thanks for ZXpand together with UDG.
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

Moggy
Posts: 1989
Joined: Wed Jun 18, 2008 2:00 pm

Re: TasWord as editor for ToddyForth

Post by Moggy »

Hi Kelly.

It has been a few years since we talked about the problems with Toddy and external keyboards.
I'm happy to say this latest version performs excellently with Memotech, Fuller and Crofton keyboards. :D

if I could have one simple request?

A call to break during runtime as a lot of the mathematical stuff I'm working on involves large DO LOOPs and the only way to break out at the moment when I need to do something else is reset.

It is a useful feature that some other forths use for example Artic forth and H4th.
Can I also ask why ACE forth and not the most widely used FIG? Is it just something you are more familiar with?

No matter great work Kelly much appreciated. :ugeek:


Best Regards.

Moggy.

User avatar
kmurta
Posts: 166
Joined: Tue Sep 01, 2009 5:04 am
Location: Belo Horizonte - BR
Contact:

Re: TasWord as editor for ToddyForth

Post by kmurta »

Moggy wrote:
Sun May 24, 2020 10:55 pm
It has been a few years since we talked about the problems with Toddy and external keyboards.
I'm happy to say this latest version performs excellently with Memotech, Fuller and Crofton keyboards. :D
Great! I was really curious about this! I'm glad it's working well!
Moggy wrote:
Sun May 24, 2020 10:55 pm
A call to break during runtime as a lot of the mathematical stuff I'm working on involves large DO LOOPs and the only way to break out at the moment when I need to do something else is reset.
Use the word ?TERMINAL, it returns a true flag if the BREAK key has been pressed. You can include one of the following structures in your routines:

?TERMINAL IF QUIT THEN or ?TERMINAL IF ABORT THEN

I thought that this word was available in the vocabulary but no, it was an internal word. So you will have to download the compiler again.
Moggy wrote:
Sun May 24, 2020 10:55 pm
Can I also ask why ACE forth and not the most widely used FIG? Is it just something you are more familiar with?
It is not for ACE forth, this was just one of the items I considered. The main reason is that Forth-79 is a standard and was widely used in the 80s, as much, if not more, than Figforth, and the differences between them are minimal. But I don't pretend it to conform entirely with Forth-79, maybe I will incorporate some features of the Forth-83, making it more comprehensive and improving portability characteristics.

This document describes how to convert a FigForth system to Forth-79, good for better understanding the differences:
http://www.stackosaurus.com/misc/Forth- ... ersion.pdf

Are there any specific features of FigForth that you would like to keep?
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Ringo R470, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org

Post Reply