def to_asm(self):
        if isinstance(self.tile, int):
            return (
                '  .db $%02X, $%02X, $%02X, $%02X' %
                (
                    self.y,
                    self.tile,
                    self.attrib,
                    self.x
                ))
        else:
            asmcode = ''
            x = 0
            # TODO: assert list mod width == 0
            for t in self.tile:
                i = x % self.width
                j = self.width / x
                asmcode += ('  .db $%02X, $%02X, $%02X, $%02X\n' %
                            (
                                self.y + (j * 8),
                                t,
                                self.attrib,
                                self.x + (i * 8)
                            ))
                x += 1
            return asmcode
dataset/ETHPy150Open gutomaia/pyNES/pynes/nes_types.py/NesSprite.to_asm/swapped operands of `/`