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.
I'm trying to convert a Tandy Colour Computer programme for use with the Maximite, but I'm running into memory problems.
The line that barfs is:
130 DIM VM$(110,1),A$(80),R1$(17),R3$(34),R4$(23),R5$(24),R6$(13)
The programme is called VARMAP.BAS. Those of you from Coco backgrounds may remember it.
It prints all the variables used in your programme and shows the line numbers where they are found.
Now, a Colour computer has just ~24K memory free when no programme is loaded, so I can't understand why the maximite can't handle this when it's got ~37K with the programme loaded.
Anyone got any clues?
Regards,Bob Devries Dalby, QLD, Australia
djuqa
Guru
Joined: 23/11/2011 Location: AustraliaPosts: 447
Posted: 06:34am 10 Feb 2012
Copy link to clipboard
Print this post
maybe those dim statements needing re-thinking?
they will use 80k of memory if each string element is reserved 256bytes
Maybe Use a data file to store the accumulated values
Edited by djuqa 2012-02-11VK4MU MicroController Units
BobDevries
Senior Member
Joined: 08/06/2011 Location: AustraliaPosts: 266
Posted: 07:46am 10 Feb 2012
Copy link to clipboard
Print this post
But.....
The programme works in a Tandy computer with less than 32K free RAM!
Why not on the Maximite?
Regards,
Bob Devries Dalby, QLD, Australia
djuqa
Guru
Joined: 23/11/2011 Location: AustraliaPosts: 447
Posted: 07:58am 10 Feb 2012
Copy link to clipboard
Print this post
Different size string Variable at a guess.
With the speed available on MM parsing thru the BASIC File and printing the accumulated data at the end of program maybe optionVK4MU MicroController Units
MM_Wombat Senior Member
Joined: 12/12/2011 Location: AustraliaPosts: 139
Posted: 08:02am 11 Feb 2012
Copy link to clipboard
Print this post
I had the same problem when I wrote Maxifont. Geoff G wrote
Hope this helps
mm_wombatKeep plugging away, it is fun learning
But can be expensive (if you keep blowing things up).
Maximite, ColourMaximite, MM+
Olimex Senior Member
Joined: 02/10/2011 Location: BulgariaPosts: 226
Posted: 10:25am 11 Feb 2012
Copy link to clipboard
Print this post
probably the Tandy computer BASIC use dynamic string sizes.
it's always trade off between speed and memory.
if you use fixed size 256 bytes per string you waste memory but increase the speed, if you use dynamic string sizes you have to move lot of memory blocks each time you access strings so this will decrease the memory usage but lower the speed
mookster1 Regular Member
Joined: 10/06/2011 Location: New ZealandPosts: 81
Posted: 08:55pm 12 Feb 2012
Copy link to clipboard
Print this post
The Maximite deals with 32-bit numbers only in arrays so I'd probably say that was the case. As the Tandy was 8 or 16-bits (can't remember which) it probably used that size for each cell in the array, hence why it works on the Tandy and not on the Maximite.Capacitance is futile - roll on 2012!