Is it possible to start an array at an index not zero...I.E. you have an array a[35], of 35 elements, now I want to index at say starting 100, so the numbers would be a[100], a[
strictly speaking, this solution does not loet you define an array starting at an index different from 0, but you may declare your memory this way:
typedef union
{
unsigned char all[15000];
struct
{
unsigned char sram[10000];
unsigned char bram[5000];
};
} memory;
this does convey the intent that the memory is contiguous, and that it is split in 2 parts. note that you should beware of the alignment of bram
and sram
, a #pragma pack(1)
may be necessary.