Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 19:26 04 May 2024 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 : CMM2: How to make your operating-system experience less BASIC

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 09:57pm 26 Jul 2020
Copy link to clipboard 
Print this post

Hi folks,

Like the majority of the (non CP/M) 80's micro-computers that the CMM2 seeks to ape its operating-system is, depending on your point of view, either non-existent or literally BASIC.

It has a minimal set of commands for manipulating the file-system, a file-manager, editor, and a means to RUN programs and not much else.

Of course we have Geoff and Peter's wonderful MMBasic to allow us to write our own programs, but actually running these as commands can be rather wordy and not particularly pretty:
RUN "/mbt/src/main.bas", -C "myprogram.bas"


However with the release of V5.05.04RC14 a number of enhancements that Peter has implemented over the last few weeks come together to allow us to do something that, at least in my opinion, is rather better.

1. Create a top-level directory called, for example, "/bin/":
mkdir "/bin"


2. Set your SEARCH PATH to point to this directory:
OPTION SEARCH PATH "/bin/"


3. Create a one-line "link" file in "/bin/":
edit "/bin/transpile.bas"

to run the real program/command:
EXECUTE "RUN "+Chr$(34)+"/mbt/src/main.bas"+Chr$(34)+", "+Mm.CmdLine$

       - I hope to release a utility to automatically create and manage these "link" files in the next couple of weeks.

4. Now from any directory we can use the short-form RUN command *:
*transpile -C "myprogram.bas"


Note this actually rewrites the flash twice, first for "/bin/transpile.bas" and then for "/mbt/src/main.bas". If like me you are worried about flash endurance then this is where using OPTION RAM comes in. However for most, if not all, users that may be irrelevant, see this thread.

Hope this is helpful,

Tom
Edited 2020-07-27 08:24 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Print this page


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

© JAQ Software 2024