Memory theoretics
Erik Friesen
Posts: 1,071
I have had something circling around in my thoughts.
Once an assembly program is loaded from ram is there a way to use the hub memory in that location?
Or do I misunderstand something here?· Or is it still used somehow?
Once an assembly program is loaded from ram is there a way to use the hub memory in that location?
Or do I misunderstand something here?· Or is it still used somehow?
Comments
Be careful not to corrupt the chain of addresses of variables and objects. i.e. Just use the actual code space, not the pointers. (Hope you understand what I mean here as it isn't very clear, but not sure how to express it better.)
My bootloader loads 2 cogs which use $7FE0 to $7FFF to communicate. It then completely zeros ram from $0000 to $7FD9 and everything keeps on chugging along perfectly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
If you want another example, see the source code of SpaceWar! (VGA Version 3.2) in the Hydra forum. I re-use the RAM used to hold all the drivers (keyboard, VGA, sound etc) once they have been loaded into the cogs. It's easy to do with any existing driver and gives you a huge boost in the RAM available to your program at run time.
Ross.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
Does an @entry properly pass the beginning address?
@entry (provided that is the first symbol of the dat area) provides the starting address for that dat area in that object, yes..
You could define
datstart ' at the start of the area
datend' ' at the end of the area and
datsize = @datend - @datstart ' to get the overall length you have to play with.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!