summaryrefslogtreecommitdiff
path: root/python/examples/nes.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2017-05-02 21:41:20 -0400
committerRusty Wagner <rusty@vector35.com>2017-05-02 22:19:30 -0400
commit04474d6ae818ddfa9978ffac6f1cdcaae56a87b5 (patch)
treee7601a4f42a7395681021a46c0b360c47cffee83 /python/examples/nes.py
parent362b82012d980f06c98b54b8032c4912ff5c8893 (diff)
Fix NES plugin for new IL API
Diffstat (limited to 'python/examples/nes.py')
-rw-r--r--python/examples/nes.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/examples/nes.py b/python/examples/nes.py
index 4122cde0..813b91c9 100644
--- a/python/examples/nes.py
+++ b/python/examples/nes.py
@@ -201,11 +201,11 @@ def indirect_load(il, value):
def load_zero_page_16(il, value):
if il[value].operation == LowLevelILOperation.LLIL_CONST:
- if il[value].value == 0xff:
+ if il[value].constant == 0xff:
lo = il.zero_extend(2, il.load(1, il.const(2, 0xff)))
hi = il.shift_left(2, il.zero_extend(2, il.load(1, il.const(2, 0)), il.const(2, 8)))
return il.or_expr(2, lo, hi)
- return il.load(2, il.const(2, il[value].value))
+ return il.load(2, il.const(2, il[value].constant))
il.append(il.set_reg(1, LLIL_TEMP(0), value))
value = il.reg(1, LLIL_TEMP(0))
lo_addr = value
@@ -244,7 +244,7 @@ OperandIL = [
def cond_branch(il, cond, dest):
t = None
if il[dest].operation == LowLevelILOperation.LLIL_CONST:
- t = il.get_label_for_address(Architecture['6502'], il[dest].value)
+ t = il.get_label_for_address(Architecture['6502'], il[dest].constant)
if t is None:
t = LowLevelILLabel()
indirect = True
@@ -262,7 +262,7 @@ def cond_branch(il, cond, dest):
def jump(il, dest):
label = None
if il[dest].operation == LowLevelILOperation.LLIL_CONST:
- label = il.get_label_for_address(Architecture['6502'], il[dest].value)
+ label = il.get_label_for_address(Architecture['6502'], il[dest].constant)
if label is None:
il.append(il.jump(dest))
else: