On 04.09.2015 14:05, Hynek Sladky wrote:
> Hello,
> 
> I need to run assembly code in RAM. Is there any way how to write such
> source code? I need the compiler to produce "initialization" data in ROM
> which will contain the code with all addresses calculated for RAM
> placement, so the code can be a part of initialized data...
> 
> Thanks,
> Hynek

I don't think we have any compiler support for that. So I recommend:
Use the -b flag for the linker to get the symbols for code in RAM, and
some tool such as objcopy to move it into ROM. Then in your main(), do a
memcpy() to move the code form ROM to RAM, and then call it.

Philipp


Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to