Hello Mr. McMackins,

I guess I am a little late with this --- but I had recently been checking out some existing BASIC implementation projects, and I think there might be a few BASICs which can be ported, with some effort.

For example there is the "Minimal BASIC Compiler" (http://buraphakit.sourceforge.net/BASIC.shtml), and the "bas55" interpreter (http://jorgicor.sdfeu.org/bas55/). I had also been tinkering with Alan Cox's fork of a "ubasic" interpreter (https://github.com/tkchia/ubasic-ia16), and got it to work in DOS, though it is rather limited at this time.

(I suspect that bas55 is also small enough to fit on a 16-bit machine, but it is a bit too big to build with ia16-elf-gcc, so I hope to find a way to build it with Open Watcom.)

Regarding bwBASIC's SHELL( ) problem, I believe this is because the interpreter (in bwb_fnc.c in v3.20) uses system( ) to implement it, and both Watcom's system( ) function and `command.com /c' will return 0 as long as command.com is able to run at all.

(As a test, I recompiled bwBASIC on Linux/x64, and SHELL( ) did correctly return a wait( )-style status there.)

One way to work around this in bwBASIC, at least for non-built-in shell commands, might be to use Watcom's spawn...( ) functions.

Thank you!
--
https://github.com/tkchia

On 07/13/2018 12:29 AM, David McMackins wrote:
Well, that being the case, I guess I'll write my own. I'll send out an announcement when development starts; I'd like to finish the library I'm working on first.

For those interested in BASIC, if there are those among you with some experience with interpreters, I'm sure I could use some assistance in making a fast parsing routine. I've done something a little bit like this before that's pretty fast, but that program runs on modern computers with plenty of memory.


Happy Hacking,

David E. McMackins II
Supporting Member, Electronic Frontier Foundation (#2296972)
Associate Member, Free Software Foundation (#12889)

www.mcmackins.org www.delwink.com
www.eff.org www.gnu.org www.fsf.org

On 2018-07-12 11:08, Jim Hall wrote:
We only have bwbasic and Free BASIC in the FreeDOS software list, and
they are the only updated BASIC environments I know of. I don't code
in BASIC these days, so this isn't my area of expertise.

But Free BASIC is 32 bit. So I think bwbasic is the only one that
meets your requirements.

On Wed, Jul 11, 2018, 5:50 PM David McMackins <cont...@mcmackins.org>
wrote:

As someone who would like to write code that can be easily
understood by
users of other 80s computer systems, I prefer to write my scripts in
BASIC. I've been using Bywater BASIC from the FreeDOS distribution,
and
it's quite good up until you want to start considering the outside
world.

In my particular example, SHELL() is supposed to return the exit
code of
the program that you tell it to run, but it seems to always return
0.

I tried my damnedest looking at the source code for this program,
but it
is perhaps the messiest code I have ever looked at (and I've looked
at
mathematicians' code which is a sight to behold). I spent at least 2
hours digging and couldn't even find where the actual work was being
done to execute these external commands, much less what is done with
the
exit code. I'll spare you my full rant about how bad it is in there.

Anyway, are there any other decent BASIC interpreters to be found?
My
requirements are: a free software license, ability to run external
commands, ability to run on 16-bit systems.

Happy Hacking,

David E. McMackins II
Supporting Member, Electronic Frontier Foundation (#2296972)
Associate Member, Free Software Foundation (#12889)

www.mcmackins.org [1] www.delwink.com [2]
www.eff.org [3] www.gnu.org [4] www.fsf.org [5]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot [6]
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel [7]


Links:
------
[1] http://www.mcmackins.org
[2] http://www.delwink.com
[3] http://www.eff.org
[4] http://www.gnu.org
[5] http://www.fsf.org
[6] http://sdm.link/slashdot
[7] https://lists.sourceforge.net/lists/listinfo/freedos-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to