|
Forum Index : Microcontroller and PC projects : MM Extreme 64 not enough memory
| Author | Message | ||||
| astro1 Regular Member Joined: 26/06/2016 Location: AustraliaPosts: 53 |
Running the code below exits with not enough memory. Uncomment line 12 (print date$, time$) and no error. date & Time are the same from line 9. (This is a reduce version of the code being run). MM Extreme 64, Ver 5.04.18 @ 252MHz, OPTION CPU 252 OPTION LCDPANEL SSD1963_4, LANDSCAPE OPTION TOUCH 12, 14 OPTION SDCARD 18, OPTION RTC 5, 6 OPTION HEARTBEAT ON Results when run. 11-11-2018 05:59:48 [13] UTC = GetSec(Val(Right$(Date$, 2)), Val(Mid$(Date$, 4, 2)), Val(Left$(Date$, 2)), Val(Left$(Time$, 2)), Val(Mid$(Time$, 4, 2)), Val(Right$(Time$, 2))) Error: Not enough memory ----------------------------------------- ' MMX option explicit option default none Dim Integer tyear, tmth, tday, tdow, thour, tmin, tsec, tdst Dim Integer md(12) = (0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334) Dim integer UTC ' cls print date$, time$ UTC = GetSec(Val(Right$(Date$, 2)), Val(Mid$(Date$, 4, 2)), Val(Left$(Date$, 2)), Val(Left$(Time$, 2)), Val(Mid$(Time$, 4, 2)), Val(Right$(Time$, 2))) 'print date$, time$ UTC = GetSec(Val(Right$(Date$, 2)), Val(Mid$(Date$, 4, 2)), Val(Left$(Date$, 2)), Val(Left$(Time$, 2)), Val(Mid$(Time$, 4, 2)), Val(Right$(Time$, 2))) end Function GetSec(yr As Integer, mth As Integer, day As Integer, hr As Integer, min As Integer, sec As Integer) As Integer GetSec = (yr - 14) * (365 * 24 * 60) GetSec = GetSec + ((yr - 13) \ 4) * (24 * 60) GetSec = GetSec + (md(mth) * (24 * 60)) GetSec = GetSec + ((day - 1) * (24 * 60)) GetSec = GetSec + (hr * 60) GetSec = ((GetSec + min) * 60) + sec If (yr - 16) Mod 4 = 0 And mth > 2 Then GetSec = GetSec + (24 * 3600) End Function |
||||
goc30![]() Guru Joined: 12/04/2017 Location: FrancePosts: 435 |
I have same problem with micromite/mx170 if you uncomment second "print" (line12): it work correctly |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10572 |
Please ensure you are running 5.04.19 |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
There were some problems in V5.04.09 regarding "Not enough memory" errors that should have been fixed in V5.04.10 Beta 13 for the MX170 and MX470. Download the beta version from http://geoffg.net/micromite.html#Downloads I understand that Peter avoided this particular bug in his port of MMBasic to the MM Extreme so perhaps there is a different issue there. EDIT: Peter beat me to the answer. Geoff Geoff Graham - http://geoffg.net |
||||
goc30![]() Guru Joined: 12/04/2017 Location: FrancePosts: 435 |
I confirme: for mx170, V5.09.10 beta 10, work correctly with astro1's programm |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |