Starting to explain my doubt, I have to say that I have done the change described here:
https://www.z88dk.org/wiki/doku.php?id= ... es:sp1_ex1
Specifically in the "Changing the Memory Map" section. It's exactly the same changes, using "heap.asm" with same values and memory locations.
And everything works correctly
Besides, I have thought the idea to take advantage of that memory heap slot (5 kb). I would like to locate some piece of code (not only data) into it. Something that will only executed once like a game intro, and it will be overwritten by the heap after, when the game starts.
So, I tested to put the "org" directive ( viewtopic.php?f=2&t=11567 ) into of specific module (a c-file joined by import directive) of my game, hoping that only c-module was located in the "org" position (into the heap) and the rest of code still follows in the same place.
( I know, I was very naive )
But two problems has appeared:
1.- Linker doesn't like the overlap.
Code: Select all
Error: Section LOWMEM overlaps section code_compiler by 4206 bytes Error: Section code_compiler overlaps section CODE by 1707 bytes zx: Aborting ... one or more binaries overlap
Watching the memory allocations, I realized the linker has moved all compiled_code to the "org" location, instead of only the specific c-module as I wanted.
Is it possible to do what I want to do?
Is there a simple/easy way?
thanks in advance