gvasm icon indicating copy to clipboard operation
gvasm copied to clipboard

Static memory allocation should support layering somehow

Open velipso opened this issue 1 year ago • 0 comments

.struct Player = iwram(-1) // all layers
  // ...
.end

Something like iwram(v) where v is a 32-bit number that says whether the struct should be allocated to that layer.

So that means there are 32 layers to work with. iwram(-1) means all layers due to all bits being on.

This complicates the allocation algorithm and could leave gaps, depending on the layering.

Maybe the syntax should be nicer though, like ranges:

.struct Player = iwram(0-4, 8, 10)
  // ...
.end

Though would still limit it 0-31, and default to all if no range provided.

velipso avatar Jun 01 '23 14:06 velipso