MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / set_p_value

Method set_p_value

python/examples/nes.py:444–453  ·  view source on GitHub ↗
(il:LowLevelILFunction, value:ExpressionIndex)

Source from the content-addressed store, hash-verified

442
443 @staticmethod
444 def set_p_value(il:LowLevelILFunction, value:ExpressionIndex) -> None:
445 il.append(il.set_reg(1, LLIL_TEMP(0), value))
446 il.append(il.set_flag(c_flag, il.test_bit(1, il.reg(1, LLIL_TEMP(0)), il.const(1, 0x01))))
447 il.append(il.set_flag(z_flag, il.test_bit(1, il.reg(1, LLIL_TEMP(0)), il.const(1, 0x02))))
448 il.append(il.set_flag(i_flag, il.test_bit(1, il.reg(1, LLIL_TEMP(0)), il.const(1, 0x04))))
449 il.append(il.set_flag(d_flag, il.test_bit(1, il.reg(1, LLIL_TEMP(0)), il.const(1, 0x08))))
450 il.append(il.set_flag(b_flag, il.test_bit(1, il.reg(1, LLIL_TEMP(0)), il.const(1, 0x10))))
451 il.append(il.set_flag(v_flag, il.test_bit(1, il.reg(1, LLIL_TEMP(0)), il.const(1, 0x40))))
452 il.append(il.set_flag(s_flag, il.test_bit(1, il.reg(1, LLIL_TEMP(0)), il.const(1, 0x80))))
453 return None
454
455 @staticmethod
456 def rti(il:LowLevelILFunction) -> ExpressionIndex:

Callers 2

M6502Class · 0.80
rtiMethod · 0.80

Calls 7

LLIL_TEMPFunction · 0.90
appendMethod · 0.45
set_regMethod · 0.45
set_flagMethod · 0.45
test_bitMethod · 0.45
regMethod · 0.45
constMethod · 0.45

Tested by

no test coverage detected