memory.c: Reduce code duplication via macros, dramatically reducing the compiled size of the executable. On the GCW Zero and DSTwo this is 228 KiB.