Hi,
First of all ensure the CW project you have opened is Banked or Large Memory model. If it would be Small Memory model, then there is access to 64K linear addresses only.
What the LDY instruction does in your case, it loads the Index register Y with the contents of address 2 + 95BA = 95BC.
Now you forgot to put $ string in front of number 2.
Anyways, the content on the memory location 0x3895BC is 0xFFFF.
Try LDX #$8000 to check if it reads correctly.
You can try this function to read the memory location and ensure it's correct:
-------------------------------------------------------------------------
volatile unsigned int readData;
unsigned int Flash_Read_Word(unsigned long int addr)
{
return *(unsigned int *far)addr;
}
void main(void) {
//read word at 0x30_8000
readData = Flash_Read_Word(0x308000);
for(;;) {
_FEED_COP(); /* feeds the dog */
} /* loop forever */
/* please make sure that you never leave main */
}
----------------------------------------------------------------------
You can put there any address instead 0x308000.
If you expect other value to be read from that location, then your write function is not good.
Regards,
Ivan