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 : Micromite MMBasic V5.2 Beta 1
Page 2 of 3 | |||||
Author | Message | ||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
No Rob, that is not the complete list of keywords. Due to the way that the interpreter works there are a lot of additional keywords that are detected "on the fly". For example Integer as in DIM INTEGER nbr. Geoff Geoff Graham - http://geoffg.net |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
That is still on my todo list. This release was primarily to fix a number of bugs and I ran out of time to look at some of the more complicated things (like this). Geoff Geoff Graham - http://geoffg.net |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Hmm, it went here: I am not sure what to do about this For a start I never thought that someone would be using all the RAM. The other problem is that this is not something that can be changed "on the fly" with an option. Can you change your program? Most people run out of RAM because they are using string arrays which default to 256 bytes per element. If you used the LENGTH option you can reduce that considerably. Otherwise you might have to stick with 5.1 for this particular application. Geoff Geoff Graham - http://geoffg.net |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Ah, I fixed it for RTC GETTIME in V5.1 but forgot about RTC SETTIME (which is what you must be using). I will fix both in the next beta. Sorry, I should have mentioned that. On investigation the syntax got too messy and because the fix is a 1 cent resistor I decided to not proceed. I have emailed them to you. Geoff Geoff Graham - http://geoffg.net |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2288 |
i've added a second pass that searches for "checkstring" in the .C files. this seems to turn up (hopefully!) all the qualifier keywords, such as INTEGER, RED, OFF, AIN, C16. 2016-05-14_235958_tokens2.zip is this them all? or at least almost all! if so, i'll do a little more processing on the results to create a simple list without duplicates. if there are a few stragglers that are left out these can be added in manually. cheers, rob :-) |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Yes Rob, you seem to have them all. Geoff Graham - http://geoffg.net |
||||
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 309 |
That exactly what I have done (before seeing your reply) and managed to find enough memory to stop the crashing. I had previously added the LENGTH option to a much larger array, but didn't bother with a couple of the small arrays. I had already resorted to poking bytes in the memory space of the variable arrays to maximize memory usage. Eight bytes per integer array element to store single byte values was really wasting the memory. Now I need to update the program docs from "arbitrary size limitation" to "limited by available memory" Thanks, Curtis I am not a Mad Scientist... It makes me happy inventing new ways to take over the world!! |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
On using an external voltage reference: That seems to do the job perfectly Peter. I will add it to the CFunction distribution with the firmware. Geoff Geoff Graham - http://geoffg.net |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5904 |
Looking at your resulting file, it looks like anything in quotes is a keyword with one or two exceptions - mainly error messages. That will be easy to extract and will make it easier for me to keep the syntax files up-to-date. One list for MX170 and one list for MX470 would be nice. Jim VK7JH MMedit MMBasic Help |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5904 |
About 20% of the program I write are flagged by one or two AV programs. It is a pain but I haven't been able to prevent it. Qihoo-360 and Avira seem to be the worst at the moment. Nortons is always a problem. The only way is to get the AV company to white-list it. This has to be done for every version so would take up a lot of time. Time I am not willing to spend. Jim VK7JH MMedit MMBasic Help |
||||
piclover Senior Member Joined: 14/06/2015 Location: FrancePosts: 134 |
|
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2288 |
That will be easy to extract and will make it easier for me to keep the syntax files up-to-date. tinkered a bit more, the output is now comma delimited (CSV) and can be loaded into a spreadsheet. also included is a compiled .exe, which should be placed in a directory off MicromiteSource. run this from a command prompt, with the output piped with >. when loading the CSV file into a spreadsheet, specify all columns as text. 2016-05-15_114344_tokens3.zip it does seem to miss out the lcd types for the MX170, as these seem to be handled differently to other modifiers - i've only been running this on the 5.1 sources, so 5.2 may be different. the output consists of three blocks of data: 1. scan for tokens (grouped by source .h file) 2. list of sorted tokens 3. scan for modifiers (grouped by source .c file) and as a useful outcome, the output has led me to spot a small oversight in the micromite manual. the function rnd(number) should really be listed as rnd[([number])], since all three variations work the same: print rnd(number) print rnd() print rnd question/suggestion for geoff: would it be useful for rnd(number) to produce a floatingpoint result that is scaled to be in the range >=0 to <number? and should rnd() be legal? it seems to not be consistent with the syntax of other functions. cheers, rob :-) |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Rob, The syntax for RND is the same as Microsoft BASIC. Bill was a little inconsistent when it came to this but I followed his syntax because there are a lot of old text based BASIC games on the net that used RND. From what I remember RND(nbr) originally used 'nbr' as the seed but that was later replaced with RANDOMIZE. Microsoft BASIC ignores 'nbr' but your idea would be a good use for it. Geoff Geoff Graham - http://geoffg.net |
||||
piclover Senior Member Joined: 14/06/2015 Location: FrancePosts: 134 |
I found a new quirk in v5.2 beta 1: When powered up, the MX170 PWM channel 1 is not properly initialized and any attempt to enable it on program start results in a non-functional PWM (the pin stays at logic level 1). The workaround is to reset the channel (with PWM 1,STOP) *before* attempting to use it. Note that this quirk only happens on power up (AUTOSAVEd programs will run fine when ran without powering down, for example). |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
That is strange because the PWM channel is closed, effectively the same as stopping the PWM, before a program is run (in ClearExternalIO()). I will have to setup a test. Geoff Geoff Graham - http://geoffg.net |
||||
kiiid Guru Joined: 11/05/2013 Location: United KingdomPosts: 671 |
I gave run to 5.2b1 and it looks like it is still unstable. I am getting strange behaviour from boards otherwise perfectly working with 5.1A, some OPTION ERROR CONTINUE generates an error as unrecognised word, and a few other smaller things which I can't remember right now. One suggestion as well. It would be much more natural if TRACE LIST gives the list in its execution order. Right now it gives the list reversed - the first element is the last executed line. It is difficult to follow the logic this way. http://rittle.org -------------- |
||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
Something for the manual that I was stumped on for a while regards the examples of Functions. FUNCTION Phils(InputVal) AS FLOAT Vs FUNCTION Phils(InputVal As INTEGER) As FLOAT When OPTION DEFAULT NONE is set. Couldn't quite get my head around it for a while, despite repeatedly going over page 42. A newcomer understanding issue undoubted, but an additional example would be good. Thanks Phil. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Good point Phil, thanks. Geoff Graham - http://geoffg.net |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2288 |
believe i've found a bug in the editor for version 5.1 (micromiteII). if you cut out a block of text and paste it back in further up in your code, the editor seems to loose track of where the last few lines of the listing is - you can not access them until save/exit and re-editing. this may well be a known bug. note, the above relates to version 5.1 and has not been tested with 5.2 have tried editing code using the 5.2 editor (again micromiteII), but found the editor decidedly flakey i'm afraid. one of the problems seems to be that it gets extended key codes from teraterm mixed up; this could be that characters are being randomly dropped somewhere. i gave up when the micromite became comatose and needed reflashing. cheers, rob :-) |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2288 |
geoff: have just checked to see if the problem with the last lines of a program becoming inaccessible is still in 5.2 beta 1. the issue still seems to be there. method: create something in the editor more than a page long, say 40 lines. scroll to the top (so there is code below the bottom of the screen), scroll down 10 lines, mark and cut out a few lines (f4, f4). no need to paste it back in. now try scrolling down to the end of the code. sometimes (but not always!) things go wrong, cursor jumps to end of status line. characters can be typed in still, and are recorded. there is also a problem when a basic program has space characters at the end. this confuses the editor when loading the program again (i presume the save routine is perhaps supposed to removing trailing spaces from lines?) i've yet to be able to duplicate the comatose state i experienced earlier on. cheers, rob :-) |
||||
Page 2 of 3 |
Print this page |