I have two more questions for you kind folks:
1) I'm trying to write flash with the SPM instruction on a ATMega128. Let's say I'm trying to write the 64 words (128 bytes) located at E000 in my address map. How do I set Registers 31, 30 and port RAMPZ to do that. The ATMEL docs on the subject just spin my head around and around and around...
2) Ok so I want to erase the page that holds my interrupt vectors in flash on the ATMega128.
I set bit 0 in RAMPZ to zero. I set SPMSCR with an STS instruction to 3. I load Registers 31 and 30 with zero then issue the spm instruction. Interrupts are disabled. I wait a second or two. The value of SPMSCR is still 0x3. What did I do wrong?