def get_ea_indexed(self):
addr, postbyte = self.read_pc_byte()<EOL><INDENT>log.debug("<STR_LIT>",<EOL>postbyte, byte2bit_string(postbyte), addr<EOL>)<EOL><DEDENT>rr = (postbyte >> <NUM_LIT:5>) & <NUM_LIT:3><EOL>try:<EOL><INDENT>register_str = self.INDEX_POSTBYTE2STR[rr]<EOL><DEDENT>except KeyError:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % (rr, postbyte))<EOL><DEDENT>register_obj = self.register_str2object[register_str]<EOL>register_value = register_obj.value<EOL><INDENT>log.debug("<STR_LIT>",<EOL>rr, register_obj.name, register_value<EOL>)<EOL><DEDENT>if not is_bit_set(postbyte, bit=<NUM_LIT:7>): <EOL><INDENT>offset = signed5(postbyte & <NUM_LIT>)<EOL>ea = register_value + offset<EOL><INDENT>log.debug(<EOL>"<STR_LIT>",<EOL>register_value, register_value, offset, ea<EOL>)<EOL><DEDENT>return ea<EOL><DEDENT>addr_mode = postbyte & <NUM_LIT><EOL>self.cycles += <NUM_LIT:1><EOL>offset = None<EOL>if addr_mode == <NUM_LIT>:<EOL><INDENT>log.debug("<STR_LIT>")<EOL>
Calculate the address for all indexed addressing modes