modified:   lr35902.c : simplification to read/write from mem added