Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:30 28 Nov 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 : PicoMite: how to lock it up using EXECUTE and AUTORUN

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 02:01pm 28 May 2023
Copy link to clipboard 
Print this post

For your entertainment:

> Load "foo.bas"
> List
Print "foo"
Execute "RUN " + Chr$(34) + "bar.bas" + Chr$(34)

> Load "bar.bas"
> List
Print "bar"

> Load "foo.bas"
> Flash Save 1
> Option Autorun 1


Power cycle the PicoMite.

It prints "foo", hangs and then requires "Clear_flash.uf2" to bring it back to life.

I'm using the legacy EXECUTE/RUN mechanism because the real "foo.bas" is a menu program that was also to run on the CMM2.

I'm hoping if I just switch to using RUN then I won't have this problem, but I have to rebuild the contents of "A:/" first .

... EDIT: just using RUN on the PicoMite does work so the issue is something to do with EXECUTE.

Best wishes,

Tom
Edited 2023-05-29 00:08 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 02:32pm 28 May 2023
Copy link to clipboard 
Print this post

Now you've said that Peter will just execute EXECUTE. Heads will roll.
Mick

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 02:34pm 28 May 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  Now you've said that Peter will just execute EXECUTE. Heads will roll.


Hey, don't blame the messenger, I just report them when I find them. I've worked around it so it is no longer an issue for me.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 02:36pm 28 May 2023
Copy link to clipboard 
Print this post

:D

No probs. Handy to know though.
Mick

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 02:41pm 28 May 2023
Copy link to clipboard 
Print this post

... on reflection it's possible it may be me that broke "EXECUTE RUN" when I provided the less eccentric implementation of "RUN with command-line args" which meant the use of "EXECUTE RUN" was no longer necessary on the PicoMite or MMB4W ... it's still necessary on the CMM2 though, hence my using it in this program.

Best wishes,

Tom
Edited 2023-05-29 00:41 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 06:03pm 06 Jun 2023
Copy link to clipboard 
Print this post

I've done a bit more poking and EXECUTE "RUN ...":

- works if used from a program started with RUN.
- works if used from a program started with FLASH RUN <slot>
- hangs if used from a program started with AUTORUN.

Peter do you have a proper Pico debugging setup ? If so then I don't suppose there is any possibility you would satisfy my curiosity as to what the problem is ?

Best wishes,

Tom
Edited 2023-06-07 04:04 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 06:46pm 06 Jun 2023
Copy link to clipboard 
Print this post

OK - that's fixed. Issue was that autorun wasn't setting a longjmp variable.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 06:54pm 06 Jun 2023
Copy link to clipboard 
Print this post

  matherp said  OK - that's fixed. Issue was that autorun wasn't setting a longjmp variable.


Great, I've got some fixes for CALL and MM.CMDLINE$ that I'll document and send your way in the morning.

Best wishes,

Tom
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