Fix mem_read to return correct value of read memory
MEM_READ was returning the wrong data for the memory register being read. This did not impact the software because the returned value was not being used. It is now fixed to return the correct data. Thanks to Marcos Faustino <firstname.lastname@example.org> for pointing this out!