dsForth/TR-DOS

Show us what you're working on, (preferably with screenshots).
User avatar
ketmar
Manic Miner
Posts: 610
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: dsForth/TR-DOS

Post by ketmar »

sorry for spamming with posts (this topic starting to look more like a developer blog, lol). so i finished converting dsForth to DTC. with DTC, each Forth word is one byte bigger, but each code word is two bytes smaller. it looks like they compenstates each other, so the image size is roughly the same with DTC. but the whole thing is ~1.2/1.5 times faster now. this is roughly the same speedup that Solo Forth got from the same transition. i believe that dsForth and Solo Forth are in the same speed league now (no benchmarking was done, though!).

p.s.: [mention]PeterJ[/mention] maybe we should create a subforum for "WIP projects"? "Brand new software" is good for announces, but the things like dsForth, with more-or-less constant progress reports only creates a useless noise there. and with "WIP projects" authors will be able to announce their projects, and give a link to development thread, if necessary. this way, "Brand new" will have only real announces and the corresponding discussion.
User avatar
PeterJ
Site Admin
Posts: 6853
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: dsForth/TR-DOS

Post by PeterJ »

[mention]ketmar[/mention], the 'Showcase your work!" Subforum is the best place.
User avatar
ketmar
Manic Miner
Posts: 610
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: dsForth/TR-DOS

Post by ketmar »

PeterJ wrote: Mon Aug 10, 2020 10:15 pm @ketmar,the 'Showcase your work!" Subforum is the best place.
oh, my bad. then move this topic there, if you please, so i'll stop spamming "brand new" with (mostly useless) updates. ;-)
User avatar
PeterJ
Site Admin
Posts: 6853
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: dsForth/TR-DOS

Post by PeterJ »

No problem at all [mention]ketmar[/mention]. The topic has been moved.
User avatar
ketmar
Manic Miner
Posts: 610
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: dsForth/TR-DOS

Post by ketmar »

thank you alot, [mention]PeterJ[/mention]! now i can post my hourly updates, and won't irritate people looking for a fancy new game to play! ;-)

so, DTC is working, both optimiser and tracer were updated to the new code format, and the cross-compiler is fully functional again. i also implemented autocompletion in line editor, so you can type some letters, and press SS+ENT to ask the system to finish the word for you. i'm so used to autocompletion feature that i always tried to use it in dsForth, but alas, it wasn't there... until now! ;-)

i believe that we're close to the new release now. i'm also planning to write several simple demo games to show you all that Forth (and dsForth) is not a toy, and it can do much more that that awful "game" from Melbourne House tape. i'm not expecting people going mad and start writing new games in Forth, but hey, it is worth trying anyway! ;-)

if only i had such system 20 years ago...

anyway, don't adjust your sets! ;-)
User avatar
ketmar
Manic Miner
Posts: 610
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: dsForth/TR-DOS

Post by ketmar »

added floating point support (with ROM calculator), including full-featured float<->string conversions (using calculator routines, so "42E18" can be parsed, and "4.2E+19" will be printed. i guess we're very close to 0.2.0 public release. ;-)

p.s.: don't expect the current development speed to stay the same after 0.2.0 release, tho. the system is more-or-less feature complete now, and for 0.3.0 release i need to complete various libraries, write documentation, and so on. the kind of work i don't really love to do.
User avatar
ketmar
Manic Miner
Posts: 610
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: dsForth/TR-DOS

Post by ketmar »

the huge delay with new release is due to... oh... i spent last week writing x86 forth from scratch, in asm and forth. ;-) UrAsm already has UrForth built in, but it becomes more and more limiting to have forth built into assembler, and not vice versa. ;-) the plan is to create a full-featured cross-compiler/emulator. yeah, it prolly means porting Zymosis to Forth (or maybe to x86 asm). ;-)

anyway, 0.2.0 will still be UrAsm-based. and i will backport new loops implementation, with full break/continue support. oh, the joy of Forth: the code from quite big 32-bit system can be taken to little Speccy as-is, because UrForth was made mostly compatible with dsForth.

p.s.: UrForth Native is fully working now (and passes ANS tests where i think it worth support ANS standard). but i want it to be self-hosted, so i wrote (ahem... borro... wrote!) a huge part of built-in x86 assembler already.

and if you want to know why i'm doing all that, considering that there are prolly at least a billion of really good native x86 forth systems... because i can, of course.
User avatar
ketmar
Manic Miner
Posts: 610
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: dsForth/TR-DOS

