- Wed Oct 13, 2010 12:30 pm
#111333
Hi,
is there any way I could write something like:
char buf[10];
buf = "test";
I would like to have this compiled as something like that:
mov buf,'t'
mov buf+1,'e'
mov buf+2,'s'
mov buf+3,'t'
The benefit of having this would be that the "test" string would not be defined in the data segment but only as immediate values in the flash memory. This would increase speed and lower sram usage while augmenting flash usage. I am using an atmega1284p which has 128k of flash memory and I want to make use of that.
is there any way I could write something like:
char buf[10];
buf = "test";
I would like to have this compiled as something like that:
mov buf,'t'
mov buf+1,'e'
mov buf+2,'s'
mov buf+3,'t'
The benefit of having this would be that the "test" string would not be defined in the data segment but only as immediate values in the flash memory. This would increase speed and lower sram usage while augmenting flash usage. I am using an atmega1284p which has 128k of flash memory and I want to make use of that.