Hey John, Okay, two ideas here... First, as it stands now, MFORTH's neutered file access words are read-only, but that seems more to do with the author's reluctance <https://github.com/AbortRetryFail/MFORTH/blob/main/src/MFORTH/answords/file.asm#L446> than any technical limitations of the machine. I don't think there's anything stopping the user from using MFORTH to assemble machine code somewhere in memory and then create a CO file to run it, but it doesn't give you any tools to do so out of the box. The second one, embedding MFORTH's interpreter? I have no idea how you'd go about doing such a thing. Maybe it's possible, but I'm still puzzling with how to translate DO...LEAVE...LOOP into the TASM macros. Pig iron, rock, etc. :)
-Alex On Tue, Jun 17, 2025 at 11:24 AM John R. Hogerhuis <jho...@pobox.com> wrote: > Awesome Alex, thank you for the improvements. > > Do you think there is a pathway to produce stand alone CO files from > MFORTH? I am not sure if you'd call that a metacompiler or target compiler? > > I guess a middle ground would be it able to create special COs that embed > a custom program dictionary, can switch in MFORTH for execution, and back > to BASIC at exit. > > -- John. > > > > On Mon, Jun 16, 2025, 2:05 PM Alex ... <abortretryf...@gmail.com> wrote: > >> Hello Tandy fans, >> >> I finally got around to doing some work on MFORTH to add some features I >> wanted. So far this much is done: >> - A DEPTH check for .S to avoid crashing if the previous word underflowed >> the stack. >> - Double length numbers entered via the interpreter. >> - Most of the DOUBLE word set. >> - A couple small fixes to the existing DOUBLE words. >> - A build script to compile the ROM image from Linux using Wine to run >> TASM. >> - Included some bits of the test suite from forth-standard.org. >> >> You can find the source here. >> https://github.com/AbortRetryFail/MFORTH/tree/main >> >> My motivations for doing this instead of just including a big .DO file of >> custom words were around speed (ROM words use the PHASH dictionary), and >> RAM savings. That and having to type -31072 1 instead of 100000. was really >> getting on my nerve. There's still some stuff in the works, but that's not >> done yet. >> >> If anyone's interested, I could build and publish ROM images somewhere. >> If nobody cares I'm not going to bother since I have what I need to >> continue my own project. >> >> Let me know what people think, >> -Alex >> >> -- >> Disclaimer: Any resemblance between the above views and those of my >> employer, my terminal, or the view out my window are purely coincidental. >> Any resemblance between the above and my own views is non-deterministic. >> The question of the existence of views in the absence of anyone to hold >> them is left as an exercise for the reader. >> The question of the existence of the reader is left as an exercise for >> the second god coefficient. (A discussion of non-orthogonal, non-integral >> polytheism is beyond the scope of this article.) Thanks /usr/games/fortune >> > -- Disclaimer: Any resemblance between the above views and those of my employer, my terminal, or the view out my window are purely coincidental. Any resemblance between the above and my own views is non-deterministic. The question of the existence of views in the absence of anyone to hold them is left as an exercise for the reader. The question of the existence of the reader is left as an exercise for the second god coefficient. (A discussion of non-orthogonal, non-integral polytheism is beyond the scope of this article.) Thanks /usr/games/fortune