Example #1
0
 def perform(self, event):
     filename = prompt_for_string(
         self.viewer.control,
         "Enter MAC/65 assembly source filename for custom code",
         "Source File For Custom Code", self.viewer.assembly_source)
     if filename is not None:
         self.viewer.set_assembly_source(filename)
Example #2
0
def prompt_for_comment(e, s, ranges, desc):
    existing = s.get_first_comment(ranges)
    text = prompt_for_string(e.window.control, desc, "Add Comment", existing)
    if text is not None:
        s.set_comment(ranges, text)
        e.document.change_count += 1
        e.metadata_dirty = True
        e.refresh_panes()
Example #3
0
 def perform(self, event):
     e = self.active_editor
     filename = prompt_for_string(
         e.window.control,
         "Enter MAC/65 assembly source filename for custom code",
         "Source File For Custom Code", e.assembly_source)
     if filename is not None:
         e.set_assembly_source(filename)
Example #4
0
 def perform(self, event):
     e = self.active_editor
     text = prompt_for_string(e.window.control, "Enter segment name", "New Segment")
     if text is not None:
         segment, = e.get_segments_from_selection()
         if not text:
             text = "%04x-%04x" % (segment.start_addr, segment.start_addr + len(segment) - 1)
         segment.name = text
         e.add_user_segment(segment)
Example #5
0
 def perform(self, event):
     e = self.active_editor
     text = prompt_for_string(e.window.control, "Enter segment name",
                              "New Segment")
     if text is not None:
         segment, = e.get_segments_from_selection()
         if not text:
             text = "%04x-%04x" % (segment.start_addr,
                                   segment.start_addr + len(segment) - 1)
         segment.name = text
         e.add_user_segment(segment)
         e.find_segment(segment=segment, refresh=True)
Example #6
0
 def perform(self, event):
     e = self.active_editor
     filename = prompt_for_string(e.window.control, "Enter MAC/65 assembly source filename for custom code", "Source File For Custom Code", e.assembly_source)
     if filename is not None:
         e.set_assembly_source(filename)
Example #7
0
def prompt_for_label(e, s, addr, desc):
    existing = s.memory_map.get(addr, "")
    text = prompt_for_string(e.window.control, desc, "Add Label", existing)
    if text is not None:
        cmd = SetLabelCommand(s, addr, text)
        e.process_command(cmd)
Example #8
0
def prompt_for_comment(e, s, ranges, desc):
    existing = s.get_first_comment(ranges)
    text = prompt_for_string(e.window.control, desc, "Add Comment", existing)
    if text is not None:
        cmd = SetCommentCommand(s, ranges, text)
        e.process_command(cmd)