t-edson/P65Pas

Feature Request: Specify start address for the variables.

at91rm9200 opened this issue · 3 comments

Hello,

it would be useful, to have the possibility to specify a separate starting address for the variables. Similar as the $ORG directive for the code starting address.

My device has separate ROM and RAM memories and I would like to run the program out of the ROM memory. It seems, as if the compiler places the variables directly behind code start. So accessing the variables would fail, if I would place the program into ROM. I really would like to see something like {$DATA xxxx} :-)

One could locate the variables “by hand” with the Absolute modifier, but this is cumbersome.

Regards, Bernd.

I think this is not a big problem. Maybe adding a new directive or option compiler. I will check.

Version 0.7.1 includes the directive $SET_DATA_ADDR to specify a separate block in RAM where allocates variables in first instance. If the block is full the variables will be located in the normal form, that's before the code. The objective of $SET_DATA_ADDR is to help on defining zero page registers.

Thanks.