write_mem8 with more than 0x40 bytes gives unexpected results