Beispiel #1
0
def example():
    cx = utils.setup(FILENAME, -1)

    for a, b in SYMBOLS.items():
        cx.m.set_label(a, b)

    seven_segment.table(cx.m, 0x7e29, 0x7e39, verbose=False)

    ct = utils.cmd_tbl(cx, 0x7c5d, 0x7c91)
    cta = utils.arg_range(cx, ct, 0x7d65, 0x7d81)
    utils.cmd_dispatch(cx, cta, 0x644c)

    utils.key_dispatch(cx, 0x640c, 0x644c)

    utils.dsp_dispatch(cx, 0x6848, 0x6858)

    for i in (0x614c, 0x619c, 0x61a3, 0x69dd, 0x69e4):
        utils.float70(cx.m, i)

    utils.square_tbl(cx.m)

    utils.apply_labels(cx, "A")
    utils.tramp(cx)

    return NAME, (cx.m, )
def example():
    cx = utils.setup(FILENAME, -1)

    for a, b in SYMBOLS.items():
        cx.m.set_label(a, b)

    ct = utils.cmd_tbl(cx, 0x7c64, 0x7c98)
    cta = utils.arg_range(cx, ct, 0x7d6c, 0x7d88)

    def cbyte(asp, a):
        c = data.Const(asp, a, a + 1)
        c.val = asp[a]
        c.typ = ".BYTE"
        c.fmt = "0x%02x" % c.val

    cx.dataptr(0x6403)
    cx.dataptr(0x6405)
    cx.dataptr(0x6407)

    for a in range(0x7eed, 0x7ef9):
        cbyte(cx.m, a)

    c = cx.dataptr(0x7915)
    cx.m.set_label(c.lo, "@7SEGCODES")
    cx.m.set_label(c.dst, "7SEGCODES")
    c = seven_segment.table(cx.m, c.dst, c.dst + 0x10, verbose=False)

    for a in range(0x7ead, 0x7ebf, 2):
        cx.dataptr(a)

    # XXX: Add mising flow
    cx.disass(0x6845)
    cx.disass(0x6867)

    for i in range(0x6b23, 0x6b3b, 3):
        utils.data24(cx.m, i)

    for a in range(0x77d7, 0x77f7, 4):
        data.Txt(cx.m, a, a + 4)

    data.Txt(cx.m, 0x78f3, 0x78f7)
    data.Txt(cx.m, 0x78f7, 0x78fd)
    data.Txt(cx.m, 0x78fd, 0x78ff)

    utils.cmd_dispatch(cx, cta, 0x644c)

    utils.key_dispatch(cx, 0x640c, 0x644c)

    utils.dsp_dispatch(cx, 0x6848, 0x6858)

    for i in (0x614c, 0x619c, 0x61a3, 0x69dd, 0x69e4):
        utils.float70(cx.m, i)

    c = cx.codeptr(0x7909)
    cx.m.set_label(c.dst, "HPIB_CMD_PARSE")

    utils.square_tbl(cx.m)

    utils.apply_labels(cx, "B")
    utils.tramp(cx)

    return NAME, (cx.m, )