diff options
Diffstat (limited to 'survey.py')
| -rwxr-xr-x | survey.py | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -31,19 +31,28 @@ Resolves label references and substitutes them with literal values. ... 6f/7 00/5 main/off21/[19:12] main/off21/[11:11] main/off21/[10:1] main/off21/[20:20] ... '''[1:-1])))) == code 0x80000000 +# main: +# load 0x10010000 (UART0) into t0 37/7 05/5 10010/20 +# store 0x48 (H) in UART0+0 13/7 06/5 00/3 00/5 48/12 23/7 00/5 02/3 05/5 06/5 00/7 +# store 0x65 (e) in UART0+0 13/7 06/5 00/3 00/5 65/12 23/7 00/5 02/3 05/5 06/5 00/7 +# store 0x6c (l) in UART0+0 13/7 06/5 00/3 00/5 6c/12 23/7 00/5 02/3 05/5 06/5 00/7 +# store 0x6c (l) in UART0+0 13/7 06/5 00/3 00/5 6c/12 23/7 00/5 02/3 05/5 06/5 00/7 +# store 0x6f (o) in UART0+0 13/7 06/5 00/3 00/5 6f/12 23/7 00/5 02/3 05/5 06/5 00/7 +# store 0x0a (\\n) in UART0+0 13/7 06/5 00/3 00/5 0a/12 23/7 00/5 02/3 05/5 06/5 00/7 +# jump back up to the top 6f/7 00/5 ff/8 1/1 3e6/10 1/1 """ import subv @@ -151,7 +160,9 @@ def survey(iter): instr.append(observed) line[type] = instr yield subv.format(line) - elif type == "segment": + elif type == "label": + yield "# {}".format(line["raw"]) + else: yield line["raw"] except Exception as e: msg = "failed to survey line" |
