def set_state(self, state):
self.index_x.set(state[REG_X])<EOL>self.index_y.set(state[REG_Y])<EOL>self.user_stack_pointer.set(state[REG_U])<EOL>self.system_stack_pointer.set(state[REG_S])<EOL>self.program_counter.set(state[REG_PC])<EOL>self.accu_a.set(state[REG_A])<EOL>self.accu_b.set(state[REG_B])<EOL>self.direct_page.set(state[REG_DP])<EOL>self.set_cc(state[REG_CC])<EOL>self.cycles = state["<STR_LIT>"]<EOL>self.memory.load(address=<NUM_LIT>, data=state["<STR_LIT>"])<EOL>
used in unittests