implemented Memory I/O from cpu side