diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-02-15 08:20:45 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-03-13 14:13:13 +0100 |
| commit | 287cb1bb182112ad8b476a9631f0099163041fdc (patch) | |
| tree | 3913ea7584338a268ffbea1f8a8d2658b44855dc /example/expression/asm_to_ir.py | |
| parent | c3940991f2461278fdb3c7faff8b270320585556 (diff) | |
| download | miasm-287cb1bb182112ad8b476a9631f0099163041fdc.tar.gz miasm-287cb1bb182112ad8b476a9631f0099163041fdc.zip | |
All: rename vars bloc -> block
Diffstat (limited to 'example/expression/asm_to_ir.py')
| -rw-r--r-- | example/expression/asm_to_ir.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/example/expression/asm_to_ir.py b/example/expression/asm_to_ir.py index 552ddd36..4193f31d 100644 --- a/example/expression/asm_to_ir.py +++ b/example/expression/asm_to_ir.py @@ -8,7 +8,7 @@ from miasm2.arch.x86.ira import ir_a_x86_32 # First, asm code -blocs, symbol_pool = parse_asm.parse_txt(mn_x86, 32, ''' +blocks, symbol_pool = parse_asm.parse_txt(mn_x86, 32, ''' main: MOV EAX, 1 MOV EBX, 2 @@ -25,20 +25,20 @@ loop: symbol_pool.set_offset(symbol_pool.getby_name("main"), 0x0) -for b in blocs: - print b +for block in blocks: + print block print "symbols:" print symbol_pool -patches = asmbloc.asm_resolve_final(mn_x86, blocs, symbol_pool) +patches = asmbloc.asm_resolve_final(mn_x86, blocks, symbol_pool) # Translate to IR ir_arch = ir_a_x86_32(symbol_pool) -for b in blocs: - print 'add bloc' - print b - ir_arch.add_bloc(b) +for block in blocks: + print 'add block' + print block + ir_arch.add_bloc(block) # Display IR for lbl, irblock in ir_arch.blocks.items(): |