Am 13.04.20 um 01:07 schrieb Brad Robinson:
> Is there any way to get SDCC to place string literals into a const area
> when targeting Z80?
> 
> I'm looking at a situation where I need to do some paging between a
> couple of different code overlays and having string literals embedded in
> the code area means those strings might get paged out when calling
> between overlays.
> 
> It'd be great to be able to manage those strings as a linker area so I
> could move them to somewhere that won't be paged out.
> 
> Brad

Named address spaces would work, but are overkill for this use-case.

I don't remember if the z80 backend has support for separate const and
code segments already. If it does, #pragma constseg or --constseg would
be a good solution.

Otherwise, #pragma codeseg is probably the easiest.

Philipp


_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to