def rows(addressed_data):
    """    iterate over dual-address and data sequence and make rows of up to
    16 data bytes, also restart rows if addresses jump.
    """
    stream = iter(addressed_data)
    while True:
        row = []
        a1, a2, data = next(stream)
        try:
            row.extend(bytearray(data))
            for i in range(len(data), 16, len(data)):
                an1, an2, data = next(stream)
                row.extend(bytearray(data))
                if a1 is not None and an1 != a1 + i:
                    break
                if a2 is not None and an2 != a2 + i:
                    break
        finally:
            yield a1, a2, row
