Quote Originally Posted by Darrel Taylor View Post
Therefore, it's easy to make a subroutine to write a single word anywhere that's free.
Code:
WriteFlashWord: ; Set FlashAddr and FlashData before calling (Vars are Destroyed)
    WRITECODE FlashAddr, FlashData
    IF (FlashAddr & %11) != %11 THEN
        FlashAddr = FlashAddr | %11
        FlashData = $3FFF
        WRITECODE FlashAddr, FlashData
    ENDIF
RETURN
The chip should be erased when it's programmed, so you only need to ERASECODE if you need to overwrite the data.
This works like a dream!

Thanks, Darrel!