WRITE:
ptr = flash start
while (*ptr = 0xff) ptr +=128;  // a check for end of flash area must be added
if (EndOfFlash) take action
write at *ptr[]