This is the code (that fully works by the way):
Code: Select all
program Const_Pointer_Test;
const WrdArr: array[10] of word = (1000,2000,3000,4000,5000,6000,7,8,9,0);
var Ptr: ^const word;
var Wrd: word;
begin
{ Main program }
Ptr := @WrdArr; // <---------------- Ptr has a value of 0x822C (seen in the debugger)
Wrd := Ptr^;
inc(Ptr);
Wrd := Ptr^;
inc(Ptr);
Wrd := Ptr^;
end.
The content of Ptr is then (seen in the debugger) 0x822C.
But: in the statistics screen the address of "WrdArr" seems to be 0x022C.
The list file shows also an address of 0x022C.
Do I miss something? (I am new to PIC24...)
Thanks in advance!