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