Store and fetch the registers using the memory