VM: Writing to memory, tests.