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 : New Version: Micromite MMBasic Ver 5.05.05
Page 1 of 2 | |||||
Author | Message | ||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
This is a minor update that has a few changes. These are: - The firmware will now recognise the codes generated by some old Linux terminal emulators for the keys F1, F2, F3 and F4. - Fixed a bug that, in some cases, could cause a Syntax Error when an expression is surrounded by brackets. - A GUI switch that is not a toggle switch will now correctly respond to touch. There is a debate in another thread for the PicoMite about how the GUI toggle switch should work. On the MM+ pressing the highlighted portion will flip the switch. So, if a switch is defined as follows: GUI Switch #1, "ON|OFF", 20, 90, 150, 50 Initially the ON portion will be highlighted and touch sensitive. When pressed the switch will go to on (true) and the OFF portion will be highlighted (ie, pressing ON will go on and OFF will go off). I have the feeling that some people think that this should be reversed. This new version can be downloaded from: http://geoffg.net/micromite.html (scroll to the bottom of the page). Geoff Geoff Graham - http://geoffg.net |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2290 |
hi, much appreciate the effort geoff hope all is going well where you are in these 'interesting times' we are all living in! cheers, rob :-) |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Thanks Geoff, Yes, your ongoing support is much appreciated. I notice that the SWAP CSubs are included in the new documentation. Thanks for that too. For what it's worth: I think the highlighted section should indicate the current state of the control. I'm not able to try it but I guess that: GUI Switch #1, "OFF|ON", 20, 90, 150, 50 would achieve that? In the Micromite Plus manual there are some extraneous bookmark entries after the GUI GAUGE and GUI BARGAUGE functions. Also there are no bookmarks for any functions after LOF Bill Keep safe. Live long and prosper. |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 1795 |
Re the switch debate. There is logic to both sides, however in a very diverse array of graphic software the available options are the highlighted ones. When a switch is 'off' the only available option is 'on'. So highlighting 'on' gets my vote, ie no change. To show that a control is on or off can be done with the LED graphic. |
||||
athlon1900 Regular Member Joined: 10/10/2019 Location: AustriaPosts: 48 |
Many thanks , Geoff Hope you and Peter don't forget the MMX-platforms Greetings and stay healthy , athlon1900 |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Yes, that would be the simple way to get the alternate operation. Thanks, I will fix them in the next day or two. Geoff Geoff Graham - http://geoffg.net |
||||
PicFan Senior Member Joined: 18/03/2014 Location: AustriaPosts: 133 |
Hello Geoff! Thank you for the new version. I have a little problem that already occurred with version V5.5.4 and also with V5.5.5! DIM f_Name$ = "TEST2.BAS" LOAD "TEST2.BAS", R RUN . . . . . No problem ! ----------------------------- DIM f_Name$ = "TEST2.BAS" LOAD f_Name$, R RUN ------------------------ ERROR: Cannot find File ! Documentation: LOAD fname$, R Thank you ! Wolfgang |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5740 |
Try it without the DIM statement: fname$="TEST2.BAS" Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
RUN and LOAD R both erase variables before they start for obvious reasons which is why the parameters to the commands must be string LITERALS and not variables |
||||
PicFan Senior Member Joined: 18/03/2014 Location: AustriaPosts: 133 |
Hello Mick ! Thank you for your answer, but it is the same problem, works not with a String. Wolfgang |
||||
PicFan Senior Member Joined: 18/03/2014 Location: AustriaPosts: 133 |
Hello Peter ! Thanks for your answer. I thought it works because it works flawlessly with the C routines on the MM170. Wolfgang |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5740 |
I never thought of that. I must be having a brain-fade day... :( Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
rentner111 Newbie Joined: 18/03/2014 Location: AustriaPosts: 19 |
Hello ! I think then the error message is not correct either? Shouldn't a "syntax error" be displayed? Whereby it works with "SAVE Fname $, and the documentation says the following in 2 places: Is a little confusing to me? |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5740 |
Immediately prior to LOAD "filename".R being executed a NEW command has also been executed. Consequently there is no error to trap, unless it is something wrong in the line "LOAD "filename",R". Note that when using the ".R" option "filename" has to be a literal because the NEW destroys all variables. You can't LOAD fname$,R because fname$ has been destroyed. As it is now a null string it can't be found so LOAD will return a "File not found" error. There is no problem with the syntax. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
I don't know what Mick is talking about with regards NEW or Peter is talking about with regards to variables being erased, but the problem seems to be on line 323 of FileIO.C, replace this: if(!FileLoadProgram(argv[0])) return; with this: if(!FileLoadProgram(getstring(argv[0]))) return; and in the absence of "strange weirdness" I believe it will work as documented. EDIT: OK, it's a bit more complicated than that as FileLoadProgram() needs changing to take a pointer to a filename, at the moment it takes a pointer to a (for want of a better term) program fragment, which it then can't evaluate properly because it has called ClearProgram() beforehand, which was Peter's point, anyway looks eminently fixable - infact I believe I already encountered and fixed it for MMB4L. Best wishes, Tom Edited 2021-12-11 05:21 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5740 |
LOAD "filename" is fine, as is LOAD fname$ The apparent problem comes when you use the ",R" option to run the program automatically after loading. You have to clear the memory for the new program, so all variables are reset. This isn't actually a problem as you want to do just that. :) Consider A$="myfile.bas" LOAD A$,R First A$ is set to "myfile.bas" Then memory and variables are cleared Then LOAD "",R is executed There is no file called "" so you get a "File not found" error, which is correct. The syntax of the line is fine. There is nothing wrong with the way it is working if you think about it. Using a string literal LOAD "myfile.bas",R will correctly erase the memory, load and run myfile.bas if it exists. "myfile.bas" isn't stored in the variables area so it doesn't get erased. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
With respect Mick, and assuming I am looking at the source-code for the correct 'mite, I don't believe that is how it works . When LOAD A$, R is encountered the interpreter is supposed to store (independently of MMBasic variable storage) the result of evaluating the string expression A$ and the R flag before it clears the memory and variables and then performs the LOAD based on the stored filename and flag. Anyway, I'm now going to bow out as this isn't really that constructive since I don't have the hardware or the build environment setup for the PIC32 'mite firmware. If Geoff finds time then perhaps he will come to his own conclusions. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
Your second quote is from the XMODEM description. You seem to have taken 'common' to mean 'in every instance' rather than 'very often' LOAD is a special case because it is meant to be used on the command line, not in a program. Jim VK7JH MMedit MMBasic Help |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5740 |
I bow to your translation of C, Tom. It may as well be an obscure dialect of Hebrew as far as I'm concerned. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
I don't have the source handy at this time but it should be easy to save the filename to a temporary place before re initialising the interpreter - and then use that temporary file name to load the program. I will add that to the Micromite ToDo list for the next version. Geoff Geoff Graham - http://geoffg.net |
||||
Page 1 of 2 |
Print this page |