trunk/src/emu/cpu/h8/h8make.py
| r244769 | r244770 | |
| 222 | 222 | values.append(lval) |
| 223 | 223 | for i in range(0, len(self.source)): |
| 224 | 224 | line = self.source[i] |
| 225 | | for i in range(0, len(self.params)): |
| 226 | | line = line.replace(self.params[i], values[i]) |
| 225 | for j in range(0, len(self.params)): |
| 226 | line = line.replace(self.params[j], values[j]) |
| 227 | 227 | target.add_source_line(line) |
| 228 | 228 | |
| 229 | 229 | class DispatchStep: |
| r244769 | r244770 | |
| 275 | 275 | if not line: |
| 276 | 276 | continue |
| 277 | 277 | if line.startswith(" ") or line.startswith("\t"): |
| 278 | | if inf != None: |
| 278 | if inf is not None: |
| 279 | 279 | # append instruction to last opcode, maybe expand a macro |
| 280 | 280 | tokens = line.split() |
| 281 | 281 | if tokens[0] in self.macros: |
trunk/src/emu/cpu/mcs96/mcs96make.py
| r244769 | r244770 | |
| 58 | 58 | values.append(tokens[i]) |
| 59 | 59 | for i in range(0, len(self.source)): |
| 60 | 60 | line = self.source[i] |
| 61 | | for i in range(0, len(self.params)): |
| 62 | | line = line.replace(self.params[i], values[i]) |
| 61 | for j in range(0, len(self.params)): |
| 62 | line = line.replace(self.params[j], values[j]) |
| 63 | 63 | target.add_source_line(line) |
| 64 | 64 | |
| 65 | 65 | class OpcodeList: |
| r244769 | r244770 | |
| 153 | 153 | opc = None |
| 154 | 154 | if i >= 0x100 and i-0x100+0xfe00 in self.opcode_per_id: |
| 155 | 155 | opc = self.opcode_per_id[i-0x100+0xfe00] |
| 156 | | if opc == None and (i & 0xff) in self.opcode_per_id: |
| 156 | if opc is None and (i & 0xff) in self.opcode_per_id: |
| 157 | 157 | opc = self.opcode_per_id[i & 0xff] |
| 158 | | if opc != None: |
| 158 | if opc is not None: |
| 159 | 159 | nm = opc.name + "_" + opc.amode |
| 160 | 160 | if opc.is_196: |
| 161 | | nm += "_196" |
| 161 | nm += "_196" |
| 162 | 162 | print >>f, "\tcase 0x%03x: %s_full(); break;" % (i, nm) |
| 163 | 163 | print >>f, "\tcase 0x200: fetch_full(); break;" |
| 164 | 164 | print >>f, "\tcase 0x201: fetch_noirq_full(); break;" |