-/* uLisp AVR Version 3.5a - www.ulisp.com
-   David Johnson-Davies - www.technoblogy.com - 4th March 2021
+/* uLisp AVR Version 3.5b - www.ulisp.com
+   David Johnson-Davies - www.technoblogy.com - 19th March 2021
 
    Licensed under the MIT license: https://opensource.org/licenses/MIT
 */

  file.close();
  gc(NULL, NULL);
  return imagesize;
#else
  unsigned int addr = 2; // Skip eval address
  unsigned int imagesize = EEPROMReadInt(&addr);

void SDWriteInt (File file, int data) {
  file.write(data & 0xFF); file.write(data>>8 & 0xFF);
}
#elif defined(FLASHWRITESIZE)
#define BASE_ADDRESS 0x1C000

boolean FlashSetup () {
  return (Flash.checkWritable() == FLASHWRITE_OK);
}

boolean FlashBeginWrite (int pages) {
  // Erase how many 512K pages we need; must be a power of 2 <= 32.
  return Flash.erasePage(BASE_ADDRESS, pages) == 0;
}

void FlashWriteByte (uint32_t *addr, uint8_t data) {
  Flash.writeByte((*addr)++, data);
}

void FlashWriteInt (uint32_t *addr, int data) {
  Flash.writeWord(*addr, data);
  (*addr)++; (*addr)++;
}
#else
void EEPROMWriteInt (unsigned int *addr, int data) {
  EEPROM.write((*addr)++, data & 0xFF); EEPROM.write((*addr)++, data>>8 & 0xFF);
