#define EEPROM_ACCESS(x) *(word *)(x)
Did you use this macro to read from 0x1700? Assigning EEPROM_ACCESS(0x1700) to char variable will give 0x33.
write_eeprom_byte is full of bugs:
FSTAT_FACCERR = 1; Is wrong. This will also write one to FCBEF bit and probably will set again some error bit.
Use FSTAT = FSTAT_FACCERR_MASK;
*(word*)(addr) = data;
S08 eeprom is byte programmable, not word programmable.
In your case EEPROM at 0x1700 is not erased. You should erase it before programming.
FSTAT_FCBEF = 1;
FSTAT_FACCERR = 1;
FSTAT_FPVIOL = 1;
FSTAT_FACCERR = 1;
EEPROM_ACCESS(addr) = data; // Write the data
EEPROM_ACCESS should write byte (*(char*)x).
FSTAT = 0x80; // Clear command buffer empty flag
Don't use "magic constants". FSTAT = FSTAT_FCBEF_MASK; is somewhat self documenting.