示例#1
0
 def imm16(self, v):
     if v in self.subroutines.keys():
         return self.subroutines[v][0]
     elif v in self.variables.keys():
         return self.variables[v][0]
     else:
         return hex16(v)
示例#2
0
    def output_disasm_headers(self):
        header = "; Generated by MSDOS_ExecTrace\n"

        for addr, (label, comment) in self.subroutines.items():
            header += "%s:\tequ %s\t; %s\n" % (label, hex16(addr), comment)

        return header
示例#3
0
 def get_label(self, addr):
     if addr in self.subroutines.keys():
         return self.subroutines[addr][0]
     elif addr in self.variables.keys():
         return self.variables[addr][0]
     elif addr < 0x4000:
         sys.exit("Unknown BIOS call: %s" % hex16(addr))
     else:
         return "LABEL_%04X" % addr
示例#4
0
    def output_disasm_headers(self):
        header = "; Generated by MSX_ExecTrace\n"
        header += "; git clone https://git.savannah.nongnu.org/git/z80asm.git\n\n"

        for addr, v in self.subroutines.items():
            if addr < 0x4000:
                label, comment = v
                header += "%s:\tequ %s\t; %s\n" % (label, hex16(addr), comment)

        return header