Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:54 01 Aug 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 : LOAD as an MMBASIC Command?

Author Message
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 442
Posted: 05:05pm 22 Aug 2021
Copy link to clipboard 
Print this post

In MMBasic 05.07.01

LOAD "filename"

gives no syntax error but it doesn't load a program, either. Would it be possible to include it in a future version?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 05:21pm 22 Aug 2021
Copy link to clipboard 
Print this post

Should give a syntax error. LOAD "filename" is meaningless as it achieves nothing useful and could confuse as edit, run work from disk not memory
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 442
Posted: 08:08pm 22 Aug 2021
Copy link to clipboard 
Print this post

  matherp said  Should give a syntax error. LOAD "filename" is meaningless as it achieves nothing useful and could confuse as edit, run work from disk not memory


Here's what I get:

504MHz Colour Maximite 2 G2
MMBasic Version 5.07.01
Copyright 2011-2021 Geoff Graham
Copyright 2016-2021 Peter Mather

> load"fibon.bas"
>
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 08:52pm 22 Aug 2021
Copy link to clipboard 
Print this post

On the CMM2 EDIT <filename> loads the editor into memory and points it to <filename> on the SD card for editing. There is a LOAD command, but it's not for loading program files into memory.

The reason for that is that, on the CMM2, you don't load the program into memory to edit it, you edit the ASCII file on the SD card. The memory is being used by the editor.
Edited 2021-08-23 06:56 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:48pm 22 Aug 2021
Copy link to clipboard 
Print this post

LOAD BMP filename$
etc
VK7JH
MMedit
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 09:54pm 22 Aug 2021
Copy link to clipboard 
Print this post

Hi Jim :)
Your Clockface prog runs nicely on my Backpack after reming out the backlight control. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1132
Posted: 06:45pm 24 Aug 2021
Copy link to clipboard 
Print this post

On the CMM2, "RUN" and "EDIT" at the command prompt act on the currently active program. I've long thought it would be nice if "LOAD filename$" would set the active program.
Visit Vegipete's *Mite Library for cool programs.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 07:52pm 24 Aug 2021
Copy link to clipboard 
Print this post

It would just do the same as EDIT fname$, I suppose. There's nothing else it could do really as the CMM2 doesn't actually load a program in the traditional sense.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 442
Posted: 05:13am 25 Aug 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  It would just do the same as EDIT fname$, I suppose. There's nothing else it could do really as the CMM2 doesn't actually load a program in the traditional sense.


Not for me. EDIT "filename" opens the file for editing. I just need LOAD to make the file listable and runnable able to open if I just type EDIT after that.

>LOAD"testfile.bas"
>LIST
for i=1 to 10
print i;
next i
>run
1 2 3 4 5 6 7 8 9 10
>edit
<here the editor opens with the above program ready to edit>
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 06:46am 25 Aug 2021
Copy link to clipboard 
Print this post

If you don't mind me asking, why do you need a LOAD <filename> command?

Aesthetically it might be pretty, but as Peter says, it doesn't really achieve anything useful. All it would do is to change the current filename to the new one at the cost of extra complexity to the existing LOAD command. You still have to enter a RUN, EDIT or LIST command to make anything happen, all of which can take the new filename as a parameter anyway. After using any of those the previous filename has become the current one so RUN, EDIT and LIST all work without an argument.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 06:57am 25 Aug 2021
Copy link to clipboard 
Print this post

This issue was extensively discussed by the team, including Geoff, during the early development of the CMM2 and it was agreed that LOAD "filename" was superfluous and could also cause confusion as the CMM2 does not work like the Micromite. It isn't going to change now.

All you need to do to have the same effect is type edit fname$ and then immediately press F1

There is an omission in the current firmware in that LOAD fname$ does not give an error but is just ignored. This will be fixed in a subsequent release
Edited 2021-08-25 17:08 by matherp
 
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