prepare for fetch_config_word to be used for longer sequences
moved readmem function closer to fetch_word