Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:06 21 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Using MMBasic as shell

Author Message
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 06:59pm 02 Aug 2015
Copy link to clipboard 
Print this post

Hi
Would it be realistic to adjust the MMBasic prompt environment to be a sort of shell or OS ? It looks good and it has a lot of nice features, I am wondering if CFunctions can run "underneath" then maybe a CFunction could run as its own simple application ? I am probably way off track so apologies if that is so ( wouldn't be the first time :) )
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 01:57am 03 Aug 2015
Copy link to clipboard 
Print this post

It will be possible to do what you want in the very near term, just not right now

PeterEdited by G8JCF 2015-08-04
The only Konstant is Change
 
Chris Roper
Senior Member

Joined: 19/05/2015
Location: South Africa
Posts: 280
Posted: 03:44am 03 Aug 2015
Copy link to clipboard 
Print this post

  chronic said  Would it be realistic to adjust the MMBasic prompt environment to be a sort of shell or OS ?


I would love to see a simple Line Edit function where Up Arrow is last command and then you can modify it into a new or corrected command.


http://caroper.blogspot.com/
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 11:52am 03 Aug 2015
Copy link to clipboard 
Print this post

@chronic

You're not off track at all !

In 4.7 B23 and later there is a way for a CFunction to run in the background all the time even when MMBasic is sitting at the command prompt.

goto http://www.mmbasic.org/calltable/CFuncmSec.html for documentation and example code.

Notice that if you break out of the program using Ctrl+C, the background CFunction continues to run.

CFuncmSec is the gateway to providing time-slice multi-tasking (of C code only) under MMBasic

Peter
The only Konstant is Change
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 02:55pm 10 Aug 2015
Copy link to clipboard 
Print this post

It raises another question, can a CFunction (or similar) run
in other (within reason!) environments ? I gather it is a slab of largely
autonomous machine code ? The SD card Cfunction looks really nifty
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 03:01pm 10 Aug 2015
Copy link to clipboard 
Print this post

Thank you @Chronic

The SDCard driver is closely integrated with the MMBasic Interpreter and could NOT run in any other C environment.

Peter
The only Konstant is Change
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025