diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-02-25 11:09:54 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-03-05 16:52:49 +0100 |
| commit | 02bbb30efea4980c9d133947cbbf69fb599071ad (patch) | |
| tree | 3fea6826fcc5354840a27cb1dc99ff31eef81896 /example/disasm/single_instr.py | |
| parent | eab809932871f91d6f4aa770fc321af9e156e0f5 (diff) | |
| download | focaccia-miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.tar.gz focaccia-miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.zip | |
Support python2/python3
Diffstat (limited to 'example/disasm/single_instr.py')
| -rw-r--r-- | example/disasm/single_instr.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/example/disasm/single_instr.py b/example/disasm/single_instr.py index d17e303f..70b37220 100644 --- a/example/disasm/single_instr.py +++ b/example/disasm/single_instr.py @@ -1,14 +1,15 @@ +from __future__ import print_function from miasm2.arch.x86.arch import mn_x86 from miasm2.arch.x86.regs import EDX from miasm2.core.locationdb import LocationDB loc_db = LocationDB() l = mn_x86.fromstring('MOV EAX, EBX', loc_db, 32) -print "instruction:", l -print "arg:", l.args[0] +print("instruction:", l) +print("arg:", l.args[0]) x = mn_x86.asm(l) -print x +print(x) l.args[0] = EDX y = mn_x86.asm(l) -print y -print mn_x86.dis(y[0], 32) +print(y) +print(mn_x86.dis(y[0], 32)) |