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 of MMBasic. Version 3.1
Page 1 of 2 | |||||
Author | Message | ||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
A new version of MMBasic (ver 3.1) is available for download from: http://geoffg.net/maximite.html#Downloads This version introduces three significant advances: - Defined Subroutines. These are a modern programming feature that allow you to define a subroutine and call it (with arguments) just as if it was a command built into the language. This is an important programming feature and the attached tutorial shows how to use them. 2012-01-27_192018_Defined_Subroutines.zip - Added the 1-wire protocol (thanks to Gerard Sexton). - MMBasic 3.1 now supports the DuinoMite. This includes all the advanced features of 3.1 such as optional line numbers, the full screen editor and defined subroutines. There are some limitations due to hardware issues, the primary one is that only 12 I/O pins are supported but otherwise all the standard Maximite features like VGA, USB, SD card and so on are supported. Future versions of DuinoMite MMBasic will be released simultaneously with the Maximite and UBW32 versions and this means that there will be no software differences between all three platforms. I would like to thank the Beta Test team for their help and particularly Fabrice Muller, John Wettroth and Hugh Buckle who provided valuable feedback and bug detection. Also a large thanks to Bruce Mitchell who spent hours going through the new language manual and found and corrected numerous errors. The MMBasic User Library (at http://geoffg.net/maximite.html#Downloads) is now being managed by Hugh Buckle and he has updated it to include examples of using defined subroutines and the 1-wire protocol. The library is a great resource for beginners and experts alike so, if you have written a program for MMBasic and you believe that it is worth sharing, please send it to Hugh at mmlib@geoffg.net and he will add it in. We are looking forward to many interesting submissions. The Change Log (included in the update download) details the changes and the MMBasic Language Manual (also included in the download) has been updated to include the new features listed above. Geoff Geoff Graham - http://geoffg.net |
||||
crackerjack Senior Member Joined: 11/07/2011 Location: AustraliaPosts: 164 |
This is wonderful news Geoff. MMBasic is maturing very rapidly into an enviable development and prototyping vehicle for the Maximite and friends. Defined subroutines are extremely powerful constructs for reuse and for a robust code structure. Thanks a stack! I'm off to download the update... |
||||
jwettroth Regular Member Joined: 02/08/2011 Location: United StatesPosts: 71 |
Thanks Geoff and thanks so much for mending this fence and re-uniting our funny little world! I love this little computer and it now has more fun potential than ever. I'll be ordering an Duinomite tomorrow. My MM is setup measuring several temperatures with 1 wire- very cool. I'm going to dedicate a CGMSTICK and an LCD to this task and put in a nice little box. Keep up the fun, John Wettroth |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Thank you Geoff! Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
djuqa Guru Joined: 23/11/2011 Location: AustraliaPosts: 447 |
BEWDY Newk VK4MU MicroController Units |
||||
Ray B Senior Member Joined: 16/02/2007 Location: AustraliaPosts: 219 |
Geoff you & can I now say "your team" are full of surprises, here I was waiting patiently for 3.1 with 1-WIRE but you also included the subroutine capability. I've had a quick look at the revised code for LCD & 1WIRE using subroutines & this really demonstrates the plus of having that enhancement. Thanks guys RayB from Perth WA |
||||
Vikingboy Regular Member Joined: 23/09/2011 Location: AustraliaPosts: 82 |
Hi, Just updated to 3.1, my mm.ver is still reading 3.01 , tested the sub command and is definitely 3.1, must not have updated the vers number. Really great update BTW :) Andrew |
||||
Olimex Senior Member Joined: 02/10/2011 Location: BulgariaPosts: 226 |
Well done! Geoff, Ken is going to upload on Github the DM sources with all DM features implemented so far in few days, feel free to check/test/include in further MM releases when you have time. |
||||
Olimex Senior Member Joined: 02/10/2011 Location: BulgariaPosts: 226 |
I just read this: "Disclaimer: This version of MMBasic has been tested on an early prototype provided by Olimex but there may be subtle differences in the newer hardware that I have not found." I will send you set of latest DuinoMite boards as yours were prototypes built in September for the Silicon Chip article. |
||||
djuqa Guru Joined: 23/11/2011 Location: AustraliaPosts: 447 |
Great Idea VK4MU MicroController Units |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
Has anyone found the way MMBasic uses spaces to be annoying? Some commands without spaces give an error but in other places, a space causes an error. eg. pixel (10,10)=1 does not work. pixel(10,10)=1 does work. I thought BASIC was suppose to ignore spaces. You can put them in if you want them, leave them out if you don't. |
||||
djuqa Guru Joined: 23/11/2011 Location: AustraliaPosts: 447 |
I have found that also annoying. 1 solution maybe at next revision the tokeniser adds an extra space after the keyword if there is none there and 1 is needed ie. Pixel(0,0)=1 becomes pixel (0,0)=1 VK4MU MicroController Units |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
That would be good, forcing a space (or taking away extra spaces?) inorder to keep the code looking consistent. I also find the Uppercase/Lowercasing weird but that's probably from my old school BASIC heritage. I personally like uppercase for all commands, keeps the screen consistent and clear what is a command... but thats my old school opinion. |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
I've never used a space within commands that have variables within brackets. Commands like LOCATE(x,y), SET(x,y) etc are like using arrays, subs or functions, there is never a space. The command LOCATE is really LOCATE( with some variables and a closing bracket at the end. I do think its correct for MMBasic to throw an error with PIXEL (x,y), and work fine with PIXEL(x,y), but I've used many versions of BASIC and thats always been the standard. Also, other commands need to see spaces between options. Spaces are part of the syntax, in some situations they can cause errors and in others they can be ignored, its just a case of knowing the syntax. Once you get into the higher languages using dot(.) notation, spaces are critical. I do agree with uppercase for commands, and any case for variables. The way MMBASIC automatically converts lower case commands to uppcase is perfect. I think this should be started as a new post, we're getting off topic here. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
marcwolf Senior Member Joined: 08/06/2009 Location: AustraliaPosts: 119 |
Brilliant, brilliant With the Defined Subroutines it opens up a way to do libraries of useful code that can be slotted into existing programs. For example a GPS library would be very easy to implement so that anyone can download it and share. Likewise a library for Servos etc. Again thanks for thie great development Dave Coding Coding Coding.. Keep those keyboards coding.. RAW CODE!!!!! |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Thanks for all the wonderful comments. I have some friends who ask "why do you spend so much time on this?" Perhaps I should print out this thread to show them. There are a few responses that I thought that I should answer in a batch: This is the correct version number. mm.ver uses TWO digits for the minor number. The manual explains it a little better. I could see that being a problem (I like all uppercase also) so I put in the CONFIG CASE UPPER command. You only have to do it once and it will be remembered, even with the power off. Yes, yes, exactly. Lets have lots of good software modules. Thanks very much Tsvetan - that would be brilliant. Geoff Geoff Graham - http://geoffg.net |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
Brilliant. Now it looks like BASIC...well, at least for us old dogs. Can I suggest adding a LOADBMP command in rev 3.2 Geoff? |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
I was thinking of that but I have been concerned about upsetting the good work others have done with their BASIC versions. Comments anyone? Geoff Graham - http://geoffg.net |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
I think if the new MMBAsic can use libraries, then thats covered. The SHOWBMP.BAS program included with the sample files could be used as a defined subroutine. Finding the balance between the byte count of implementing a feature into MMBasic, versus how often it would get used, is always going to be difficult. To some, a feature like displaying BMP's would be great, but to others it would never get used. But as part of a library, well, it would be like building your own version of MMBasic Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
A loader written in BASIC will always be slow. Depending on the amount of detail, it can still take over 5 seconds to load. I have been using crackerjack's MPF format that cuts it down but still not as fast as a routine built in to the firmware as a command written in C. A game I am writing for the MM requires the loading of a screen and it looks crap watching it load each time. Slows development time down too. |
||||
Page 1 of 2 |
Print this page |