support simple memory reading and writing