Hi all,
Well I've done some experimenting and this is what I have found:
I fixed the problem with my previously posted code.
I moved the flash buffer to E000. and made two versions (GLORK.asm and GLORKram.asm. the ram one is mostly just the fixed original code and the non ram one tries to write FLASH at E000 from FLASH very near the bottom of the array. They are both actually the same with different bits commented out.
The RAM one works perfectly as expected.
Now if there is several "blocks" (there is that word again!) surely some at the very bottom is in a different block to some very near the top.
What I found is it doesn't work!
I think I found the answer to Glork's problem as well. That is I believe he may be copying his routine down to RAM but actually using the version in FLASH.
This is exactly what I found:
If I single step all the way through it appears to work perfectly, even the bits I added where I read the recently flashed values back and copy them to RAM. But if you power down and back up the FLASH all reads $FF!
If I single step half way through then RUN, I end up in the FLASH failure loop.
If I RUN right from the top it blows up and when I stop it I am anywhere in memory.
So it appears that when you write the values to FLASH to prepare for flashing these values appear to the user programme as the actually flashed data.
So this begs the question. Can you use FLASH as RAM?
I'm off to see if I can find some documents on how this FLASH actually works.
Regards Peg
Message Edited by peg on 05-06-200601:18 PM