Was allowing both low and high byte writes by byte, but not word,
which was stupid.
EEPROM_write16(d);\r
}\r
else {\r
- // XXX: hardware could easily use MSB too..\r
u8 *pm = (u8 *)(SRam.data - SRam.start + a);\r
- if (*pm != (u8)d) {\r
+ if (pm[0] != (u8)(d >> 8)) {\r
SRam.changed = 1;\r
- *pm = (u8)d;\r
+ pm[0] = (u8)(d >> 8);\r
+ }\r
+ if (pm[1] != (u8)d) {\r
+ SRam.changed = 1;\r
+ pm[1] = (u8)d;\r
}\r
}\r
}\r