def add_label(self, name, far="", proc=False): if self.visible(): #name = m.group(1) #print "~name: %s" %name name = re.sub(r'@', "arb", name) #print "~~name: %s" %name if not (name.lower() in self.skip_binary_data): print "offset %s -> %s" % (name, "&m." + name.lower() + " - &m." + self.segment) if self.proc is not None: self.proc.add_label(name, proc) #self.set_offset(name, ("&m." + name.lower() + " - &m." + self.segment, self.proc, len(self.proc.stmts))) self.set_offset(name, ("&m." + name.lower() + " - &m." + self.segment, self.proc, self.offset_id)) farb = False if far == 'far': farb = True self.set_global( name, op.label(name, proc, line_number=self.offset_id, far=farb)) self.offset_id += 1 else: print "!!! Label %s is outside the procedure" % name skipping_binary_data = False else: print "skipping binary data for %s" % (name, ) skipping_binary_data = True
def add_label(self, name, far="", proc = False): if self.visible(): #name = m.group(1) #print "~name: %s" %name name = re.sub(r'@', "arb", name) #print "~~name: %s" %name if not (name.lower() in self.skip_binary_data): print "offset %s -> %s" %(name, "&m." + name.lower() + " - &m." + self.segment) if self.proc is not None: self.proc.add_label(name, proc) #self.set_offset(name, ("&m." + name.lower() + " - &m." + self.segment, self.proc, len(self.proc.stmts))) self.set_offset(name, ("&m." + name.lower() + " - &m." + self.segment, self.proc, self.offset_id)) farb = False if far == 'far': farb = True self.set_global(name, op.label(name, proc, line_number=self.offset_id, far=farb)) self.offset_id += 1 else: print "Label %s is outside the procedure" %name skipping_binary_data = False else: print "skipping binary data for %s" % (name,) skipping_binary_data = True
def add_label(self, label): self.stmts.append(op.label(label)) self.labels.add(label)
def add_label(self, label, proc, line_number=0): self.stmts.append(op.label(label, proc, line_number=line_number)) self.labels.add(label)
def add_label(self, label, proc, line_number=0): self.stmts.append(op.label(label, proc, line_number=line_number)) self.labels.add(label)
def add_label(self, label): self.stmts.append(op.label(label)) self.labels.add(label)