diff options
| author | Camille Mougey <commial@gmail.com> | 2019-03-07 14:37:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-07 14:37:07 +0100 |
| commit | 4c2320b46250a8d6f8774e1218544b72a154cd8e (patch) | |
| tree | b67e7b072439f84109bd39dad8ed7f3f135224f8 /example/expression/basic_op.py | |
| parent | eab809932871f91d6f4aa770fc321af9e156e0f5 (diff) | |
| parent | 26c1075723a02984da6d3bc7423c5c0c43082dc3 (diff) | |
| download | miasm-4c2320b46250a8d6f8774e1218544b72a154cd8e.tar.gz miasm-4c2320b46250a8d6f8774e1218544b72a154cd8e.zip | |
Merge pull request #990 from serpilliere/support_python2_python3
Support python2 python3
Diffstat (limited to 'example/expression/basic_op.py')
| -rw-r--r-- | example/expression/basic_op.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/example/expression/basic_op.py b/example/expression/basic_op.py index 6032f483..afeb4081 100644 --- a/example/expression/basic_op.py +++ b/example/expression/basic_op.py @@ -1,31 +1,32 @@ -from miasm2.expression.expression import * +from __future__ import print_function +from miasm.expression.expression import * -print """ +print(""" Simple expression manipulation demo -""" +""") # define 2 ID a = ExprId('eax', 32) b = ExprId('ebx', 32) -print a, b +print(a, b) # eax ebx # add those ID c = ExprOp('+', a, b) -print c +print(c) # (eax + ebx) # + automatically generates ExprOp('+', a, b) c = a + b -print c +print(c) # (eax + ebx) # ax is a slice of eax ax = a[:16] -print ax +print(ax) # eax[0:16] # memory deref d = ExprMem(c, 32) -print d +print(d) # @32[(eax + ebx)] |