t-edson / P65Pas

CPU 6502 Pascal Compiler/IDE/Debugger
GNU General Public License v3.0
120 stars 27 forks source link

Feature Request: Specify start address for the variables. #10

Closed at91rm9200 closed 4 years ago

at91rm9200 commented 5 years ago

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.

t-edson commented 5 years ago

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

t-edson commented 5 years ago

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.

at91rm9200 commented 4 years ago

Thanks.