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 : MMBasic Test Version 2.5A
Author | Message | ||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
I have a test version of the Maximite firmware that can be downloaded from: http://geoffg.net/Downloads/Maximite/Maximite_Update_V2.5A.z ip This is identical to version 2.5 except that it has fixed the bug reported elsewhere on this site where it was impossible to read or use a string containing a character with a value of zero (ie, CHR$(0)). So, now the following program will work: 10 OPEN "chartest.dat" FOR output AS #1
15 FOR i = 0 TO &HFF 20 PRINT #1, CHR$(i); 25 NEXT i 30 CLOSE #1 35 ' 40 OPEN "chartest.dat" FOR input AS #1 45 FOR i = 0 TO &HFF 50 IF ASC(INPUT$(1, #1)) <> i THEN ERROR 55 NEXT i 60 CLOSE #1 While on the surface this looks like an easy fix it required extensive changes to the way string handling is done within MMBasic, so I would be grateful if as many people as possible could give this version a run with their most complex program and let me know if it fails. I have run it through my regression tests but, with a change as extensive as this, it is hard to test for every variation and this is why I need help with more testing. For the programmers out there here is a quick explanation: The original bug occurred because C style strings were used within MMBasic and they use a zero valued byte to indicate the end of a string. So I had to modify the string handling to use Pascal style strings where the length of the string is stored in the first byte of the array with subsequent bytes holding the characters of the string. These strings are NOT terminated with a zero byte and because of this they can hold the full range of binary values for a byte (from 0x00 to 0xff). These strings are used in variables, functions and expression evaluations in the interpreter. The rest of the firmware uses normal C style strings and so there are often conversions between the two. I plan to release the full source when I get to release version 2.6 Thanks, looking forward to lots of "it works OK" reports, Geoff Geoff Graham - http://geoffg.net |
||||
Bill.b Senior Member Joined: 25/06/2011 Location: AustraliaPosts: 226 |
Hi Geoff this version has also fixed the video jetter that i had with v2.5 regards Bill In the interests of the environment, this post has been constructed entirely from recycled electrons. |
||||
ajkw Senior Member Joined: 29/06/2011 Location: AustraliaPosts: 290 |
Geoff, It has been able to handle all the string functions that I have been able to throw at it so far. I see this version has the fix for the Settick wont tick after ctrl-c problem also. Regards, Anthony. |
||||
VK6MRG Guru Joined: 08/06/2011 Location: AustraliaPosts: 347 |
Hi Geoff, So far so good. I report that "it works OK" Regards, Matthew VK6MRG Its easier to ask forgiveness than to seek permission! ............VK6MRG.............VK3MGR............ |
||||
sparkey Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 819 |
running it on the altro fist bacth of kitset dont really use it much atm but firmwhare loaded ok regards sparkey.... technicians do it with least resistance |
||||
VK6MRG Guru Joined: 08/06/2011 Location: AustraliaPosts: 347 |
Yes, the update was tried on my original Maximite (V2 from Altronics-second batch) and the Maximite EV (revision A). Regards, Matthew VK6MRG Its easier to ask forgiveness than to seek permission! ............VK6MRG.............VK3MGR............ |
||||
ajkw Senior Member Joined: 29/06/2011 Location: AustraliaPosts: 290 |
Geoff, I have only noted this curiosity since loading this version but may not be actually related to just this version. It however seems to relate to string handling within the option prompt command. In the attached screen shot you will see I set the prompt in line 5065 of my autorun program. Careful study of the prompt shows that when the current directory is the root directory there is a space between the time and the \ but when set to a directory the space disappears. Cheers, Anthony. |
||||
Print this page |