MMBasic ANSI - MMBasic on Mac/Windows/Linux in a terminal
Author
Message
jvanderberg
Regular Member
Joined: 06/05/2026
Location: United StatesPosts: 85
Posted: 12:40pm 26 May 2026
robert.rozee said
jvanderberg said
Ok, I've rebuilt it so it should be more libc version tolerant. I don't really have the means to test this well without some trouble, so let me know what you think.
--console-only launches mmbasic_ansi with a console only terminal, no graphics. Any graphics programs will just appear to hang at the console until the program exits. The editor works just fine, and the environment responds to terminal resizes.
I think I addressed the control-Z issue, let me know.
Just re-download it.
libc problems fixed, it now runs happily under linux mint 19.3 and using the
--console-only
parameter produces usable output.
but while ctrl-Z is fixed, both ctrl-C and ctrl-D are not handled and terminate mmbasic. the problems with ctrl-C and -D, as well as the original with ctrl-Z can all be fixed by placing the terminal in RAW mode. the following pascal (FPC) code does this, taken from a serial-over-TCP/IP VT102 emulation hack i wrote a few years back:
program talkto;
uses sysutils, termIO, BaseUnix;
var tios, SAVEDtios:termios;
begin
TCGetAttr(0, tios);
SAVEDtios:=tios;
CFMakeRaw(tios);
TCSetAttr(0, TCSANOW, tios); // place console in RAW mode
repeat // main loop, use break to exit
until false;
TCSetAttr(0, TCSANOW, SAVEDtios) // restore console state
end.
hopefully converting this into C should be simple!
btw,
option list
seems to not work. i tested by setting and resetting
option colourcode on/off
where
option list
produced no output no matter what the setting was.
if desired, you could make options persistent by saving them in a .ini file of the same name and location as the mmbasic binary. this .ini file could then also hold settings such as
--console-only
. but this is all just a suggestion!
cheers,
rob :-)
Thanks for the feedback. These should now be fixed.
Edited 2026-05-27 03:59 by jvanderberg