diff options
-rwxr-xr-x | pp2cc.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -396,6 +396,10 @@ class Parse(object): lines += self.processShift(node.op, reg_first, operand, linked_node) else: lines.append(self.asm.binary_op(op, reg_first, operand)) + # explicitly set the PSW words because DIV and MOD are stupid and set + # the Z flag depending on the remainder + if op in ("DIV", "MOD"): + lines.append(self.asm.binary_op("LOAD", reg_first, reg_first)) return lines def processShift(self, operator, reg_number, operand_shift, linked_node=None): """Returns lines for a shift expression |