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 6 RC15: AUTORUN ON in a library?
Author | Message | ||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 852 |
I put my entire program in a library, power-up and I get the command prompt. Autorun apparently ignored. Is there an elegant workaround? |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3797 |
Maybe MM.STARTUP Or another tiny program that invokes the ibrary. John |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 852 |
Cheers John I stuck a label "initRT" at the top and then my autorun program: Goto initRT Actually, this had me scratching my head; I had my program in the library and then downloaded a completely different program using MMC. The new program downloaded but the program that executed was the one in the library. Took me minute Loving this library, feature, though |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 852 |
Update: If the main program is blank, OPTION AUTORUN gets turned off but even if the main program has only a remark, OPTION AUTORUN ON is preserved and my program in the library runs. I don't need any commands, just non-blank. |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4212 |
That makes sense. The library is an extension of the main program. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6760 |
You have to think laterally. The Library is no longer a flash slot and doesn't follow the same system. You can make something in the Library run automatically using a SUB called MM.STARTUP but it runs *before* the main program. It isn't the main program and you can't use AUTORUN on that slot. If you want a program to run automatically and you have a Library installed you can use AUTORUN on flash slot 1 or flash slot 2. that's all. Without a library you can use flash slot 3 as well. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 852 |
It's actually worked out perfectly My library code is running the PID and motion profiling in a 1ms SETTICK. I stop the program and type EDIT and all I see is: function main() end function This is where other control logic gets inserted. very clean Edited 2024-11-15 03:40 by PhenixRising |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6760 |
The Library is actually an extension of the user program area to all intents and purposes. It's just that it's routines aren't displayed when the program is listed. Any routines that you could have in the program area will also work if you transfer them into the Library. However, you can't edit programs in the Library directly. Neither can you delete them, you can only delete the entire library. It's good to keep a file of your Library routines that you can use for editing and reloading. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Print this page |