Post by ketmar »

so UrForth is self-hosting system now, which means that i have a working metacompiler framework. now i'm slowly doing natural-syntax Z80 assembler in it, and will use its metacompiler to cross-compile dsForth sources. all that means that dsForth project is not dead, and instead of being a mess of urasm and custom "almost-forth" syntax, it will be almost completely normal Forth, properly cross-compiled (with optimisiations, and better turnkey).

UrForth took slightly longer to write than i expected (3 weeks; i'm simply fine-tuning it now), due to writing natural-syntax x86 assembler in it first. that is, usual Forth assemblers are quite ugly, often looking like "4 [ebp] ecx mov". it is very easy to write the asm engine like that, but it is a PITA to use. so i wrote a custom parser and a "natural-syntax" asm, which accepts normal things, like "lea eax,[esi*4+edx+8]" instead.

i will do the same for Z80 assembler, and then will port current dsForth sources to the new system.

it means that there will be no 0.2.0 dsForth release, i'll jump staight to 0.4.0.
pandoraefretum
Drutt
Posts: 4
Joined: Sun Dec 27, 2020 2:19 pm

Re: dsForth/TR-DOS

Post by pandoraefretum »

Hello can I take a look at this dsForth, please ?
Could I have a link please ? The previous links I clicked do not work...
Thanks, Roland
User avatar
ketmar
Manic Miner
Posts: 610
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: dsForth/TR-DOS

Post by ketmar »

pandoraefretum wrote: Tue Mar 22, 2022 9:58 pm Hello can I take a look at this dsForth, please ?
Could I have a link please ? The previous links I clicked do not work...
Thanks, Roland
sure, no problems!
here is the latest sources i have (and built binaries too). you will need my UrAsm project if you will want to rebuild it.

sorry for the state of the code: i was in the middle of rewriting the whole system on top of my new 32-bit x86 UrForth (which would be used as a testbed, and as a cross-compiler), but somewhat… ran out of steam. i'll eventually return to the project, but don't know when and how, especially now (i'm living in UA).

there is also experimental +3DOS version too (.dsk binary should work on +3).

p.s.: if you want to fork the project, or use some of its parts for your own, be my guest! ;-)
Wall_Axe
Manic Miner
Posts: 492
Joined: Mon Nov 13, 2017 11:13 pm

Re: dsForth/TR-DOS

Post by Wall_Axe »

So you have cross compilation from PC to x86 dos system and zx spectrum?

Any .tap files of demos available of the games?
User avatar
ketmar
Manic Miner
Posts: 610
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: dsForth/TR-DOS

Post by ketmar »

nope, not yet. for various reasons i stopped working on it after creating a barely working proof-of-concept. basically, lack of time. but with new UrForth/C i may revisit this once again. the idea is still interesting, and optimising cross-compiler could be quite fast.

tbh, the main reason why i moved this project to "do it sometimes… later" is lack of users. i myself don't really need it in the finished form (i can use the pieces i already have), and most other ZX/Z80 Forth users seem to already have their own Forth systems (which is expected ;-). so now this is something i would do when i'll have some free time left from my free time. ;-)
User avatar
PeterJ
Site Admin
Posts: 6853
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: dsForth/TR-DOS

Post by PeterJ »

@ketmar,

I'm very slowly working my way through the Melbourne House Abersoft Forth book, and this example works fine in the original Abersoft Forth

Image

However, in your version there doesn't seem to be the graphics routines:

Image

Am I doing anything wrong?
User avatar
ketmar
Manic Miner
Posts: 610
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: dsForth/TR-DOS

Post by ketmar »

dsForth is not really compatible with Aberforth anymore. this word is called "DRAWLINE" there, if i remember it right. ;-)

that is, instead of "sx sy plot ex ey draw" use "sx sy ex ey drawline".

"125 0 PLOT I 99 DRAW" should be "125 0 I 99 DRAWLINE"
User avatar
ketmar
Manic Miner
Posts: 610
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: dsForth/TR-DOS

Post by ketmar »

@PeterJ, also, please, note that dsForth is not fully FIG-Forth compatible too. for example, instead of "<BUILDS … DOES>" you should use "CREATE … DOES>". it also has some modern words too, like "VALUE" and "DEFER".

but "<BUILDS … DOES>" will return in the next version, removing it was a design mistake. ;-)
Post Reply