My example needed data-loc non-zero: so --data-loc 0x1 worked as I wanted, as it was zero there, not. Also, just tangential: later, take care about the order of other areas later (that is relevant only if your compiled code uses them and you need specific placement, otherwise, you can ignore that).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes. Great. It works very well! No change from my normal crt.s file was needed either: no need to place .area _DATA or _HEAP in front of _CODE, it seems.
👍
2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm on z80/MSX and try to have RAM in 0x0000-0x3FFF and ROM in 0x4000-07FFF
I'm on SDCC 4.2 and I was trying this:
sdcc --code-loc 0x4000 --data-loc 0x0000 -mz80 --no-std-crt0 empty_reverse_crt.rel ...I thought I had to place RAM before ROM in my CRT, so my empty_reverse_crt.s is like ( I have barely no idea what I'm doing here):
Also, there is no code in the CRT, no use of initializers.
But, still, RAM is placed AFTER my code. Any tips?
My example needed data-loc non-zero: so
--data-loc 0x1worked as I wanted, as it was zero there, not. Also, just tangential: later, take care about the order of other areas later (that is relevant only if your compiled code uses them and you need specific placement, otherwise, you can ignore that).Thank you so much! will test ASAP when back at the computer.
Last edit: bengalack 2024-12-07
Yes. Great. It works very well! No change from my normal crt.s file was needed either: no need to place .area
_DATAor_HEAPin front of_CODE, it seems.